Skip to content
Permalink
Browse files

Added two new foods: Raw tentacle and Trilo Bites (Cooked form)

  • Loading branch information...
Ri5ux committed Apr 1, 2019
1 parent 60e424f commit 08afcef455c21be3bf037a9d8bdfe1282e90fc1c
@@ -65,6 +65,7 @@ private static void addSmelting()
GameRegistry.addSmelting(BlockHandler.oreLithium, new ItemStack(ItemHandler.itemIngotLithium), 1.0F);
GameRegistry.addSmelting(BlockHandler.oreBauxite, new ItemStack(ItemHandler.itemIngotAluminum), 1.0F);
GameRegistry.addSmelting(BlockHandler.oreSilicon, new ItemStack(ItemHandler.itemSilicon), 1.0F);
GameRegistry.addSmelting(ItemHandler.itemRawTentacle, new ItemStack(ItemHandler.itemTriloBite), 2.0F);
GameRegistry.addSmelting(BlockHandler.gigerLog, CHARCOAL, 1.0F);
}

@@ -180,6 +180,8 @@
public static final Item itemAK47Action = new HookedItem().setMaxStackSize(64).setCreativeTab(Tab.GUN_PARTS).setRegistryName("part.ak47.action");
public static final Item itemDoritos = new ItemFood(8, true).setAlwaysEdible().setCreativeTab(Tab.MAIN).setRegistryName("food.doritos");
public static final Item itemDoritosCoolRanch = new ItemFood(8, true).setAlwaysEdible().setCreativeTab(Tab.MAIN).setRegistryName("food.doritos.coolranch");
public static final Item itemRawTentacle = new ItemFood(4, true).setAlwaysEdible().setCreativeTab(Tab.MAIN).setRegistryName("food.raw.tentacle");
public static final Item itemTriloBite = new ItemFood(10, 1.0F, true).setAlwaysEdible().setCreativeTab(Tab.MAIN).setRegistryName("food.trilo.bite");
public static final Item itemFlashDrive = new ItemStorageDevice().setMaxStackSize(64).setCreativeTab(Tab.MAIN).setRegistryName("device.nbtdrive");
public static final Item itemCapacitor = new HookedItem().setMaxStackSize(64).setCreativeTab(Tab.CRAFTING).setRegistryName("part.capacitor");
public static final Item itemTransistor = new HookedItem().setMaxStackSize(64).setCreativeTab(Tab.CRAFTING).setRegistryName("part.transistor");
@@ -839,13 +839,52 @@ public ModelTrilobite()
updateDefaultPose();
}

public Model.Part getTentacleById(int i)
{
switch (i)
{
case 0:
return this.tail;
case 1:
return this.lFrontTenticle1;
case 2:
return this.rFrontTenticle1;
case 3:
return this.lMiddleTenticle1;
case 4:
return this.rMiddleTenticle1;
case 5:
return this.lBackTenticle1;
case 6:
return this.rBackTenticle1;
default:
return null;
}
}

@Override
public void render(EntityTrilobite trilobite)
{
if (trilobite != null)
{
animate(trilobite);

if (!trilobite.isFertile())
{
int[] tentacles = trilobite.getDetachedTentacles();

for (int i = 0; i < trilobite.getAmountOfTentacles(); i++)
{
Model.Part tentacle = getTentacleById(i);

if (tentacle != null)
{
boolean hidden = tentacles[i] == 1 ? true : false;
tentacle.isHidden = hidden;
}
}
}

if (!trilobite.isFertile() && !this.isRiding)
{
dead(trilobite, true);
Oops, something went wrong.

0 comments on commit 08afcef

Please sign in to comment.
You can’t perform that action at this time.