mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-18 16:17:45 +01:00
Properly swift sneak in lore
This commit is contained in:
parent
355ca898d7
commit
520552fe69
@ -19,6 +19,7 @@ package com.viaversion.viabackwards.protocol.v1_19to1_18_2.rewriter;
|
|||||||
|
|
||||||
import com.viaversion.nbt.tag.CompoundTag;
|
import com.viaversion.nbt.tag.CompoundTag;
|
||||||
import com.viaversion.viabackwards.api.rewriters.BackwardsItemRewriter;
|
import com.viaversion.viabackwards.api.rewriters.BackwardsItemRewriter;
|
||||||
|
import com.viaversion.viabackwards.api.rewriters.EnchantmentRewriter;
|
||||||
import com.viaversion.viabackwards.protocol.v1_19to1_18_2.Protocol1_19To1_18_2;
|
import com.viaversion.viabackwards.protocol.v1_19to1_18_2.Protocol1_19To1_18_2;
|
||||||
import com.viaversion.viabackwards.protocol.v1_19to1_18_2.storage.LastDeathPosition;
|
import com.viaversion.viabackwards.protocol.v1_19to1_18_2.storage.LastDeathPosition;
|
||||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||||
@ -42,6 +43,8 @@ import com.viaversion.viaversion.util.MathUtil;
|
|||||||
|
|
||||||
public final class BlockItemPacketRewriter1_19 extends BackwardsItemRewriter<ClientboundPackets1_19, ServerboundPackets1_17, Protocol1_19To1_18_2> {
|
public final class BlockItemPacketRewriter1_19 extends BackwardsItemRewriter<ClientboundPackets1_19, ServerboundPackets1_17, Protocol1_19To1_18_2> {
|
||||||
|
|
||||||
|
private final EnchantmentRewriter enchantmentRewriter = new EnchantmentRewriter(this);
|
||||||
|
|
||||||
public BlockItemPacketRewriter1_19(final Protocol1_19To1_18_2 protocol) {
|
public BlockItemPacketRewriter1_19(final Protocol1_19To1_18_2 protocol) {
|
||||||
super(protocol, Types.ITEM1_13_2, Types.ITEM1_13_2_ARRAY);
|
super(protocol, Types.ITEM1_13_2, Types.ITEM1_13_2_ARRAY);
|
||||||
}
|
}
|
||||||
@ -208,6 +211,11 @@ public final class BlockItemPacketRewriter1_19 extends BackwardsItemRewriter<Cli
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void registerRewrites() {
|
||||||
|
enchantmentRewriter.registerEnchantment("minecraft:swift_sneak", "§7Swift Sneak");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item handleItemToClient(final UserConnection connection, final Item item) {
|
public Item handleItemToClient(final UserConnection connection, final Item item) {
|
||||||
if (item == null) return null;
|
if (item == null) return null;
|
||||||
@ -232,6 +240,8 @@ public final class BlockItemPacketRewriter1_19 extends BackwardsItemRewriter<Cli
|
|||||||
lodestonePosTag.putInt("X", position.x());
|
lodestonePosTag.putInt("X", position.x());
|
||||||
lodestonePosTag.putInt("Y", position.y());
|
lodestonePosTag.putInt("Y", position.y());
|
||||||
lodestonePosTag.putInt("Z", position.z());
|
lodestonePosTag.putInt("Z", position.z());
|
||||||
|
|
||||||
|
enchantmentRewriter.handleToClient(item);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,6 +262,8 @@ public final class BlockItemPacketRewriter1_19 extends BackwardsItemRewriter<Cli
|
|||||||
item.setTag(null);
|
item.setTag(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enchantmentRewriter.handleToServer(item);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4112,6 +4112,9 @@
|
|||||||
"realms.missing.snapshot.error.text": "Realms is currently not supported in snapshots"
|
"realms.missing.snapshot.error.text": "Realms is currently not supported in snapshots"
|
||||||
},
|
},
|
||||||
"1.12": {
|
"1.12": {
|
||||||
|
"potion.potency.3": "enchantment.level.4",
|
||||||
|
"potion.potency.4": "enchantment.level.5",
|
||||||
|
"potion.potency.5": "enchantment.level.6",
|
||||||
"gui.recipebook.moreRecipes": "Right Click for more",
|
"gui.recipebook.moreRecipes": "Right Click for more",
|
||||||
"gui.recipebook.toggleRecipes.all": "Showing all",
|
"gui.recipebook.toggleRecipes.all": "Showing all",
|
||||||
"gui.recipebook.toggleRecipes.craftable": "Showing craftable",
|
"gui.recipebook.toggleRecipes.craftable": "Showing craftable",
|
||||||
|
Loading…
Reference in New Issue
Block a user