From fb8f71929b6041d82bed1dc74d4c2fe70bbcb123 Mon Sep 17 00:00:00 2001 From: zangamj Date: Fri, 5 Aug 2016 09:59:17 -0400 Subject: [PATCH] Finished ItemUnstableDoor. --- .../java/com/zixiken/dimdoors/DimDoors.java | 2 +- .../dimdoors/items/ItemUnstableDoor.java | 15 ++++----------- .../dimdoors/render/ItemRenderManager.java | 1 + .../dimdoors/models/item/itemChaosDoor.json | 18 ++++++++++++++++++ 4 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 src/main/resources/assets/dimdoors/models/item/itemChaosDoor.json diff --git a/src/main/java/com/zixiken/dimdoors/DimDoors.java b/src/main/java/com/zixiken/dimdoors/DimDoors.java index f7d03b0d..52bea55e 100644 --- a/src/main/java/com/zixiken/dimdoors/DimDoors.java +++ b/src/main/java/com/zixiken/dimdoors/DimDoors.java @@ -90,7 +90,7 @@ public class DimDoors { public static Block warpDoor; public static Block goldenDoor; public static BlockGoldDimDoor goldenDimensionalDoor; - public static Block unstableDoor; + public static UnstableDoor unstableDoor; public static Block blockLimbo; public static DimensionalDoor dimensionalDoor; public static Block blockDimWall; diff --git a/src/main/java/com/zixiken/dimdoors/items/ItemUnstableDoor.java b/src/main/java/com/zixiken/dimdoors/items/ItemUnstableDoor.java index 96c61d05..51f26c87 100644 --- a/src/main/java/com/zixiken/dimdoors/items/ItemUnstableDoor.java +++ b/src/main/java/com/zixiken/dimdoors/items/ItemUnstableDoor.java @@ -4,9 +4,7 @@ import java.util.List; import com.zixiken.dimdoors.blocks.BaseDimDoor; import com.zixiken.dimdoors.DimDoors; -import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemDoor; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; @@ -17,17 +15,12 @@ public class ItemUnstableDoor extends BaseItemDoor { super(DimDoors.unstableDoor, null); setUnlocalizedName(ID); } - - @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("info.chaosDoor")); + public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) { + tooltip.add(StatCollector.translateToLocal("info.chaosDoor")); } @Override - protected BaseDimDoor getDoorBlock() - { - return (BaseDimDoor) DimDoors.unstableDoor; - } + protected BaseDimDoor getDoorBlock() {return DimDoors.unstableDoor;} } \ No newline at end of file diff --git a/src/main/java/com/zixiken/dimdoors/render/ItemRenderManager.java b/src/main/java/com/zixiken/dimdoors/render/ItemRenderManager.java index eb1c9744..81b8ceb1 100644 --- a/src/main/java/com/zixiken/dimdoors/render/ItemRenderManager.java +++ b/src/main/java/com/zixiken/dimdoors/render/ItemRenderManager.java @@ -34,6 +34,7 @@ public class ItemRenderManager { register(DimDoors.itemRiftSignature); register(DimDoors.itemStabilizedRiftSignature); register(DimDoors.itemStableFabric); + register(DimDoors.itemUnstableDoor); } public static void addModelVariants() { diff --git a/src/main/resources/assets/dimdoors/models/item/itemChaosDoor.json b/src/main/resources/assets/dimdoors/models/item/itemChaosDoor.json new file mode 100644 index 00000000..f6f59838 --- /dev/null +++ b/src/main/resources/assets/dimdoors/models/item/itemChaosDoor.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "dimdoors:items/itemChaosDoor" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +}