3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-25 15:50:12 +01:00

Custom item mappings (1.12-1.15)

Item mappings as well as their names can now be freely modified in the respective mapping files.
(Todo: 1.9-1.11)
Dieser Commit ist enthalten in:
KennyTV 2020-01-26 20:52:08 +01:00
Ursprung b62c8c46e3
Commit b2df8fc0d9
22 geänderte Dateien mit 1209 neuen und 412 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,23 @@
package nl.matsv.viabackwards.api.data;
import net.md_5.bungee.api.ChatColor;
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ChatRewriter;
public class MappedItem {
private final int id;
private final String jsonName;
public MappedItem(int id, String name) {
this.id = id;
this.jsonName = ChatRewriter.legacyTextToJson(ChatColor.RESET + name);
}
public int getId() {
return id;
}
public String getJsonName() {
return jsonName;
}
}

Datei anzeigen

@ -0,0 +1,41 @@
package nl.matsv.viabackwards.api.data;
import nl.matsv.viabackwards.ViaBackwards;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.data.MappingDataLoader;
import us.myles.viaversion.libs.gson.JsonElement;
import us.myles.viaversion.libs.gson.JsonObject;
import java.util.HashMap;
import java.util.Map;
/**
* Backwards mappings for newly (!) added items.
*/
public class VBItemMappings {
private final Map<Integer, MappedItem> itemMapping = new HashMap<>();
public VBItemMappings(JsonObject oldMapping, JsonObject newMapping, JsonObject diffMapping) {
for (Map.Entry<String, JsonElement> entry : diffMapping.entrySet()) {
JsonObject object = entry.getValue().getAsJsonObject();
String mappedIdName = object.getAsJsonPrimitive("id").getAsString();
Map.Entry<String, JsonElement> value = MappingDataLoader.findValue(newMapping, mappedIdName);
if (value == null) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
ViaBackwards.getPlatform().getLogger().warning("No key for " + mappedIdName + " :( ");
}
continue;
}
int id = Integer.parseInt(MappingDataLoader.findValue(oldMapping, entry.getKey()).getKey());
int mappedId = Integer.parseInt(value.getKey());
String name = object.getAsJsonPrimitive("name").getAsString();
itemMapping.put(id, new MappedItem(mappedId, name));
}
}
public MappedItem getMappedItem(int id) {
return itemMapping.get(id);
}
}

Datei anzeigen

@ -0,0 +1,62 @@
package nl.matsv.viabackwards.api.rewriters;
import nl.matsv.viabackwards.api.BackwardsProtocol;
import nl.matsv.viabackwards.api.data.MappedItem;
import us.myles.ViaVersion.api.minecraft.item.Item;
import us.myles.ViaVersion.api.rewriters.IdRewriteFunction;
import us.myles.viaversion.libs.opennbt.tag.builtin.CompoundTag;
import us.myles.viaversion.libs.opennbt.tag.builtin.StringTag;
public abstract class ItemRewriter<T extends BackwardsProtocol> extends ItemRewriterBase<T> {
private final MappedItemFunction mappedItemFunction;
protected ItemRewriter(T protocol, IdRewriteFunction oldRewriter, IdRewriteFunction newRewriter, MappedItemFunction mappedItemFunction) {
super(protocol, oldRewriter, newRewriter, true);
this.mappedItemFunction = mappedItemFunction;
}
protected ItemRewriter(T protocol, MappedItemFunction mappedItemFunction) {
super(protocol, true);
this.mappedItemFunction = mappedItemFunction;
}
@Override
public Item handleItemToClient(Item item) {
if (item == null) return null;
MappedItem data = mappedItemFunction.get(item.getIdentifier());
if (data == null) {
// Just rewrite the id
return super.handleItemToClient(item);
}
if (item.getTag() == null) {
item.setTag(new CompoundTag(""));
}
// Backup data for toServer
item.getTag().put(createViaNBT(item));
// Also includes the already mapped id
item.setIdentifier(data.getId());
// Set custom name
CompoundTag tag = item.getTag().get("display");
if (tag == null) {
item.getTag().put(tag = new CompoundTag("display"));
}
// Only set name if there is no original one
if (!tag.contains("Name")) {
tag.put(new StringTag("Name", data.getJsonName()));
}
return item;
}
@FunctionalInterface
public interface MappedItemFunction {
MappedItem get(int id);
}
}

Datei anzeigen

@ -0,0 +1,84 @@
package nl.matsv.viabackwards.api.rewriters;
import nl.matsv.viabackwards.api.BackwardsProtocol;
import us.myles.ViaVersion.api.minecraft.item.Item;
import us.myles.ViaVersion.api.rewriters.IdRewriteFunction;
import us.myles.viaversion.libs.opennbt.conversion.builtin.CompoundTagConverter;
import us.myles.viaversion.libs.opennbt.tag.builtin.ByteTag;
import us.myles.viaversion.libs.opennbt.tag.builtin.CompoundTag;
import us.myles.viaversion.libs.opennbt.tag.builtin.ShortTag;
public abstract class ItemRewriterBase<T extends BackwardsProtocol> extends Rewriter<T> {
protected static final CompoundTagConverter CONVERTER = new CompoundTagConverter();
protected final IdRewriteFunction oldRewriter;
protected final IdRewriteFunction newRewriter;
protected final String nbtTagName;
protected final boolean jsonNameFormat;
protected ItemRewriterBase(T protocol, IdRewriteFunction oldRewriter, IdRewriteFunction newRewriter, boolean jsonNameFormat) {
super(protocol);
this.oldRewriter = oldRewriter;
this.newRewriter = newRewriter;
this.jsonNameFormat = jsonNameFormat;
nbtTagName = "ViaBackwards|" + protocol.getClass().getSimpleName();
}
protected ItemRewriterBase(T protocol, boolean jsonNameFormat) {
this(protocol, null, null, jsonNameFormat);
}
public Item handleItemToClient(Item item) {
if (item == null) return null;
if (oldRewriter != null) {
item.setIdentifier(oldRewriter.rewrite(item.getIdentifier()));
}
return item;
}
public Item handleItemToServer(Item item) {
if (item == null) return null;
CompoundTag tag = item.getTag();
if (tag == null) {
if (newRewriter != null) {
item.setIdentifier(newRewriter.rewrite(item.getIdentifier()));
}
return item;
}
CompoundTag viaTag = tag.get(nbtTagName);
if (viaTag != null) {
short id = (short) viaTag.get("id").getValue();
short data = (short) viaTag.get("data").getValue();
byte amount = (byte) viaTag.get("amount").getValue();
CompoundTag extras = viaTag.get("extras");
item.setIdentifier(id);
item.setData(data);
item.setAmount(amount);
if (extras != null) {
item.setTag(CONVERTER.convert("", CONVERTER.convert(extras)));
}
// Remove data tag
tag.remove(nbtTagName);
} else {
// Rewrite id normally
if (newRewriter != null) {
item.setIdentifier(newRewriter.rewrite(item.getIdentifier()));
}
}
return item;
}
protected CompoundTag createViaNBT(Item item) {
CompoundTag tag = new CompoundTag(nbtTagName);
tag.put(new ShortTag("id", (short) item.getIdentifier()));
tag.put(new ShortTag("data", item.getData()));
tag.put(new ByteTag("amount", item.getAmount()));
if (item.getTag() != null) {
tag.put(CONVERTER.convert("extras", CONVERTER.convert(item.getTag())));
}
return tag;
}
}

Datei anzeigen

