use of com.viaversion.viaversion.api.minecraft.item.DataItem in project ViaBackwards by ViaVersion.
the class BlockItemPackets1_11 method getNewItem.
private Item getNewItem(ChestedHorseStorage storage, int slotId, Item current) {
int strength = storage.isChested() ? storage.getLiamaStrength() : 0;
int startNonExistingFormula = 2 + 3 * strength;
int endNonExistingFormula = 2 + 3 * (storage.isChested() ? 5 : 0);
if (slotId >= startNonExistingFormula && slotId < endNonExistingFormula)
return new DataItem(166, (byte) 1, (short) 0, getNamedTag("ยง4SLOT DISABLED"));
if (slotId == 1)
return null;
return current;
}
use of com.viaversion.viaversion.api.minecraft.item.DataItem in project ViaFabric by ViaVersion.
the class VRHandItemProvider method fromNative.
private Item fromNative(ItemStack original) {
Identifier iid = Registry.ITEM.getId(original.getItem());
int id = RemappingUtil.swordId(iid.toString());
return new DataItem(id, (byte) original.getCount(), (short) original.getDamage(), null);
}
use of com.viaversion.viaversion.api.minecraft.item.DataItem in project ViaFabric by ViaVersion.
the class VRHandItemProvider method fromNative.
private Item fromNative(ItemStack original) {
Identifier iid = Registry.ITEM.getId(original.getItem());
int id = RemappingUtil.swordId(iid.toString());
return new DataItem(id, (byte) original.getCount(), (short) original.getDamage(), null);
}
use of com.viaversion.viaversion.api.minecraft.item.DataItem in project ViaFabric by ViaVersion.
the class VRHandItemProvider method fromNative.
private Item fromNative(ItemStack original) {
Identifier iid = Registry.ITEM.getId(original.getItem());
int id = RemappingUtil.swordId(iid.toString());
return new DataItem(id, (byte) original.getCount(), (short) original.getDamage(), null);
}
use of com.viaversion.viaversion.api.minecraft.item.DataItem in project ViaFabric by ViaVersion.
the class VRHandItemProvider method fromNative.
private Item fromNative(ItemStack original) {
Identifier iid = Registry.ITEM.getId(original.getItem());
int id = RemappingUtil.swordId(iid.toString());
return new DataItem(id, (byte) original.getCount(), (short) original.getDamage(), null);
}
Aggregations