From 4022baa53f3be1b392f40bb760a112bb94cb5541 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 6 Dec 2022 11:16:23 +0100 Subject: [PATCH] Make it server proof --- .../create/foundation/item/CustomRenderedArmorItem.java | 3 +++ .../com/simibubi/create/foundation/item/LayeredArmorItem.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/com/simibubi/create/foundation/item/CustomRenderedArmorItem.java b/src/main/java/com/simibubi/create/foundation/item/CustomRenderedArmorItem.java index 607b51ce1..3f8744044 100644 --- a/src/main/java/com/simibubi/create/foundation/item/CustomRenderedArmorItem.java +++ b/src/main/java/com/simibubi/create/foundation/item/CustomRenderedArmorItem.java @@ -8,7 +8,10 @@ import net.minecraft.client.renderer.entity.layers.HumanoidArmorLayer; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; public interface CustomRenderedArmorItem { + @OnlyIn(Dist.CLIENT) void renderArmorPiece(HumanoidArmorLayer layer, PoseStack poseStack, MultiBufferSource bufferSource, LivingEntity entity, EquipmentSlot slot, int light, HumanoidModel originalModel, ItemStack stack); } diff --git a/src/main/java/com/simibubi/create/foundation/item/LayeredArmorItem.java b/src/main/java/com/simibubi/create/foundation/item/LayeredArmorItem.java index 5ac1a374f..487a147d1 100644 --- a/src/main/java/com/simibubi/create/foundation/item/LayeredArmorItem.java +++ b/src/main/java/com/simibubi/create/foundation/item/LayeredArmorItem.java @@ -13,8 +13,11 @@ import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ArmorItem; import net.minecraft.world.item.ItemStack; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; public interface LayeredArmorItem extends CustomRenderedArmorItem { + @OnlyIn(Dist.CLIENT) @SuppressWarnings({ "unchecked", "rawtypes" }) @Override default void renderArmorPiece(HumanoidArmorLayer layer, PoseStack poseStack,