@ -10,10 +10,6 @@
package nl.matsv.viabackwards.api.rewriters;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import net.md_5.bungee.api.ChatColor;
import nl.matsv.viabackwards.api.BackwardsProtocol;
import nl.matsv.viabackwards.api.entities.blockitem.BlockItemSettings;
@ -23,23 +19,26 @@ import nl.matsv.viabackwards.utils.ItemUtil;
import us.myles.ViaVersion.api.minecraft.chunks.Chunk;
import us.myles.ViaVersion.api.minecraft.chunks.ChunkSection;
import us.myles.ViaVersion.api.minecraft.item.Item;
import us.myles.ViaVersion.api.rewriters.IdRewriteFunction;
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ChatRewriter;
import us.myles.viaversion.libs.opennbt.conversion.builtin.CompoundTagConverter;
import us.myles.viaversion.libs.opennbt.tag.builtin.*;
import us.myles.viaversion.libs.opennbt.tag.builtin.CompoundTag;
import us.myles.viaversion.libs.opennbt.tag.builtin.IntTag;
import us.myles.viaversion.libs.opennbt.tag.builtin.StringTag;
import us.myles.viaversion.libs.opennbt.tag.builtin.Tag;
import java.util.HashMap;
import java.util.Map;
public abstract class BlockItemRewriter<T extends BackwardsProtocol> extends Rewriter<T> {
public abstract class LegacyBlockItemRewriter<T extends BackwardsProtocol> extends ItemRewriterBase<T> {
private static final CompoundTagConverter converter = new CompoundTagConverter();
private final Map<Integer, BlockItemSettings> replacementData = new HashMap<>();
protected String nbtTagName;
protected boolean jsonNameFormat = true;
protected BlockItemRewriter(T protocol) {
super(protocol);
nbtTagName = "ViaBackwards|" + protocol.getClass().getSimpleName();
protected LegacyBlockItemRewriter(T protocol, IdRewriteFunction oldRewriter, IdRewriteFunction newRewriter) {
super(protocol, oldRewriter, newRewriter, false);
}
protected LegacyBlockItemRewriter(T protocol) {
super(protocol, false);
}
protected BlockItemSettings rewrite(int itemId) {
@ -48,77 +47,64 @@ public abstract class BlockItemRewriter<T extends BackwardsProtocol> extends Rew
return settings;
}
public Item handleItemToClient(Item i) {
if (i == null) return null;
@Override
public Item handleItemToClient(Item item) {
if (item == null) return null;
BlockItemSettings data = replacementData.get(i.getIdentifier());
if (data == null) return i;
BlockItemSettings data = replacementData.get(item.getIdentifier());
if (data == null) {
// Just rewrite the id
return super.handleItemToClient(item);
}
Item original = ItemUtil.copyItem(i);
Item original = ItemUtil.copyItem(item);
if (data.hasRepItem()) {
ItemUtil.copyItem(i, data.getRepItem());
if (i.getTag() == null) {
i.setTag(new CompoundTag(""));
} else {
// Handle colors
CompoundTag tag = i.getTag().get("display");
if (tag != null) {
StringTag nameTag = tag.get("Name");
if (nameTag != null) {
String value = nameTag.getValue();
if (value.contains("%vb_color%")) {
tag.put(new StringTag("Name", value.replace("%vb_color%", BlockColors.get(original.getData()))));
}
// Also includes the already mapped id
ItemUtil.copyItem(item, data.getRepItem());
if (item.getTag() == null) {
item.setTag(new CompoundTag(""));
}
// Backup data for toServer
item.getTag().put(createViaNBT(original));
// Keep original data (aside from the name)
if (original.getTag() != null) {
for (Tag ai : original.getTag()) {
item.getTag().put(ai);
}
}
// Handle colors
CompoundTag tag = item.getTag().get("display");
if (tag != null) {
StringTag nameTag = tag.get("Name");
if (nameTag != null) {
String value = nameTag.getValue();
if (value.contains("%vb_color%")) {
tag.put(new StringTag("Name", value.replace("%vb_color%", BlockColors.get(original.getData()))));
}
}
}
// Backup data for toServer
i.getTag().put(createViaNBT(original));
// Keep original data (aisde from the name)
if (original.getTag() != null) {
for (Tag ai : original.getTag()) {
i.getTag().put(ai);
}
}
i.setAmount(original.getAmount());
item.setAmount(original.getAmount());
// Keep original data when -1
if (i.getData() == -1) {
i.setData(original.getData());
if (item.getData() == -1) {
item.setData(original.getData());
}
} else {
// Set the mapped id if no custom item is defined
super.handleItemToClient(item);
}
if (data.hasItemTagHandler()) {
if (!i.getTag().contains(nbtTagName)) {
i.getTag().put(createViaNBT(original));
if (!item.getTag().contains(nbtTagName)) {
item.getTag().put(createViaNBT(original));
}
data.getItemHandler().handle(i);
data.getItemHandler().handle(item);
}
return i;
}
public Item handleItemToServer(Item item) {
if (item == null) return null;
if (item.getTag() == null) return item;
CompoundTag tag = item.getTag();
if (tag.contains(nbtTagName)) {
CompoundTag via = tag.get(nbtTagName);
short id = (short) via.get("id").getValue();
short data = (short) via.get("data").getValue();
byte amount = (byte) via.get("amount").getValue();
CompoundTag extras = via.get("extras");
item.setIdentifier(id);
item.setData(data);
item.setAmount(amount);
item.setTag(converter.convert("", converter.convert(extras)));
// Remove data tag
tag.remove(nbtTagName);
}
return item;
}
@ -189,7 +175,7 @@ public abstract class BlockItemRewriter<T extends BackwardsProtocol> extends Rew
if (hasBlockEntityHandler) continue;
BlockItemSettings settings = replacementData.get(btype);
if (section != null && settings.hasEntityHandler()) {
if (settings != null && settings.hasEntityHandler()) {
hasBlockEntityHandler = true;
}
}
@ -225,33 +211,6 @@ public abstract class BlockItemRewriter<T extends BackwardsProtocol> extends Rew
}
}
protected boolean containsBlock(int block) {
final BlockItemSettings settings = replacementData.get(block);
return settings != null && settings.hasRepBlock();
}
protected boolean hasBlockEntityHandler(int block) {
final BlockItemSettings settings = replacementData.get(block);
return settings != null && settings.hasEntityHandler();
}
protected boolean hasItemTagHandler(int block) {
final BlockItemSettings settings = replacementData.get(block);
return settings != null && settings.hasItemTagHandler();
}
private CompoundTag createViaNBT(Item i) {
CompoundTag tag = new CompoundTag(nbtTagName);
tag.put(new ShortTag("id", (short) i.getIdentifier()));
tag.put(new ShortTag("data", i.getData()));
tag.put(new ByteTag("amount", i.getAmount()));
if (i.getTag() != null) {
tag.put(converter.convert("extras", converter.convert(i.getTag())));
} else
tag.put(new CompoundTag("extras"));
return tag;
}
protected CompoundTag getNamedTag(String text) {
CompoundTag tag = new CompoundTag("");
tag.put(new CompoundTag("display"));
@ -260,23 +219,49 @@ public abstract class BlockItemRewriter<T extends BackwardsProtocol> extends Rew
return tag;
}
protected CompoundTag getNamedJsonTag(String text) {
CompoundTag tag = new CompoundTag("");
tag.put(new CompoundTag("display"));
private static final class Pos {
return tag;
}
private final int x, y, z;
private String getProtocolName() {
return getProtocol().getClass().getSimpleName();
}
private Pos(final int x, final int y, final int z) {
this.x = x;
this.y = y;
this.z = z;
}
@Data
@AllArgsConstructor
@ToString
@EqualsAndHashCode
private static class Pos {
public int getX() {
return x;
}
private int x, y, z;
public int getY() {
return y;
}
public int getZ() {
return z;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Pos pos = (Pos) o;
if (x != pos.x) return false;
if (y != pos.y) return false;
return z == pos.z;
}
@Override
public int hashCode() {
int result = x;
result = 31 * result + y;
result = 31 * result + z;
return result;
}
@Override
public String toString() {
return "Pos{" + "x=" + x + ", y=" + y + ", z=" + z + '}';
}
}
}

Datei anzeigen

@ -4,9 +4,9 @@ import us.myles.ViaVersion.api.PacketWrapper;
public abstract class RecipeRewriter {
protected final BlockItemRewriter rewriter;
protected final ItemRewriterBase rewriter;
protected RecipeRewriter(final BlockItemRewriter rewriter) {
protected RecipeRewriter(final ItemRewriterBase rewriter) {
this.rewriter = rewriter;
}

Datei anzeigen

@ -12,7 +12,7 @@ package nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets;
import net.md_5.bungee.api.ChatColor;
import nl.matsv.viabackwards.api.entities.storage.EntityTracker;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.LegacyBlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.LegacyEnchantmentRewriter;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.EntityTypeNames;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.Protocol1_10To1_11;
@ -41,7 +41,7 @@ import us.myles.viaversion.libs.opennbt.tag.builtin.StringTag;
import java.util.Arrays;
import java.util.Optional;
public class BlockItemPackets1_11 extends BlockItemRewriter<Protocol1_10To1_11> {
public class BlockItemPackets1_11 extends LegacyBlockItemRewriter<Protocol1_10To1_11> {
private LegacyEnchantmentRewriter enchantmentRewriter;
@ -51,7 +51,6 @@ public class BlockItemPackets1_11 extends BlockItemRewriter<Protocol1_10To1_11>
@Override
protected void registerPackets() {
jsonNameFormat = false;
ItemRewriter itemRewriter = new ItemRewriter(protocol, this::handleItemToClient, this::handleItemToServer);
// Set slot packet

Datei anzeigen

@ -10,7 +10,7 @@
package nl.matsv.viabackwards.protocol.protocol1_11_1to1_12.packets;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.LegacyBlockItemRewriter;
import nl.matsv.viabackwards.protocol.protocol1_11_1to1_12.Protocol1_11_1To1_12;
import nl.matsv.viabackwards.protocol.protocol1_11_1to1_12.data.BlockColors;
import nl.matsv.viabackwards.protocol.protocol1_11_1to1_12.data.MapColorMapping;
@ -32,7 +32,7 @@ import us.myles.viaversion.libs.opennbt.tag.builtin.ListTag;
import java.util.Collections;
public class BlockItemPackets1_12 extends BlockItemRewriter<Protocol1_11_1To1_12> {
public class BlockItemPackets1_12 extends LegacyBlockItemRewriter<Protocol1_11_1To1_12> {
public BlockItemPackets1_12(Protocol1_11_1To1_12 protocol) {
super(protocol);
@ -40,7 +40,6 @@ public class BlockItemPackets1_12 extends BlockItemRewriter<Protocol1_11_1To1_12
@Override
protected void registerPackets() {
jsonNameFormat = false;
protocol.registerOutgoing(State.PLAY, 0x24, 0x24, new PacketRemapper() {
@Override
public void registerMap() {
@ -268,8 +267,7 @@ public class BlockItemPackets1_12 extends BlockItemRewriter<Protocol1_11_1To1_12
@Override
protected void registerRewrites() {
// Concrete -> Stained clay? (Also got a new name Terracota?)
rewrite(251)
.repItem(new Item(159, (byte) 1, (short) -1, getNamedTag("1.12 %vb_color% Concrete")))
rewrite(251).repItem(new Item(159, (byte) 1, (short) -1, getNamedTag("1.12 %vb_color% Concrete")))
.repBlock(new Block(159, -1));
// Concrete Powder -> Wool

Datei anzeigen

@ -10,7 +10,7 @@
package nl.matsv.viabackwards.protocol.protocol1_11to1_11_1.packets;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.LegacyBlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.LegacyEnchantmentRewriter;
import nl.matsv.viabackwards.protocol.protocol1_11to1_11_1.Protocol1_11To1_11_1;
import us.myles.ViaVersion.api.PacketWrapper;
@ -24,7 +24,7 @@ import us.myles.ViaVersion.packets.State;
import us.myles.viaversion.libs.opennbt.tag.builtin.CompoundTag;
import us.myles.viaversion.libs.opennbt.tag.builtin.ListTag;
public class ItemPackets1_11_1 extends BlockItemRewriter<Protocol1_11To1_11_1> {
public class ItemPackets1_11_1 extends LegacyBlockItemRewriter<Protocol1_11To1_11_1> {
private LegacyEnchantmentRewriter enchantmentRewriter;
@ -34,7 +34,6 @@ public class ItemPackets1_11_1 extends BlockItemRewriter<Protocol1_11To1_11_1> {
@Override
protected void registerPackets() {
jsonNameFormat = false;
ItemRewriter itemRewriter = new ItemRewriter(protocol, this::handleItemToClient, this::handleItemToServer);
// Set slot packet

Datei anzeigen

@ -11,6 +11,7 @@
package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.data;
import nl.matsv.viabackwards.ViaBackwards;
import nl.matsv.viabackwards.api.data.VBItemMappings;
import nl.matsv.viabackwards.api.data.VBMappingDataLoader;
import nl.matsv.viabackwards.api.data.VBMappings;
import us.myles.ViaVersion.api.Via;
@ -31,6 +32,7 @@ public class BackwardsMappings {
public static final Map<String, String> translateMappings = new HashMap<>();
public static BlockMappingsShortArray blockMappings;
public static Mappings soundMappings;
public static VBItemMappings itemMappings;
public static void init() {
JsonObject mapping1_12 = MappingDataLoader.loadData("mapping-1.12.json");
@ -39,6 +41,7 @@ public class BackwardsMappings {
ViaBackwards.getPlatform().getLogger().info("Loading 1.13 -> 1.12.2 block mapping...");
blockMappings = new BlockMappingsShortArray(mapping1_13.getAsJsonObject("blocks"), mapping1_12.getAsJsonObject("blocks"), mapping1_12_2to1_13.getAsJsonObject("blockstates"));
itemMappings = new VBItemMappings(mapping1_13.getAsJsonObject("items"), mapping1_12.getAsJsonObject("items"), mapping1_12_2to1_13.getAsJsonObject("items"));
ViaBackwards.getPlatform().getLogger().info("Loading 1.13 -> 1.12.2 sound mapping...");
soundMappings = new VBMappings(mapping1_13.getAsJsonArray("sounds"), mapping1_12.getAsJsonArray("sounds"), mapping1_12_2to1_13.getAsJsonObject("sounds"));

Datei anzeigen

@ -12,7 +12,6 @@ package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.packets;
import com.google.common.primitives.Ints;
import nl.matsv.viabackwards.ViaBackwards;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.EnchantmentRewriter;
import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.Protocol1_12_2To1_13;
import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.block_entity_handlers.FlowerPotHandler;
@ -44,13 +43,13 @@ import us.myles.viaversion.libs.opennbt.tag.builtin.*;
import java.util.*;
public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13> {
public class BlockItemPackets1_13 extends nl.matsv.viabackwards.api.rewriters.ItemRewriter<Protocol1_12_2To1_13> {
private final Map<String, String> enchantmentMappings = new HashMap<>();
private final String NBT_TAG_NAME;
public BlockItemPackets1_13(Protocol1_12_2To1_13 protocol) {
super(protocol);
super(protocol, id -> BackwardsMappings.itemMappings.getMappedItem(id));
NBT_TAG_NAME = "ViaBackwards|" + protocol.getClass().getSimpleName() + "|Part2";
}
@ -479,133 +478,6 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
@Override
protected void registerRewrites() {
rewrite(245).repItem(new Item(241, (byte) 1, (short) -1, getNamedTag("1.13 Acacia Button")));
rewrite(243).repItem(new Item(241, (byte) 1, (short) -1, getNamedTag("1.13 Birch Button")));
rewrite(242).repItem(new Item(241, (byte) 1, (short) -1, getNamedTag("1.13 Spruce Button")));
rewrite(244).repItem(new Item(241, (byte) 1, (short) -1, getNamedTag("1.13 Jungle Button")));
rewrite(246).repItem(new Item(241, (byte) 1, (short) -1, getNamedTag("1.13 Dark Oak Button")));
rewrite(191).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Acacia Trapdoor")));
rewrite(189).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Birch Trapdoor")));
rewrite(188).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Spruce Trapdoor")));
rewrite(190).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Jungle Trapdoor")));
rewrite(192).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Dark Oak Trapdoor")));
rewrite(164).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Acacia Pressure Plate")));
rewrite(162).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Birch Pressure Plate")));
rewrite(161).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Spruce Pressure Plate")));
rewrite(163).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Jungle Pressure Plate")));
rewrite(165).repItem(new Item(187, (byte) 1, (short) -1, getNamedTag("1.13 Dark Oak Pressure Plate")));
rewrite(762).repItem(new Item(544, (byte) 1, (short) -1, getNamedTag("1.13 Acacia Boat")));
rewrite(760).repItem(new Item(544, (byte) 1, (short) -1, getNamedTag("1.13 Birch Boat")));
rewrite(759).repItem(new Item(544, (byte) 1, (short) -1, getNamedTag("1.13 Spruce Boat")));
rewrite(761).repItem(new Item(544, (byte) 1, (short) -1, getNamedTag("1.13 Jungle Boat")));
rewrite(763).repItem(new Item(544, (byte) 1, (short) -1, getNamedTag("1.13 Dark Oak Boat")));
rewrite(453).repItem(new Item(300, (byte) 1, (short) -1, getNamedTag("1.13 Blue Ice")));
rewrite(547).repItem(new Item(538, (byte) 1, (short) -1, getNamedTag("1.13 Bucket of Pufferfish")));
rewrite(548).repItem(new Item(538, (byte) 1, (short) -1, getNamedTag("1.13 Bucket of Salmon")));
rewrite(549).repItem(new Item(538, (byte) 1, (short) -1, getNamedTag("1.13 Bucket of Cod")));
rewrite(550).repItem(new Item(538, (byte) 1, (short) -1, getNamedTag("1.13 Bucket of Tropical Fish")));
rewrite(784).repItem(new Item(543, (byte) 1, (short) -1, getNamedTag("1.13 Heart of the Sea")));
rewrite(783).repItem(new Item(587, (byte) 1, (short) -1, getNamedTag("1.13 Nautilus Shell")));
rewrite(782).repItem(new Item(545, (byte) 1, (short) -1, getNamedTag("1.13 Phantom Membrane")));
rewrite(465).repItem(new Item(510, (byte) 1, (short) -1, getNamedTag("1.13 Turtle Shell")));
rewrite(427).repItem(new Item(561, (byte) 1, (short) -1, getNamedTag("1.13 Turtle Egg")));
rewrite(466).repItem(new Item(582, (byte) 1, (short) -1, getNamedTag("1.13 Scute")));
rewrite(781).repItem(new Item(488, (byte) 1, (short) -1, getNamedTag("1.13 Trident")));
rewrite(80).repItem(new Item(561, (byte) 1, (short) -1, getNamedTag("1.13 Sea Pickle")));
rewrite(79).repItem(new Item(76, (byte) 1, (short) -1, getNamedTag("1.13 Seagrass")));
rewrite(454).repItem(new Item(238, (byte) 1, (short) -1, getNamedTag("1.13 Conduit")));
rewrite(554).repItem(new Item(76, (byte) 1, (short) -1, getNamedTag("1.13 Kelp")));
rewrite(611).repItem(new Item(508, (byte) 1, (short) -1, getNamedTag("1.13 Dried Kelp")));
rewrite(555).repItem(new Item(281, (byte) 1, (short) -1, getNamedTag("1.13 Dried Kelp Block")));
rewrite(38).repItem(new Item(32, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Oak Log")));
rewrite(42).repItem(new Item(36, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Acacia Log")));
rewrite(40).repItem(new Item(34, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Birch Log")));
rewrite(39).repItem(new Item(33, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Spruce Log")));
rewrite(41).repItem(new Item(35, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Jungle Log")));
rewrite(43).repItem(new Item(37, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Dark Oak Log")));
rewrite(44).repItem(new Item(32, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Oak Wood")));
rewrite(48).repItem(new Item(36, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Acacia Wood")));
rewrite(46).repItem(new Item(34, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Birch Wood")));
rewrite(45).repItem(new Item(33, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Spruce Wood")));
rewrite(47).repItem(new Item(35, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Jungle Wood")));
rewrite(49).repItem(new Item(37, (byte) 1, (short) -1, getNamedTag("1.13 Stripped Dark Oak Wood")));
rewrite(50).repItem(new Item(32, (byte) 1, (short) -1, getNamedTag("1.13 Oak Wood")));
rewrite(51).repItem(new Item(33, (byte) 1, (short) -1, getNamedTag("1.13 Spruce Wood")));
rewrite(52).repItem(new Item(34, (byte) 1, (short) -1, getNamedTag("1.13 Birch Wood")));
rewrite(53).repItem(new Item(35, (byte) 1, (short) -1, getNamedTag("1.13 Jungle Wood")));
rewrite(54).repItem(new Item(36, (byte) 1, (short) -1, getNamedTag("1.13 Acacia Wood")));
rewrite(55).repItem(new Item(37, (byte) 1, (short) -1, getNamedTag("1.13 Dark Oak Wood")));
rewrite(128).repItem(new Item(121, (byte) 1, (short) -1, getNamedTag("1.13 Prismarine Slab")));
rewrite(129).repItem(new Item(122, (byte) 1, (short) -1, getNamedTag("1.13 Prismarine Brick Slab")));
rewrite(130).repItem(new Item(123, (byte) 1, (short) -1, getNamedTag("1.13 Dark Prismarine Slab")));
rewrite(346).repItem(new Item(157, (byte) 1, (short) -1, getNamedTag("1.13 Prismarine Stairs")));
rewrite(347).repItem(new Item(216, (byte) 1, (short) -1, getNamedTag("1.13 Prismarine Brick Stairs")));
rewrite(348).repItem(new Item(217, (byte) 1, (short) -1, getNamedTag("1.13 Dark Prismarine Brick Stairs")));
//Spawn Eggs:
rewrite(643).repItem(new Item(662, (byte) 1, (short) -1, getNamedTag("1.13 Drowned Spawn Egg")));
rewrite(658).repItem(new Item(662, (byte) 1, (short) -1, getNamedTag("1.13 Phantom Spawn Egg")));
rewrite(641).repItem(new Item(662, (byte) 1, (short) -1, getNamedTag("1.13 Dolphin Spawn Egg")));
rewrite(674).repItem(new Item(662, (byte) 1, (short) -1, getNamedTag("1.13 Turtle Spawn Egg")));
rewrite(638).repItem(new Item(662, (byte) 1, (short) -1, getNamedTag("1.13 Cod Spawn Egg")));
rewrite(663).repItem(new Item(662, (byte) 1, (short) -1, getNamedTag("1.13 Salmon Spawn Egg")));
rewrite(661).repItem(new Item(662, (byte) 1, (short) -1, getNamedTag("1.13 Pufferfish Spawn Egg")));
rewrite(673).repItem(new Item(662, (byte) 1, (short) -1, getNamedTag("1.13 Tropical Fish Spawn Egg")));
//Corals
rewrite(438).repItem(new Item(100, (byte) 1, (short) -1, getNamedTag("1.13 Tube Coral")));
rewrite(439).repItem(new Item(106, (byte) 1, (short) -1, getNamedTag("1.13 Brain Coral")));
rewrite(440).repItem(new Item(101, (byte) 1, (short) -1, getNamedTag("1.13 Bubble Coral")));
rewrite(441).repItem(new Item(103, (byte) 1, (short) -1, getNamedTag("1.13 Fire Coral")));
rewrite(442).repItem(new Item(98, (byte) 1, (short) -1, getNamedTag("1.13 Horn Coral")));
rewrite(443).repItem(new Item(100, (byte) 1, (short) -1, getNamedTag("1.13 Tube Coral Fan")));
rewrite(444).repItem(new Item(106, (byte) 1, (short) -1, getNamedTag("1.13 Brain Coral Fan")));
rewrite(445).repItem(new Item(101, (byte) 1, (short) -1, getNamedTag("1.13 Bubble Coral Fan")));
rewrite(446).repItem(new Item(103, (byte) 1, (short) -1, getNamedTag("1.13 Fire Coral Fan")));
rewrite(447).repItem(new Item(98, (byte) 1, (short) -1, getNamedTag("1.13 Horn Coral Fan")));
rewrite(448).repItem(new Item(78, (byte) 1, (short) -1, getNamedTag("1.13 Dead Tube Coral Fan")));
rewrite(449).repItem(new Item(78, (byte) 1, (short) -1, getNamedTag("1.13 Dead Brain Coral Fan")));
rewrite(450).repItem(new Item(78, (byte) 1, (short) -1, getNamedTag("1.13 Dead Bubble Coral Fan")));
rewrite(451).repItem(new Item(78, (byte) 1, (short) -1, getNamedTag("1.13 Dead Fire Coral Fan")));
rewrite(452).repItem(new Item(78, (byte) 1, (short) -1, getNamedTag("1.13 Dead Horn Coral Fan")));
rewrite(428).repItem(new Item(90, (byte) 1, (short) -1, getNamedTag("1.13 Dead Tube Coral Block")));
rewrite(429).repItem(new Item(90, (byte) 1, (short) -1, getNamedTag("1.13 Dead Brain Coral Block")));
rewrite(430).repItem(new Item(90, (byte) 1, (short) -1, getNamedTag("1.13 Dead Bubble Coral Block")));
rewrite(431).repItem(new Item(90, (byte) 1, (short) -1, getNamedTag("1.13 Dead Fire Coral Block")));
rewrite(432).repItem(new Item(90, (byte) 1, (short) -1, getNamedTag("1.13 Dead Horn Coral Block")));
rewrite(433).repItem(new Item(93, (byte) 1, (short) -1, getNamedTag("1.13 Tube Coral Block")));
rewrite(434).repItem(new Item(88, (byte) 1, (short) -1, getNamedTag("1.13 Brain Coral Block")));
rewrite(435).repItem(new Item(92, (byte) 1, (short) -1, getNamedTag("1.13 Bubble Coral Block")));
rewrite(436).repItem(new Item(96, (byte) 1, (short) -1, getNamedTag("1.13 Fire Coral Block")));
rewrite(437).repItem(new Item(86, (byte) 1, (short) -1, getNamedTag("1.13 Horn Coral Block")));
// Coral End
rewrite(131).repItem(new Item(711, (byte) 1, (short) -1, getNamedTag("1.13 Smooth Quartz")));
rewrite(132).repItem(new Item(350, (byte) 1, (short) -1, getNamedTag("1.13 Smooth Red Sandstone")));
rewrite(133).repItem(new Item(68, (byte) 1, (short) -1, getNamedTag("1.13 Smooth Sandstone")));
rewrite(134).repItem(new Item(118, (byte) 1, (short) -1, getNamedTag("1.13 Smooth Stone")));
rewrite(181).repItem(new Item(182, (byte) 1, (short) -1, getNamedTag("1.13 Carved Pumpkin")));
rewrite(205).repItem(new Item(90, (byte) 1, (short) -1, getNamedTag("1.13 Mushroom Stem")));
rewrite(768).repItem(new Item(492, (byte) 1, (short) -1, getNamedTag("1.13 Debug Stick")));
enchantmentMappings.put("minecraft:loyalty", "§7Loyalty");
enchantmentMappings.put("minecraft:impaling", "§7Impaling");
enchantmentMappings.put("minecraft:riptide", "§7Riptide");
@ -615,7 +487,9 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
@Override
public Item handleItemToClient(Item item) {
if (item == null) return null;
item = super.handleItemToClient(item);
// Custom mappings/super call moved down
int originalId = item.getIdentifier();
Integer rawId = null;
boolean gotRawIdFromTag = false;
@ -656,10 +530,24 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
}
if (rawId == null) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
ViaBackwards.getPlatform().getLogger().warning("Failed to get 1.12 item for " + item.getIdentifier());
// Look for custom mappings
super.handleItemToClient(item);
// No custom mapping found either
if (item.getIdentifier() == originalId) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
ViaBackwards.getPlatform().getLogger().warning("Failed to get 1.12 item for " + originalId);
}
rawId = 0x10000;
} else {
// Use the custom mapping
rawId = (item.getIdentifier() >> 4) << 16 | item.getIdentifier() & 0xF;
// Take the newly added tag
if (tag == null) {
tag = item.getTag();
}
}
rawId = 0x10000; // Stone
}
item.setIdentifier(rawId >> 16);
@ -700,10 +588,11 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
}
}
}
// Display Name now uses JSON
if (tag.get("display") instanceof CompoundTag) {
CompoundTag display = tag.get("display");
if (((CompoundTag) tag.get("display")).get("Name") instanceof StringTag) {
if (display.get("Name") instanceof StringTag) {
StringTag name = display.get("Name");
StringTag via = display.get(NBT_TAG_NAME + "|Name");
name.setValue(via != null ? via.getValue() : ChatRewriter.jsonTextToLegacy(name.getValue()));
@ -895,11 +784,7 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
StringTag name = displayTag.get("Name");
if (name instanceof StringTag) {
displayTag.put(new StringTag(NBT_TAG_NAME + "|Name", name.getValue()));
name.setValue(
ChatRewriter.legacyTextToJson(
name.getValue()
)
);
name.setValue(ChatRewriter.legacyTextToJson(name.getValue()));
}
}
@ -938,6 +823,10 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
}
}
super.handleItemToServer(item);
// Mapped with original data, we can return here
if (item.getIdentifier() != rawId) return item;
int newId = -1;
if (!MappingData.oldToNewItems.containsKey(rawId)) {
if (!isDamageable(item.getIdentifier()) && item.getIdentifier() != 358) { // Map
@ -965,7 +854,6 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
item.setIdentifier(newId);
item.setData((short) 0);
item = super.handleItemToServer(item);
return item;
}

Datei anzeigen

@ -1,6 +1,7 @@
package nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.data;
import nl.matsv.viabackwards.ViaBackwards;
import nl.matsv.viabackwards.api.data.VBItemMappings;
import nl.matsv.viabackwards.api.data.VBMappingDataLoader;
import nl.matsv.viabackwards.api.data.VBMappings;
import us.myles.ViaVersion.api.data.MappingDataLoader;
@ -11,6 +12,7 @@ public class BackwardsMappings {
public static Mappings blockStateMappings;
public static Mappings blockMappings;
public static Mappings soundMappings;
public static VBItemMappings itemMappings;
public static void init() {
JsonObject mapping1_13_2 = MappingDataLoader.loadData("mapping-1.13.2.json");
@ -20,6 +22,7 @@ public class BackwardsMappings {
ViaBackwards.getPlatform().getLogger().info("Loading 1.14 -> 1.13.2 block mapping...");
blockStateMappings = new VBMappings(mapping1_14.getAsJsonObject("blockstates"), mapping1_13_2.getAsJsonObject("blockstates"), mapping1_13_2to1_14.getAsJsonObject("blockstates"));
blockMappings = new VBMappings(mapping1_14.getAsJsonObject("blocks"), mapping1_13_2.getAsJsonObject("blocks"), mapping1_13_2to1_14.getAsJsonObject("blocks"), false);
itemMappings = new VBItemMappings(mapping1_14.getAsJsonObject("items"), mapping1_13_2.getAsJsonObject("items"), mapping1_13_2to1_14.getAsJsonObject("items"));
soundMappings = new VBMappings(mapping1_14.getAsJsonArray("sounds"), mapping1_13_2.getAsJsonArray("sounds"), mapping1_13_2to1_14.getAsJsonObject("sounds"));
}
}

Datei anzeigen

@ -1,6 +1,7 @@
package nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.data;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.ItemRewriterBase;
import nl.matsv.viabackwards.api.rewriters.LegacyBlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.RecipeRewriter;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.minecraft.item.Item;
@ -8,7 +9,7 @@ import us.myles.ViaVersion.api.type.Type;
public class RecipeRewriter1_14 extends RecipeRewriter {
public RecipeRewriter1_14(final BlockItemRewriter rewriter) {
public RecipeRewriter1_14(final ItemRewriterBase rewriter) {
super(rewriter);
}

Datei anzeigen

@ -3,10 +3,10 @@ package nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.packets;
import com.google.common.collect.ImmutableSet;
import nl.matsv.viabackwards.ViaBackwards;
import nl.matsv.viabackwards.api.entities.storage.EntityTracker;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.EnchantmentRewriter;
import nl.matsv.viabackwards.api.rewriters.RecipeRewriter;
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.Protocol1_13_2To1_14;
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.data.BackwardsMappings;
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.data.RecipeRewriter1_14;
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.storage.ChunkLightStorage;
import us.myles.ViaVersion.api.PacketWrapper;
@ -43,12 +43,12 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14> {
public class BlockItemPackets1_14 extends nl.matsv.viabackwards.api.rewriters.ItemRewriter<Protocol1_13_2To1_14> {
private EnchantmentRewriter enchantmentRewriter;
public BlockItemPackets1_14(Protocol1_13_2To1_14 protocol) {
super(protocol);
super(protocol, BlockItemPackets1_14::getOldItemId, BlockItemPackets1_14::getNewItemId, id -> BackwardsMappings.itemMappings.getMappedItem(id));
}
@Override
@ -530,106 +530,6 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
@Override
protected void registerRewrites() {
rewrite(247).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Brick Wall")));
rewrite(248).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Prismarine Wall")));
rewrite(249).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Red Sandstone Wall")));
rewrite(250).repItem(new Item(246, (byte) 1, (short) -1, getNamedTag("1.14 Mossy Stone Brick Wall")));
rewrite(251).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Granite Wall")));
rewrite(252).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Stone Brick Wall")));
rewrite(253).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Nether Brick Wall")));
rewrite(254).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Andesite Wall")));
rewrite(255).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Red Nether Brick Wall")));
rewrite(256).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Sandstone Wall")));
rewrite(257).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 End Stone Brick Wall")));
rewrite(258).repItem(new Item(245, (byte) 1, (short) -1, getNamedTag("1.14 Diorite Wall")));
rewrite(121).repItem(new Item(126, (byte) 1, (short) -1, getNamedTag("1.14 Stone Slab")));
rewrite(124).repItem(new Item(123, (byte) 1, (short) -1, getNamedTag("1.14 Cut Sandstone Slab")));
rewrite(132).repItem(new Item(131, (byte) 1, (short) -1, getNamedTag("1.14 Cut Red Sandstone Slab")));
rewrite(492).repItem(new Item(126, (byte) 1, (short) -1, getNamedTag("1.14 Polished Granite Slab")));
rewrite(493).repItem(new Item(131, (byte) 1, (short) -1, getNamedTag("1.14 Smooth Red Sandstone Slab")));
rewrite(494).repItem(new Item(126, (byte) 1, (short) -1, getNamedTag("1.14 Mossy Stone Brick Slab")));
rewrite(495).repItem(new Item(126, (byte) 1, (short) -1, getNamedTag("1.14 Polished Diorite Slab")));
rewrite(496).repItem(new Item(126, (byte) 1, (short) -1, getNamedTag("1.14 Mossy Cobblestone Slab")));
rewrite(497).repItem(new Item(123, (byte) 1, (short) -1, getNamedTag("1.14 End Stone Brick Slab")));
rewrite(498).repItem(new Item(123, (byte) 1, (short) -1, getNamedTag("1.14 Smooth Cut Sandstone Slab")));
rewrite(499).repItem(new Item(130, (byte) 1, (short) -1, getNamedTag("1.14 Smooth Quartz Slab")));
rewrite(500).repItem(new Item(126, (byte) 1, (short) -1, getNamedTag("1.14 Granite Slab")));
rewrite(501).repItem(new Item(126, (byte) 1, (short) -1, getNamedTag("1.14 Andesite Slab")));
rewrite(502).repItem(new Item(129, (byte) 1, (short) -1, getNamedTag("1.14 Red Nether Brick Slab")));
rewrite(503).repItem(new Item(126, (byte) 1, (short) -1, getNamedTag("1.14 Polished Andesite Slab")));
rewrite(504).repItem(new Item(126, (byte) 1, (short) -1, getNamedTag("1.14 Diorite Slab")));
rewrite(478).repItem(new Item(163, (byte) 1, (short) -1, getNamedTag("1.14 Polished Granite Stairs")));
rewrite(479).repItem(new Item(371, (byte) 1, (short) -1, getNamedTag("1.14 Smooth Red Sandstone Stairs")));
rewrite(480).repItem(new Item(163, (byte) 1, (short) -1, getNamedTag("1.14 Mossy Stone Brick Stairs")));
rewrite(481).repItem(new Item(163, (byte) 1, (short) -1, getNamedTag("1.14 Polished Diorite Stairs")));
rewrite(482).repItem(new Item(163, (byte) 1, (short) -1, getNamedTag("1.14 Mossy Cobblestone Stairs")));
rewrite(483).repItem(new Item(235, (byte) 1, (short) -1, getNamedTag("1.14 End Stone Brick Stairs")));
rewrite(484).repItem(new Item(163, (byte) 1, (short) -1, getNamedTag("1.14 Stone Stairs")));
rewrite(485).repItem(new Item(235, (byte) 1, (short) -1, getNamedTag("1.14 Smooth Sandstone Stairs")));
rewrite(486).repItem(new Item(278, (byte) 1, (short) -1, getNamedTag("1.14 Smooth Quartz Stairs")));
rewrite(487).repItem(new Item(163, (byte) 1, (short) -1, getNamedTag("1.14 Granite Stairs")));
rewrite(488).repItem(new Item(163, (byte) 1, (short) -1, getNamedTag("1.14 Andesite Stairs")));
rewrite(489).repItem(new Item(228, (byte) 1, (short) -1, getNamedTag("1.14 Red Nether Brick Stairs")));
rewrite(490).repItem(new Item(163, (byte) 1, (short) -1, getNamedTag("1.14 Polished Andesite Stairs")));
rewrite(491).repItem(new Item(163, (byte) 1, (short) -1, getNamedTag("1.14 Diorite Stairs")));
rewrite(108).repItem(new Item(111, (byte) 1, (short) -1, getNamedTag("1.14 Cornflower")));
rewrite(109).repItem(new Item(105, (byte) 1, (short) -1, getNamedTag("1.14 Lily of the Valley")));
rewrite(110).repItem(new Item(100, (byte) 1, (short) -1, getNamedTag("1.14 Wither Rose")));
rewrite(614).repItem(new Item(611, (byte) 1, (short) -1, getNamedTag("1.14 Bamboo")));
rewrite(857).repItem(new Item(547, (byte) 1, (short) -1, getNamedTag("1.14 Suspicious Stew")));
rewrite(795).repItem(new Item(793, (byte) 1, (short) -1, getNamedTag("1.14 Leather Horse Armor")));
rewrite(647).repItem(new Item(635, (byte) 1, (short) -1, getNamedTag("1.14 Blue Dye")));
rewrite(648).repItem(new Item(634, (byte) 1, (short) -1, getNamedTag("1.14 Brown Dye")));
rewrite(649).repItem(new Item(631, (byte) 1, (short) -1, getNamedTag("1.14 Black Dye")));
rewrite(650).repItem(new Item(646, (byte) 1, (short) -1, getNamedTag("1.14 White Dye")));
rewrite(505).repItem(new Item(299, (byte) 1, (short) -1, getNamedTag("1.14 Scaffolding")));
rewrite(516).repItem(new Item(515, (byte) 1, (short) -1, getNamedTag("1.14 Jigsaw Block")));
rewrite(517).repItem(new Item(694, (byte) 1, (short) -1, getNamedTag("1.14 Composter")));
rewrite(864).repItem(new Item(155, (byte) 1, (short) -1, getNamedTag("1.14 Barrel")));
rewrite(858).repItem(new Item(158, (byte) 1, (short) -1, getNamedTag("1.14 Loom")));
rewrite(865).repItem(new Item(160, (byte) 1, (short) -1, getNamedTag("1.14 Smoker")));
rewrite(866).repItem(new Item(160, (byte) 1, (short) -1, getNamedTag("1.14 Blast Furnace")));
rewrite(867).repItem(new Item(158, (byte) 1, (short) -1, getNamedTag("1.14 Cartography Table")));
rewrite(868).repItem(new Item(158, (byte) 1, (short) -1, getNamedTag("1.14 Fletching Table")));
rewrite(869).repItem(new Item(265, (byte) 1, (short) -1, getNamedTag("1.14 Grindstone")));
rewrite(870).repItem(new Item(143, (byte) 1, (short) -1, getNamedTag("1.14 Lectern")));
rewrite(871).repItem(new Item(158, (byte) 1, (short) -1, getNamedTag("1.14 Smithing Table")));
rewrite(872).repItem(new Item(158, (byte) 1, (short) -1, getNamedTag("1.14 Stonecutter")));
rewrite(859).repItem(new Item(615, (byte) 1, (short) -1, getNamedTag("1.14 Flower Banner Pattern")));
rewrite(860).repItem(new Item(615, (byte) 1, (short) -1, getNamedTag("1.14 Creeper Banner Pattern")));
rewrite(861).repItem(new Item(615, (byte) 1, (short) -1, getNamedTag("1.14 Skull Banner Pattern")));
rewrite(862).repItem(new Item(615, (byte) 1, (short) -1, getNamedTag("1.14 Mojang Banner Pattern")));
rewrite(863).repItem(new Item(615, (byte) 1, (short) -1, getNamedTag("1.14 Globe Banner Pattern")));
rewrite(873).repItem(new Item(113, (byte) 1, (short) -1, getNamedTag("1.14 Bell")));
rewrite(874).repItem(new Item(234, (byte) 1, (short) -1, getNamedTag("1.14 Lantern")));
rewrite(875).repItem(new Item(820, (byte) 1, (short) -1, getNamedTag("1.14 Sweet Berries")));
rewrite(876).repItem(new Item(146, (byte) 1, (short) -1, getNamedTag("1.14 Campfire")));
rewrite(590).repItem(new Item(589, (byte) 1, (short) -1, getNamedTag("1.14 Spruce Sign")));
rewrite(591).repItem(new Item(589, (byte) 1, (short) -1, getNamedTag("1.14 Birch Sign")));
rewrite(592).repItem(new Item(589, (byte) 1, (short) -1, getNamedTag("1.14 Jungle Sign")));
rewrite(593).repItem(new Item(589, (byte) 1, (short) -1, getNamedTag("1.14 Acacia Sign")));
rewrite(594).repItem(new Item(589, (byte) 1, (short) -1, getNamedTag("1.14 Dark Oak Sign")));
rewrite(856).repItem(new Item(525, (byte) 1, (short) -1, getNamedTag("1.14 Crossbow")));
rewrite(699).repItem(new Item(721, (byte) 1, (short) -1, getNamedTag("1.14 Cat Spawn Egg")));
rewrite(712).repItem(new Item(725, (byte) 1, (short) -1, getNamedTag("1.14 Fox Spawn Egg")));
rewrite(722).repItem(new Item(735, (byte) 1, (short) -1, getNamedTag("1.14 Panda Spawn Egg")));
rewrite(726).repItem(new Item(754, (byte) 1, (short) -1, getNamedTag("1.14 Pillager Spawn Egg")));
rewrite(730).repItem(new Item(734, (byte) 1, (short) -1, getNamedTag("1.14 Ravager Spawn Egg")));
rewrite(741).repItem(new Item(698, (byte) 1, (short) -1, getNamedTag("1.14 Trader Llama Spawn Egg")));
rewrite(747).repItem(new Item(739, (byte) 1, (short) -1, getNamedTag("1.14 Wandering Trader Spawn Egg")));
enchantmentRewriter = new EnchantmentRewriter(nbtTagName);
enchantmentRewriter.registerEnchantment("minecraft:multishot", "§7Multishot");
enchantmentRewriter.registerEnchantment("minecraft:quick_charge", "§7Quick Charge");
@ -637,10 +537,9 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
}
@Override
public Item handleItemToClient(Item i) {
Item item = super.handleItemToClient(i);
public Item handleItemToClient(Item item) {
if (item == null) return null;
item.setIdentifier(getOldItemId(item.getIdentifier()));
super.handleItemToClient(item);
CompoundTag tag;
if ((tag = item.getTag()) != null) {
@ -680,8 +579,7 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
@Override
public Item handleItemToServer(Item item) {
if (item == null) return null;
item.setIdentifier(getNewItemId(item.getIdentifier()));
item = super.handleItemToServer(item);
super.handleItemToServer(item);
CompoundTag tag;
if ((tag = item.getTag()) != null) {
@ -693,11 +591,7 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
display.put(ConverterRegistry.convertToTag(nbtTagName + "|Lore", ConverterRegistry.convertToValue(lore)));
for (Tag loreEntry : lore) {
if (loreEntry instanceof StringTag) {
((StringTag) loreEntry).setValue(
ChatRewriter.legacyTextToJson(
((StringTag) loreEntry).getValue()
)
);
((StringTag) loreEntry).setValue(ChatRewriter.legacyTextToJson(((StringTag) loreEntry).getValue()));
}
}
}

Datei anzeigen

@ -1,6 +1,7 @@
package nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data;
import nl.matsv.viabackwards.ViaBackwards;
import nl.matsv.viabackwards.api.data.VBItemMappings;
import nl.matsv.viabackwards.api.data.VBMappingDataLoader;
import nl.matsv.viabackwards.api.data.VBMappings;
import us.myles.ViaVersion.api.data.MappingDataLoader;
@ -11,6 +12,7 @@ public class BackwardsMappings {
public static Mappings blockStateMappings;
public static Mappings blockMappings;
public static Mappings soundMappings;
public static VBItemMappings itemMappings;
public static void init() {
JsonObject mapping1_14 = MappingDataLoader.loadData("mapping-1.14.json");
@ -20,6 +22,7 @@ public class BackwardsMappings {
ViaBackwards.getPlatform().getLogger().info("Loading 1.15 -> 1.14.4 mappings...");
blockStateMappings = new VBMappings(mapping1_15.getAsJsonObject("blockstates"), mapping1_14.getAsJsonObject("blockstates"), mapping1_14to1_15.getAsJsonObject("blockstates"));
blockMappings = new VBMappings(mapping1_15.getAsJsonObject("blocks"), mapping1_14.getAsJsonObject("blocks"), mapping1_14to1_15.getAsJsonObject("blocks"), false);
itemMappings = new VBItemMappings(mapping1_15.getAsJsonObject("items"), mapping1_14.getAsJsonObject("items"), mapping1_14to1_15.getAsJsonObject("items"));
soundMappings = new VBMappings(mapping1_15.getAsJsonArray("sounds"), mapping1_14.getAsJsonArray("sounds"), mapping1_14to1_15.getAsJsonObject("sounds"));
}
}

Datei anzeigen

@ -1,6 +1,6 @@
package nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.ItemRewriterBase;
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.data.RecipeRewriter1_14;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.minecraft.item.Item;
@ -8,7 +8,7 @@ import us.myles.ViaVersion.api.type.Type;
public class RecipeRewriter1_15 extends RecipeRewriter1_14 {
public RecipeRewriter1_15(final BlockItemRewriter rewriter) {
public RecipeRewriter1_15(final ItemRewriterBase rewriter) {
super(rewriter);
}

Datei anzeigen

@ -1,9 +1,9 @@
package nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.packets;
import nl.matsv.viabackwards.ViaBackwards;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.RecipeRewriter;
import nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.Protocol1_14_4To1_15;
import nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data.BackwardsMappings;
import nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data.ParticleMapping;
import nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data.RecipeRewriter1_15;
import us.myles.ViaVersion.api.PacketWrapper;
@ -21,10 +21,10 @@ import us.myles.ViaVersion.protocols.protocol1_15to1_14_4.data.MappingData;
import us.myles.ViaVersion.protocols.protocol1_15to1_14_4.types.Chunk1_15Type;
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
public class BlockItemPackets1_15 extends BlockItemRewriter<Protocol1_14_4To1_15> {
public class BlockItemPackets1_15 extends nl.matsv.viabackwards.api.rewriters.ItemRewriter<Protocol1_14_4To1_15> {
public BlockItemPackets1_15(Protocol1_14_4To1_15 protocol) {
super(protocol);
super(protocol, BlockItemPackets1_15::getOldItemId, BlockItemPackets1_15::getNewItemId, id -> BackwardsMappings.itemMappings.getMappedItem(id));
}
@Override
@ -213,31 +213,8 @@ public class BlockItemPackets1_15 extends BlockItemRewriter<Protocol1_14_4To1_15
@Override
protected void registerRewrites() {
rewrite(881).repItem(new Item(824, (byte) 1, (short) -1, getNamedTag("1.15 Honey Bottle")));
rewrite(878).repItem(new Item(323, (byte) 1, (short) -1, getNamedTag("1.15 Honeycomb")));
rewrite(883).repItem(new Item(455, (byte) 1, (short) -1, getNamedTag("1.15 Honeycomb Block")));
rewrite(879).repItem(new Item(385, (byte) 1, (short) -1, getNamedTag("1.15 Bee Nest")));
rewrite(880).repItem(new Item(865, (byte) 1, (short) -1, getNamedTag("1.15 Beehive")));
rewrite(882).repItem(new Item(321, (byte) 1, (short) -1, getNamedTag("1.15 Honey Block")));
rewrite(698).repItem(new Item(722, (byte) 1, (short) -1, getNamedTag("1.15 Bee Spawn Egg")));
}
@Override
public Item handleItemToClient(Item i) {
Item item = super.handleItemToClient(i);
if (item == null) return null;
item.setIdentifier(getOldItemId(item.getIdentifier()));
return item;
}
@Override
public Item handleItemToServer(Item item) {
if (item == null) return null;
item.setIdentifier(getNewItemId(item.getIdentifier()));
return super.handleItemToServer(item);
}
public static int getNewItemId(int id) {
Integer newId = MappingData.oldToNewItems.get(id);
if (newId == null) {

Datei anzeigen

@ -10,7 +10,7 @@
package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
import nl.matsv.viabackwards.api.rewriters.LegacyBlockItemRewriter;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9_4To1_10;
import nl.matsv.viabackwards.utils.Block;
import us.myles.ViaVersion.api.PacketWrapper;
@ -26,7 +26,7 @@ import us.myles.ViaVersion.packets.State;
import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.types.Chunk1_9_3_4Type;
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
public class BlockItemPackets1_10 extends BlockItemRewriter<Protocol1_9_4To1_10> {
public class BlockItemPackets1_10 extends LegacyBlockItemRewriter<Protocol1_9_4To1_10> {
public BlockItemPackets1_10(Protocol1_9_4To1_10 protocol) {
super(protocol);
@ -34,7 +34,6 @@ public class BlockItemPackets1_10 extends BlockItemRewriter<Protocol1_9_4To1_10>
@Override
protected void registerPackets() {
jsonNameFormat = false;
ItemRewriter itemRewriter = new ItemRewriter(protocol, this::handleItemToClient, this::handleItemToServer);
// Set slot packet

Datei anzeigen

@ -0,0 +1,48 @@
{
"1.11": {
"218": {
"id": 23,
"name": "1.11 Observer"
},
"449": {
"id": 32,
"name": "1.11 Totem of Undying"
},
"450": {
"id": 433,
"name": "1.11 Shulker Shell"
},
"219-234": {
"id": 158,
"name": "1.11 %color% Shulker Box"
}
},
"1.10": {
"255": {
"id": 166,
"name": "1.10 Structure Block"
},
"217": {
"id": 287,
"name": "1.10 Structure Void"
},
"213": {
"id": 159,
"data": 1,
"name": "1.10 Magma Block"
},
"214": {
"id": 159,
"data": 14,
"name": "1.10 Nether Wart Block"
},
"215": {
"id": 112,
"name": "1.10 Red Nether Bricks"
},
"216": {
"id": 155,
"name": "1.10 Bone Block"
}
}
}

Datei anzeigen

@ -5436,6 +5436,416 @@
"minecraft:dragon_head[rotation=14]": "id:2305",
"minecraft:dragon_head[rotation=15]": "id:2305"
},
"items": {
"minecraft:acacia_button": {
"id": "minecraft:oak_button",
"name": "1.13 Acacia Button"
},
"minecraft:birch_button": {
"id": "minecraft:oak_button",
"name": "1.13 Birch Button"
},
"minecraft:spruce_button": {
"id": "minecraft:oak_button",
"name": "1.13 Spruce Button"
},
"minecraft:jungle_button": {
"id": "minecraft:oak_button",
"name": "1.13 Jungle Button"
},
"minecraft:dark_oak_button": {
"id": "minecraft:oak_button",
"name": "1.13 Dark Oak Button"
},
"minecraft:acacia_trapdoor": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Acacia Trapdoor"
},
"minecraft:birch_trapdoor": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Birch Trapdoor"
},
"minecraft:spruce_trapdoor": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Spruce Trapdoor"
},
"minecraft:jungle_trapdoor": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Jungle Trapdoor"
},
"minecraft:dark_oak_trapdoor": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Dark Oak Trapdoor"
},
"minecraft:acacia_pressure_plate": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Acacia Pressure Plate"
},
"minecraft:birch_pressure_plate": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Birch Pressure Plate"
},
"minecraft:spruce_pressure_plate": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Spruce Pressure Plate"
},
"minecraft:jungle_pressure_plate": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Jungle Pressure Plate"
},
"minecraft:dark_oak_pressure_plate": {
"id": "minecraft:oak_trapdoor",
"name": "1.13 Dark Oak Pressure Plate"
},
"minecraft:acacia_boat": {
"id": "minecraft:oak_boat",
"name": "1.13 Acacia Boat"
},
"minecraft:birch_boat": {
"id": "minecraft:oak_boat",
"name": "1.13 Birch Boat"
},
"minecraft:spruce_boat": {
"id": "minecraft:oak_boat",
"name": "1.13 Spruce Boat"
},
"minecraft:jungle_boat": {
"id": "minecraft:oak_boat",
"name": "1.13 Jungle Boat"
},
"minecraft:dark_oak_boat": {
"id": "minecraft:oak_boat",
"name": "1.13 Dark Oak Boat"
},
"minecraft:blue_ice": {
"id": "minecraft:packed_ice",
"name": "1.13 Blue Ice"
},
"minecraft:pufferfish_bucket": {
"id": "minecraft:water_bucket",
"name": "1.13 Bucket of Pufferfish"
},
"minecraft:salmon_bucket": {
"id": "minecraft:water_bucket",
"name": "1.13 Bucket of Salmon"
},
"minecraft:cod_bucket": {
"id": "minecraft:water_bucket",
"name": "1.13 Bucket of Cod"
},
"minecraft:tropical_fish_bucket": {
"id": "minecraft:water_bucket",
"name": "1.13 Bucket of Tropical Fish"
},
"minecraft:heart_of_the_sea": {
"id": "minecraft:snowball",
"name": "1.13 Heart of the Sea"
},
"minecraft:nautilus_shell": {
"id": "minecraft:bone_meal",
"name": "1.13 Nautilus Shell"
},
"minecraft:phantom_membrane": {
"id": "minecraft:leather",
"name": "1.13 Phantom Membrane"
},
"minecraft:turtle_helmet": {
"id": "minecraft:leather_helmet",
"name": "1.13 Turtle Shell"
},
"minecraft:turtle_egg": {
"id": "minecraft:egg",
"name": "1.13 Turtle Egg"
},
"minecraft:scute": {
"id": "minecraft:lime_dye",
"name": "1.13 Scute"
},
"minecraft:trident": {
"id": "minecraft:diamond_sword",
"name": "1.13 Trident"
},
"minecraft:sea_pickle": {
"id": "minecraft:egg",
"name": "1.13 Sea Pickle"
},
"minecraft:seagrass": {
"id": "minecraft:grass",
"name": "1.13 Seagrass"
},
"minecraft:conduit": {
"id": "minecraft:beacon",
"name": "1.13 Conduit"
},
"minecraft:kelp": {
"id": "minecraft:grass",
"name": "1.13 Kelp"
},
"minecraft:dried_kelp": {
"id": "minecraft:wheat",
"name": "1.13 Dried Kelp"
},
"minecraft:dried_kelp_block": {
"id": "minecraft:hay_block",
"name": "1.13 Dried Kelp Block"
},
"minecraft:stripped_oak_log": {
"id": "minecraft:oak_log",
"name": "1.13 Stripped Oak Log"
},
"minecraft:stripped_acacia_log": {
"id": "minecraft:acacia_log",
"name": "1.13 Stripped Acacia Log"
},
"minecraft:stripped_birch_log": {
"id": "minecraft:birch_log",
"name": "1.13 Stripped Birch Log"
},
"minecraft:stripped_spruce_log": {
"id": "minecraft:spruce_log",
"name": "1.13 Stripped Spruce Log"
},
"minecraft:stripped_jungle_log": {
"id": "minecraft:jungle_log",
"name": "1.13 Stripped Jungle Log"
},
"minecraft:stripped_dark_oak_log": {
"id": "minecraft:dark_oak_log",
"name": "1.13 Stripped Dark Oak Log"
},
"minecraft:stripped_oak_wood": {
"id": "minecraft:oak_log",
"name": "1.13 Stripped Oak Wood"
},
"minecraft:stripped_acacia_wood": {
"id": "minecraft:acacia_log",
"name": "1.13 Stripped Acacia Wood"
},
"minecraft:stripped_birch_wood": {
"id": "minecraft:birch_log",
"name": "1.13 Stripped Birch Wood"
},
"minecraft:stripped_spruce_wood": {
"id": "minecraft:spruce_log",
"name": "1.13 Stripped Spruce Wood"
},
"minecraft:stripped_jungle_wood": {
"id": "minecraft:jungle_log",
"name": "1.13 Stripped Jungle Wood"
},
"minecraft:stripped_dark_oak_wood": {
"id": "minecraft:dark_oak_log",
"name": "1.13 Stripped Dark Oak Wood"
},
"minecraft:oak_wood": {
"id": "minecraft:oak_log",
"name": "1.13 Oak Wood"
},
"minecraft:spruce_wood": {
"id": "minecraft:spruce_log",
"name": "1.13 Spruce Wood"
},
"minecraft:birch_wood": {
"id": "minecraft:birch_log",
"name": "1.13 Birch Wood"
},
"minecraft:jungle_wood": {
"id": "minecraft:jungle_log",
"name": "1.13 Jungle Wood"
},
"minecraft:acacia_wood": {
"id": "minecraft:acacia_log",
"name": "1.13 Acacia Wood"
},
"minecraft:dark_oak_wood": {
"id": "minecraft:dark_oak_log",
"name": "1.13 Dark Oak Wood"
},
"minecraft:prismarine_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.13 Prismarine Slab"
},
"minecraft:prismarine_brick_slab": {
"id": "minecraft:brick_slab",
"name": "1.13 Prismarine Brick Slab"
},
"minecraft:dark_prismarine_slab": {
"id": "minecraft:stone_brick_slab",
"name": "1.13 Dark Prismarine Slab"
},
"minecraft:prismarine_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.13 Prismarine Stairs"
},
"minecraft:prismarine_brick_stairs": {
"id": "minecraft:brick_stairs",
"name": "1.13 Prismarine Brick Stairs"
},
"minecraft:dark_prismarine_stairs": {
"id": "minecraft:stone_brick_stairs",
"name": "1.13 Dark Prismarine Brick Stairs"
},
"minecraft:drowned_spawn_egg": {
"id": "minecraft:rabbit_spawn_egg",
"name": "1.13 Drowned Spawn Egg"
},
"minecraft:phantom_spawn_egg": {
"id": "minecraft:rabbit_spawn_egg",
"name": "1.13 Phantom Spawn Egg"
},
"minecraft:dolphin_spawn_egg": {
"id": "minecraft:rabbit_spawn_egg",
"name": "1.13 Dolphin Spawn Egg"
},
"minecraft:turtle_spawn_egg": {
"id": "minecraft:rabbit_spawn_egg",
"name": "1.13 Turtle Spawn Egg"
},
"minecraft:cod_spawn_egg": {
"id": "minecraft:rabbit_spawn_egg",
"name": "1.13 Cod Spawn Egg"
},
"minecraft:salmon_spawn_egg": {
"id": "minecraft:rabbit_spawn_egg",
"name": "1.13 Salmon Spawn Egg"
},
"minecraft:pufferfish_spawn_egg": {
"id": "minecraft:rabbit_spawn_egg",
"name": "1.13 Pufferfish Spawn Egg"
},
"minecraft:tropical_fish_spawn_egg": {
"id": "minecraft:rabbit_spawn_egg",
"name": "1.13 Tropical Fish Spawn Egg"
},
"minecraft:tube_coral": {
"id": "minecraft:blue_orchid",
"name": "1.13 Tube Coral"
},
"minecraft:brain_coral": {
"id": "minecraft:pink_tulip",
"name": "1.13 Brain Coral"
},
"minecraft:bubble_coral": {
"id": "minecraft:allium",
"name": "1.13 Bubble Coral"
},
"minecraft:fire_coral": {
"id": "minecraft:red_tulip",
"name": "1.13 Fire Coral"
},
"minecraft:horn_coral": {
"id": "minecraft:dandelion",
"name": "1.13 Horn Coral"
},
"minecraft:tube_coral_fan": {
"id": "minecraft:blue_orchid",
"name": "1.13 Tube Coral Fan"
},
"minecraft:brain_coral_fan": {
"id": "minecraft:pink_tulip",
"name": "1.13 Brain Coral Fan"
},
"minecraft:bubble_coral_fan": {
"id": "minecraft:allium",
"name": "1.13 Bubble Coral Fan"
},
"minecraft:fire_coral_fan": {
"id": "minecraft:red_tulip",
"name": "1.13 Fire Coral Fan"
},
"minecraft:horn_coral_fan": {
"id": "minecraft:dandelion",
"name": "1.13 Horn Coral Fan"
},
"minecraft:dead_tube_coral_fan": {
"id": "minecraft:dead_bush",
"name": "1.13 Dead Tube Coral Fan"
},
"minecraft:dead_brain_coral_fan": {
"id": "minecraft:dead_bush",
"name": "1.13 Dead Brain Coral Fan"
},
"minecraft:dead_bubble_coral_fan": {
"id": "minecraft:dead_bush",
"name": "1.13 Dead Bubble Coral Fan"
},
"minecraft:dead_fire_coral_fan": {
"id": "minecraft:dead_bush",
"name": "1.13 Dead Fire Coral Fan"
},
"minecraft:dead_horn_coral_fan": {
"id": "minecraft:dead_bush",
"name": "1.13 Dead Horn Coral Fan"
},
"minecraft:dead_tube_coral_block": {
"id": "minecraft:light_gray_wool",
"name": "1.13 Dead Tube Coral Block"
},
"minecraft:dead_brain_coral_block": {
"id": "minecraft:light_gray_wool",
"name": "1.13 Dead Brain Coral Block"
},
"minecraft:dead_bubble_coral_block": {
"id": "minecraft:light_gray_wool",
"name": "1.13 Dead Bubble Coral Block"
},
"minecraft:dead_fire_coral_block": {
"id": "minecraft:light_gray_wool",
"name": "1.13 Dead Fire Coral Block"
},
"minecraft:dead_horn_coral_block": {
"id": "minecraft:light_gray_wool",
"name": "1.13 Dead Horn Coral Block"
},
"minecraft:tube_coral_block": {
"id": "minecraft:blue_wool",
"name": "1.13 Tube Coral Block"
},
"minecraft:brain_coral_block": {
"id": "minecraft:pink_wool",
"name": "1.13 Brain Coral Block"
},
"minecraft:bubble_coral_block": {
"id": "minecraft:purple_wool",
"name": "1.13 Bubble Coral Block"
},
"minecraft:fire_coral_block": {
"id": "minecraft:red_wool",
"name": "1.13 Fire Coral Block"
},
"minecraft:horn_coral_block": {
"id": "minecraft:yellow_wool",
"name": "1.13 Horn Coral Block"
},
"minecraft:smooth_quartz": {
"id": "minecraft:quartz",
"name": "1.13 Smooth Quartz"
},
"minecraft:smooth_red_sandstone": {
"id": "minecraft:red_sandstone",
"name": "1.13 Smooth Red Sandstone"
},
"minecraft:smooth_sandstone": {
"id": "minecraft:sandstone",
"name": "1.13 Smooth Sandstone"
},
"minecraft:smooth_stone": {
"id": "minecraft:stone_slab",
"name": "1.13 Smooth Stone"
},
"minecraft:pumpkin": {
"id": "minecraft:carved_pumpkin",
"name": "1.13 Carved Pumpkin"
},
"minecraft:mushroom_stem": {
"id": "minecraft:light_gray_wool",
"name": "1.13 Mushroom Stem"
},
"minecraft:debug_stick": {
"id": "minecraft:stick",
"name": "1.13 Debug Stick"
}
},
"sounds": {
"ambient.underwater.enter": "block.water.ambient",
"ambient.underwater.exit": "block.water.ambient",

Datei anzeigen

@ -2659,6 +2659,356 @@
"minecraft:jigsaw[facing=up]": "minecraft:structure_block[mode=corner]",
"minecraft:jigsaw[facing=down]": "minecraft:structure_block[mode=corner]"
},
"items": {
"minecraft:brick_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Brick Wall"
},
"minecraft:prismarine_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Prismarine Wall"
},
"minecraft:red_sandstone_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Red Sandstone Wall"
},
"minecraft:mossy_stone_brick_wall": {
"id": "minecraft:mossy_cobblestone_wall",
"name": "1.14 Mossy Stone Brick Wall"
},
"minecraft:granite_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Granite Wall"
},
"minecraft:stone_brick_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Stone Brick Wall"
},
"minecraft:nether_brick_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Nether Brick Wall"
},
"minecraft:andesite_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Andesite Wall"
},
"minecraft:red_nether_brick_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Red Nether Brick Wall"
},
"minecraft:sandstone_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Sandstone Wall"
},
"minecraft:end_stone_brick_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 End Stone Brick Wall"
},
"minecraft:diorite_wall": {
"id": "minecraft:cobblestone_wall",
"name": "1.14 Diorite Wall"
},
"minecraft:stone_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.14 Stone Slab"
},
"minecraft:cut_sandstone_slab": {
"id": "minecraft:sandstone_slab",
"name": "1.14 Cut Sandstone Slab"
},
"minecraft:cut_red_sandstone_slab": {
"id": "minecraft:red_sandstone_slab",
"name": "1.14 Cut Red Sandstone Slab"
},
"minecraft:polished_granite_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.14 Polished Granite Slab"
},
"minecraft:smooth_red_sandstone_slab": {
"id": "minecraft:red_sandstone_slab",
"name": "1.14 Smooth Red Sandstone Slab"
},
"minecraft:mossy_stone_brick_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.14 Mossy Stone Brick Slab"
},
"minecraft:polished_diorite_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.14 Polished Diorite Slab"
},
"minecraft:mossy_cobblestone_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.14 Mossy Cobblestone Slab"
},
"minecraft:end_stone_brick_slab": {
"id": "minecraft:sandstone_slab",
"name": "1.14 End Stone Brick Slab"
},
"minecraft:smooth_sandstone_slab": {
"id": "minecraft:sandstone_slab",
"name": "1.14 Smooth Cut Sandstone Slab"
},
"minecraft:smooth_quartz_slab": {
"id": "minecraft:quartz_slab",
"name": "1.14 Smooth Quartz Slab"
},
"minecraft:granite_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.14 Granite Slab"
},
"minecraft:andesite_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.14 Andesite Slab"
},
"minecraft:red_nether_brick_slab": {
"id": "minecraft:nether_brick_slab",
"name": "1.14 Red Nether Brick Slab"
},
"minecraft:polished_andesite_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.14 Polished Andesite Slab"
},
"minecraft:diorite_slab": {
"id": "minecraft:cobblestone_slab",
"name": "1.14 Diorite Slab"
},
"minecraft:polished_granite_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.14 Polished Granite Stairs"
},
"minecraft:smooth_red_sandstone_stairs": {
"id": "minecraft:red_sandstone_stairs",
"name": "1.14 Smooth Red Sandstone Stairs"
},
"minecraft:mossy_stone_brick_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.14 Mossy Stone Brick Stairs"
},
"minecraft:polished_diorite_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.14 Polished Diorite Stairs"
},
"minecraft:mossy_cobblestone_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.14 Mossy Cobblestone Stairs"
},
"minecraft:end_stone_brick_stairs": {
"id": "minecraft:sandstone_stairs",
"name": "1.14 End Stone Brick Stairs"
},
"minecraft:stone_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.14 Stone Stairs"
},
"minecraft:smooth_sandstone_stairs": {
"id": "minecraft:sandstone_stairs",
"name": "1.14 Smooth Sandstone Stairs"
},
"minecraft:smooth_quartz_stairs": {
"id": "minecraft:quartz_stairs",
"name": "1.14 Smooth Quartz Stairs"
},
"minecraft:granite_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.14 Granite Stairs"
},
"minecraft:andesite_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.14 Andesite Stairs"
},
"minecraft:red_nether_brick_stairs": {
"id": "minecraft:nether_brick_stairs",
"name": "1.14 Red Nether Brick Stairs"
},
"minecraft:polished_andesite_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.14 Polished Andesite Stairs"
},
"minecraft:diorite_stairs": {
"id": "minecraft:cobblestone_stairs",
"name": "1.14 Diorite Stairs"
},
"minecraft:cornflower": {
"id": "minecraft:brown_mushroom",
"name": "1.14 Cornflower"
},
"minecraft:lily_of_the_valley": {
"id": "minecraft:white_tulip",
"name": "1.14 Lily of the Valley"
},
"minecraft:wither_rose": {
"id": "minecraft:blue_orchid",
"name": "1.14 Wither Rose"
},
"minecraft:bamboo": {
"id": "minecraft:sugar_cane",
"name": "1.14 Bamboo"
},
"minecraft:suspicious_stew": {
"id": "minecraft:mushroom_stew",
"name": "1.14 Suspicious Stew"
},
"minecraft:leather_horse_armor": {
"id": "minecraft:golden_horse_armor",
"name": "1.14 Leather Horse Armor"
},
"minecraft:blue_dye": {
"id": "minecraft:lapis_lazuli",
"name": "1.14 Blue Dye"
},
"minecraft:brown_dye": {
"id": "minecraft:cocoa_beans",
"name": "1.14 Brown Dye"
},
"minecraft:black_dye": {
"id": "minecraft:ink_sac",
"name": "1.14 Black Dye"
},
"minecraft:white_dye": {
"id": "minecraft:bone_meal",
"name": "1.14 White Dye"
},
"minecraft:scaffolding": {
"id": "minecraft:hay_block",
"name": "1.14 Scaffolding"
},
"minecraft:jigsaw": {
"id": "minecraft:structure_block",
"name": "1.14 Jigsaw Block"
},
"minecraft:composter": {
"id": "minecraft:cauldron",
"name": "1.14 Composter"
},
"minecraft:barrel": {
"id": "minecraft:chest",
"name": "1.14 Barrel"
},
"minecraft:loom": {
"id": "minecraft:crafting_table",
"name": "1.14 Loom"
},
"minecraft:smoker": {
"id": "minecraft:furnace",
"name": "1.14 Smoker"
},
"minecraft:blast_furnace": {
"id": "minecraft:furnace",
"name": "1.14 Blast Furnace"
},
"minecraft:cartography_table": {
"id": "minecraft:crafting_table",
"name": "1.14 Cartography Table"
},
"minecraft:fletching_table": {
"id": "minecraft:crafting_table",
"name": "1.14 Fletching Table"
},
"minecraft:grindstone": {
"id": "minecraft:anvil",
"name": "1.14 Grindstone"
},
"minecraft:lectern": {
"id": "minecraft:bookshelf",
"name": "1.14 Lectern"
},
"minecraft:smithing_table": {
"id": "minecraft:crafting_table",
"name": "1.14 Smithing Table"
},
"minecraft:stonecutter": {
"id": "minecraft:crafting_table",
"name": "1.14 Stonecutter"
},
"minecraft:flower_banner_pattern": {
"id": "minecraft:paper",
"name": "1.14 Flower Banner Pattern"
},
"minecraft:creeper_banner_pattern": {
"id": "minecraft:paper",
"name": "1.14 Creeper Banner Pattern"
},
"minecraft:skull_banner_pattern": {
"id": "minecraft:paper",
"name": "1.14 Skull Banner Pattern"
},
"minecraft:mojang_banner_pattern": {
"id": "minecraft:paper",
"name": "1.14 Mojang Banner Pattern"
},
"minecraft:globe_banner_pattern": {
"id": "minecraft:paper",
"name": "1.14 Globe Banner Pattern"
},
"minecraft:bell": {
"id": "minecraft:gold_block",
"name": "1.14 Bell"
},
"minecraft:lantern": {
"id": "minecraft:redstone_lamp",
"name": "1.14 Lantern"
},
"minecraft:sweet_berries": {
"id": "minecraft:beetroot",
"name": "1.14 Sweet Berries"
},
"minecraft:campfire": {
"id": "minecraft:torch",
"name": "1.14 Campfire"
},
"minecraft:spruce_sign": {
"id": "minecraft:oak_sign",
"name": "1.14 Spruce Sign"
},
"minecraft:birch_sign": {
"id": "minecraft:oak_sign",
"name": "1.14 Birch Sign"
},
"minecraft:jungle_sign": {
"id": "minecraft:oak_sign",
"name": "1.14 Jungle Sign"
},
"minecraft:acacia_sign": {
"id": "minecraft:oak_sign",
"name": "1.14 Acacia Sign"
},
"minecraft:dark_oak_sign": {
"id": "minecraft:oak_sign",
"name": "1.14 Dark Oak Sign"
},
"minecraft:crossbow": {
"id": "minecraft:bow",
"name": "1.14 Crossbow"
},
"minecraft:cat_spawn_egg": {
"id": "minecraft:ocelot_spawn_egg",
"name": "1.14 Cat Spawn Egg"
},
"minecraft:fox_spawn_egg": {
"id": "minecraft:pig_spawn_egg",
"name": "1.14 Fox Spawn Egg"
},
"minecraft:panda_spawn_egg": {
"id": "minecraft:skeleton_spawn_egg",
"name": "1.14 Panda Spawn Egg"
},
"minecraft:pillager_spawn_egg": {
"id": "minecraft:zombie_villager_spawn_egg",
"name": "1.14 Pillager Spawn Egg"
},
"minecraft:ravager_spawn_egg": {
"id": "minecraft:silverfish_spawn_egg",
"name": "1.14 Ravager Spawn Egg"
},
"minecraft:trader_llama_spawn_egg": {
"id": "minecraft:blaze_spawn_egg",
"name": "1.14 Trader Llama Spawn Egg"
},
"minecraft:wandering_trader_spawn_egg": {
"id": "minecraft:squid_spawn_egg",
"name": "1.14 Wandering Trader Spawn Egg"
}
},
"sounds": {
"block.bamboo.break": "block.grass.break",
"block.bamboo.fall": "block.grass.fall",

Datei anzeigen

@ -37,6 +37,36 @@
"minecraft:beehive": "minecraft:barrel[facing=up,open=false]",
"minecraft:bee_nest": "minecraft:yellow_shulker_box[facing=up]"
},
"items": {
"minecraft:honey_bottle": {
"id": "minecraft:dragon_breath",
"name": "1.15 Honey Bottle"
},
"minecraft:honeycomb": {
"id": "minecraft:sunflower",
"name": "1.15 Honeycomb"
},
"minecraft:honeycomb_block": {
"id": "minecraft:horn_coral_block",
"name": "1.15 Honeycomb Block"
},
"minecraft:bee_nest": {
"id": "minecraft:yellow_shulker_box",
"name": "1.15 Bee Nest"
},
"minecraft:beehive": {
"id": "minecraft:barrel",
"name": "1.15 Beehive"
},
"minecraft:honey_block": {
"id": "minecraft:slime_block",
"name": "1.15 Honey Block"
},
"minecraft:bee_spawn_egg": {
"id": "minecraft:ocelot_spawn_egg",
"name": "1.15 Bee Spawn Egg"
}
},
"sounds": {
"entity.bee.death": "entity.creeper.death",
"entity.bee.hurt": "entity.bat.hurt",