use of com.viaversion.viabackwards.api.rewriters.LegacyEnchantmentRewriter in project ViaBackwards by ViaVersion.
the class ItemPackets1_11_1 method registerRewrites.
@Override
protected void registerRewrites() {
enchantmentRewriter = new LegacyEnchantmentRewriter(nbtTagName);
enchantmentRewriter.registerEnchantment(22, "§7Sweeping Edge");
}
use of com.viaversion.viabackwards.api.rewriters.LegacyEnchantmentRewriter in project ViaBackwards by ViaVersion.
the class BlockItemPackets1_11 method registerRewrites.
@Override
protected void registerRewrites() {
// Handle spawner block entity (map to itself with custom handler)
MappedLegacyBlockItem data = replacementData.computeIfAbsent(52, s -> new MappedLegacyBlockItem(52, (short) -1, null, false));
data.setBlockEntityHandler((b, tag) -> {
EntityIdRewriter.toClientSpawner(tag, true);
return tag;
});
enchantmentRewriter = new LegacyEnchantmentRewriter(nbtTagName);
enchantmentRewriter.registerEnchantment(71, "§cCurse of Vanishing");
enchantmentRewriter.registerEnchantment(10, "§cCurse of Binding");
// Curses do not display their level
enchantmentRewriter.setHideLevelForEnchants(71, 10);
}
Aggregations