From 9f1e6659a593247f0cc3389000f6ad4b05271a1f Mon Sep 17 00:00:00 2001 From: EERussianguy Date: Tue, 18 Jan 2022 20:35:13 -0500 Subject: [PATCH] add turntable, clean up some internal code --- build.gradle | 2 +- .../firmalife/ClientRegisterEventsFL.java | 3 + .../com/eerussianguy/firmalife/FirmaLife.java | 2 +- .../firmalife/blocks/BlockStemFruit.java | 7 +- .../firmalife/blocks/BlockTurntable.java | 145 ++++++++++++++ .../firmalife/init/StatePropertiesFL.java | 1 + .../firmalife/items/ItemBlockRot.java | 3 +- .../firmalife/recipe/PizzaRecipe.java | 33 +--- .../firmalife/recipe/SandwichBasedRecipe.java | 55 ++++++ .../firmalife/recipe/TrailMixRecipe.java | 33 +--- .../firmalife/registry/BlocksFL.java | 5 +- .../firmalife/registry/ItemsFL.java | 23 +++ .../render/LargePlanterBakedModel.java | 36 ++-- .../render/QuadPlanterBakedModel.java | 8 +- .../firmalife/render/TESRTurntable.java | 71 +++++++ .../firmalife/te/TETurntable.java | 178 ++++++++++++++++++ .../firmalife/util/ClientHelpers.java | 9 + .../firmalife/blockstates/turntable.json | 16 ++ .../assets/firmalife/lang/en_us.lang | 9 + .../models/block/turntable_base.json | 20 ++ .../models/block/turntable_static.json | 33 ++++ .../assets/firmalife/models/item/unused0.json | 21 +++ .../assets/firmalife/models/item/unused1.json | 33 ++++ .../assets/firmalife/models/item/unused2.json | 44 +++++ .../assets/firmalife/models/item/unused3.json | 55 ++++++ .../assets/firmalife/models/item/unused4.json | 66 +++++++ 26 files changed, 809 insertions(+), 102 deletions(-) create mode 100644 src/main/java/com/eerussianguy/firmalife/blocks/BlockTurntable.java create mode 100644 src/main/java/com/eerussianguy/firmalife/recipe/SandwichBasedRecipe.java create mode 100644 src/main/java/com/eerussianguy/firmalife/render/TESRTurntable.java create mode 100644 src/main/java/com/eerussianguy/firmalife/te/TETurntable.java create mode 100644 src/main/resources/assets/firmalife/blockstates/turntable.json create mode 100644 src/main/resources/assets/firmalife/models/block/turntable_base.json create mode 100644 src/main/resources/assets/firmalife/models/block/turntable_static.json create mode 100644 src/main/resources/assets/firmalife/models/item/unused0.json create mode 100644 src/main/resources/assets/firmalife/models/item/unused1.json create mode 100644 src/main/resources/assets/firmalife/models/item/unused2.json create mode 100644 src/main/resources/assets/firmalife/models/item/unused3.json create mode 100644 src/main/resources/assets/firmalife/models/item/unused4.json diff --git a/build.gradle b/build.gradle index 103d3e13..4ca26f2c 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,7 @@ repositories { } } -version = "0.5.0" +version = "0.5.1" group = 'com.eerussianguy.firmalife' archivesBaseName = 'firmalife' diff --git a/src/main/java/com/eerussianguy/firmalife/ClientRegisterEventsFL.java b/src/main/java/com/eerussianguy/firmalife/ClientRegisterEventsFL.java index 2457a117..af79fd9a 100644 --- a/src/main/java/com/eerussianguy/firmalife/ClientRegisterEventsFL.java +++ b/src/main/java/com/eerussianguy/firmalife/ClientRegisterEventsFL.java @@ -44,6 +44,7 @@ import com.eerussianguy.firmalife.te.TELeafMat; import com.eerussianguy.firmalife.te.TEOven; import com.eerussianguy.firmalife.te.TEString; +import com.eerussianguy.firmalife.te.TETurntable; import net.dries007.tfc.api.capability.IMoldHandler; import net.dries007.tfc.api.registries.TFCRegistries; import net.dries007.tfc.api.types.Metal; @@ -74,6 +75,7 @@ public static void registerModels(ModelRegistryEvent event) ModelLoader.setCustomStateMapper(leaves, new StateMap.Builder().ignore(BlockFruitTreeLeaves.DECAYABLE).ignore(BlockFruitTreeLeaves.HARVESTABLE).build()); ModelLoader.setCustomStateMapper(BlocksFL.SPOUT, new StateMap.Builder().ignore(StatePropertiesFL.WATERED).ignore(StatePropertiesFL.NEEDS_SOURCE).build()); ModelLoader.setCustomStateMapper(BlocksFL.SPRINKLER, new StateMap.Builder().ignore(StatePropertiesFL.WATERED).ignore(StatePropertiesFL.NEEDS_SOURCE).build()); + ModelLoader.setCustomStateMapper(BlocksFL.TURNTABLE, new StateMap.Builder().ignore(StatePropertiesFL.CLAY).build()); ModelLoader.setCustomModelResourceLocation(ItemsFL.CHEESECLOTH, 0, new ModelResourceLocation(ItemsFL.CHEESECLOTH.getRegistryName(), "inventory")); ModelLoader.setCustomModelResourceLocation(ItemsFL.CRACKED_COCONUT, 0, new ModelResourceLocation(ItemsFL.CRACKED_COCONUT.getRegistryName(), "inventory")); @@ -137,6 +139,7 @@ public ModelResourceLocation getModelLocation(@Nonnull ItemStack stack) ClientRegistry.bindTileEntitySpecialRenderer(TEOven.class, new TESROven()); ClientRegistry.bindTileEntitySpecialRenderer(TEString.class, new TESRString()); ClientRegistry.bindTileEntitySpecialRenderer(TELeafMat.class, new TESRLeafMat()); + ClientRegistry.bindTileEntitySpecialRenderer(TETurntable.class, new TESRTurntable()); } @SuppressWarnings("deprecation") diff --git a/src/main/java/com/eerussianguy/firmalife/FirmaLife.java b/src/main/java/com/eerussianguy/firmalife/FirmaLife.java index b0052dcf..db69898a 100644 --- a/src/main/java/com/eerussianguy/firmalife/FirmaLife.java +++ b/src/main/java/com/eerussianguy/firmalife/FirmaLife.java @@ -30,7 +30,7 @@ public class FirmaLife { public static final String MOD_ID = "firmalife"; public static final String MODNAME = "FirmaLife"; - public static final String MODVERSION = "0.5.0"; + public static final String MODVERSION = "0.5.1"; @Mod.Instance private static FirmaLife INSTANCE = null; diff --git a/src/main/java/com/eerussianguy/firmalife/blocks/BlockStemFruit.java b/src/main/java/com/eerussianguy/firmalife/blocks/BlockStemFruit.java index 16eda5b8..e618c709 100644 --- a/src/main/java/com/eerussianguy/firmalife/blocks/BlockStemFruit.java +++ b/src/main/java/com/eerussianguy/firmalife/blocks/BlockStemFruit.java @@ -93,7 +93,10 @@ public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, Ent } @Override - public boolean hasTileEntity(IBlockState state) { return true; } + public boolean hasTileEntity(IBlockState state) + { + return true; + } @Override public TileEntity createTileEntity(World world, IBlockState state) @@ -124,8 +127,6 @@ public void getDrops(NonNullList drops, IBlockAccess world, BlockPos } - //Lifted from BlockFlowerPot - @Override public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest) { diff --git a/src/main/java/com/eerussianguy/firmalife/blocks/BlockTurntable.java b/src/main/java/com/eerussianguy/firmalife/blocks/BlockTurntable.java new file mode 100644 index 00000000..240d8070 --- /dev/null +++ b/src/main/java/com/eerussianguy/firmalife/blocks/BlockTurntable.java @@ -0,0 +1,145 @@ +package com.eerussianguy.firmalife.blocks; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import javax.annotation.ParametersAreNonnullByDefault; + +import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemHandlerHelper; + +import com.eerussianguy.firmalife.te.TETurntable; +import mcp.MethodsReturnNonnullByDefault; +import net.dries007.tfc.util.Helpers; + +import static com.eerussianguy.firmalife.init.StatePropertiesFL.CLAY; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class BlockTurntable extends BlockNonCube +{ + private static final AxisAlignedBB SHAPE = new AxisAlignedBB(4.0D / 16, 0.0D, 4.0D / 16, 12.0D / 16, 5.0D / 16, 12.0D / 16); + + public BlockTurntable() + { + super(Material.IRON); + setHardness(1.0F); + setResistance(1.0F); + setDefaultState(getBlockState().getBaseState().withProperty(CLAY, 0)); + } + + @Override + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) + { + if (!world.isRemote && hand == EnumHand.MAIN_HAND) + { + ItemStack held = player.getHeldItem(hand); + if (player.isSneaking()) + { + TETurntable te = Helpers.getTE(world, pos, TETurntable.class); + if (te != null && te.hasPottery()) te.rotate(); + return true; + } + if (held.getItem() == Items.CLAY_BALL) + { + int clay = state.getValue(CLAY); + if (clay < 4 && held.getCount() > 5) + { + held.shrink(5); + world.setBlockState(pos, state.withProperty(CLAY, clay + 1)); + return true; + } + } + else + { + TETurntable te = Helpers.getTE(world, pos, TETurntable.class); + if (te != null) + { + IItemHandler cap = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); + if (cap != null) + { + ItemStack invStack = cap.getStackInSlot(0); + if (invStack.isEmpty() && TETurntable.isPottery(held)) + { + ItemStack leftover = cap.insertItem(0, held.splitStack(1), false); + ItemHandlerHelper.giveItemToPlayer(player, leftover); + return true; + } + else if (!invStack.isEmpty() && held.isEmpty()) + { + ItemStack leftover = cap.extractItem(0, 1, false); + ItemHandlerHelper.giveItemToPlayer(player, leftover); + return true; + } + } + } + } + } + return false; + } + + @Override + @SuppressWarnings("deprecation") + public IBlockState getStateFromMeta(int meta) + { + return getDefaultState().withProperty(CLAY, meta); + } + + @Override + public int getMetaFromState(IBlockState state) + { + return state.getValue(CLAY); + } + + @Override + @Nonnull + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, CLAY); + } + + @Override + public boolean hasTileEntity(IBlockState state) + { + return true; + } + + @Nullable + @Override + public TileEntity createTileEntity(World world, IBlockState state) + { + return new TETurntable(); + } + + @Override + public void breakBlock(World world, BlockPos pos, IBlockState state) + { + TETurntable te = Helpers.getTE(world, pos, TETurntable.class); + if (te != null) + { + te.onBreakBlock(world, pos, state); + } + super.breakBlock(world, pos, state); + } + + @Override + @SuppressWarnings("deprecation") + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { + return SHAPE; + } +} diff --git a/src/main/java/com/eerussianguy/firmalife/init/StatePropertiesFL.java b/src/main/java/com/eerussianguy/firmalife/init/StatePropertiesFL.java index 078e741c..a29996cf 100644 --- a/src/main/java/com/eerussianguy/firmalife/init/StatePropertiesFL.java +++ b/src/main/java/com/eerussianguy/firmalife/init/StatePropertiesFL.java @@ -22,4 +22,5 @@ public class StatePropertiesFL public static final PropertyInteger JARS = PropertyInteger.create("jars", 1, 4); public static final PropertyInteger WEDGES = PropertyInteger.create("wedges", 0, 3); public static final PropertyEnum AGE = PropertyEnum.create("age", AgingFL.class); + public static final PropertyInteger CLAY = PropertyInteger.create("clay", 0, 4); } diff --git a/src/main/java/com/eerussianguy/firmalife/items/ItemBlockRot.java b/src/main/java/com/eerussianguy/firmalife/items/ItemBlockRot.java index 9c89d118..9d33830c 100644 --- a/src/main/java/com/eerussianguy/firmalife/items/ItemBlockRot.java +++ b/src/main/java/com/eerussianguy/firmalife/items/ItemBlockRot.java @@ -31,7 +31,6 @@ public ItemBlockRot(Block b) super(b); } - @Override public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable NBTTagCompound nbt) { @@ -57,7 +56,7 @@ public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos p { long currentTime = CalendarTFC.PLAYER_TIME.getTicks(); te.resetCounter(); //te counter is at currentTime - te.reduceCounter(foodCreationDate - currentTime); //teCounter is now at foodCrationDate + te.reduceCounter(foodCreationDate - currentTime); //teCounter is now at foodCreationDate } } return result; diff --git a/src/main/java/com/eerussianguy/firmalife/recipe/PizzaRecipe.java b/src/main/java/com/eerussianguy/firmalife/recipe/PizzaRecipe.java index 9a8b109d..a1cdf578 100644 --- a/src/main/java/com/eerussianguy/firmalife/recipe/PizzaRecipe.java +++ b/src/main/java/com/eerussianguy/firmalife/recipe/PizzaRecipe.java @@ -23,7 +23,7 @@ import net.dries007.tfc.objects.recipes.ShapedDamageRecipe; import net.dries007.tfc.util.calendar.CalendarTFC; -public class PizzaRecipe extends ShapedDamageRecipe +public class PizzaRecipe extends SandwichBasedRecipe { public PizzaRecipe(ResourceLocation group, CraftingHelper.ShapedPrimer input, @Nonnull ItemStack result, int damage) { @@ -49,37 +49,6 @@ public ItemStack getCraftingResult(@Nonnull InventoryCrafting inv) return output; } - @Override - public boolean matches(@Nonnull InventoryCrafting inv, @Nonnull World world) - { - if (super.matches(inv, world)) - { - List ingredients = new ArrayList<>(); - getIngredients(inv, ingredients); - return ingredients.size() > 0; - } - return false; - } - - private void getIngredients(InventoryCrafting inv, List ingredients) - { - for (int i = 0; i < inv.getSizeInventory(); i++) - { - ItemStack ingredientStack = inv.getStackInSlot(i); - IFood ingredientCap = ingredientStack.getCapability(CapabilityFood.CAPABILITY, null); - if (ingredientCap != null) - { - if (ingredientCap.isRotten()) - { - // Found a rotten ingredient, aborting - ingredients.clear(); - return; - } - ingredients.add(ingredientCap.getData()); - } - } - } - @SuppressWarnings("unused") public static class Factory implements IRecipeFactory { diff --git a/src/main/java/com/eerussianguy/firmalife/recipe/SandwichBasedRecipe.java b/src/main/java/com/eerussianguy/firmalife/recipe/SandwichBasedRecipe.java new file mode 100644 index 00000000..780430c6 --- /dev/null +++ b/src/main/java/com/eerussianguy/firmalife/recipe/SandwichBasedRecipe.java @@ -0,0 +1,55 @@ +package com.eerussianguy.firmalife.recipe; + +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Nonnull; + +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.common.crafting.CraftingHelper; + +import net.dries007.tfc.api.capability.food.CapabilityFood; +import net.dries007.tfc.api.capability.food.FoodData; +import net.dries007.tfc.api.capability.food.IFood; +import net.dries007.tfc.objects.recipes.ShapedDamageRecipe; + +public abstract class SandwichBasedRecipe extends ShapedDamageRecipe +{ + public SandwichBasedRecipe(ResourceLocation group, CraftingHelper.ShapedPrimer input, @Nonnull ItemStack result, int damage) + { + super(group, input, result, damage); + } + + @Override + public boolean matches(@Nonnull InventoryCrafting inv, @Nonnull World world) + { + if (super.matches(inv, world)) + { + List ingredients = new ArrayList<>(); + getIngredients(inv, ingredients); + return ingredients.size() > 0; + } + return false; + } + + protected void getIngredients(InventoryCrafting inv, List ingredients) + { + for (int i = 0; i < inv.getSizeInventory(); i++) + { + ItemStack ingredientStack = inv.getStackInSlot(i); + IFood ingredientCap = ingredientStack.getCapability(CapabilityFood.CAPABILITY, null); + if (ingredientCap != null) + { + if (ingredientCap.isRotten()) + { + // Found a rotten ingredient, aborting + ingredients.clear(); + return; + } + ingredients.add(ingredientCap.getData()); + } + } + } +} diff --git a/src/main/java/com/eerussianguy/firmalife/recipe/TrailMixRecipe.java b/src/main/java/com/eerussianguy/firmalife/recipe/TrailMixRecipe.java index a331ab2e..14675ca0 100644 --- a/src/main/java/com/eerussianguy/firmalife/recipe/TrailMixRecipe.java +++ b/src/main/java/com/eerussianguy/firmalife/recipe/TrailMixRecipe.java @@ -24,7 +24,7 @@ import net.dries007.tfc.util.calendar.CalendarTFC; @SuppressWarnings("unused") -public class TrailMixRecipe extends ShapedDamageRecipe +public class TrailMixRecipe extends SandwichBasedRecipe { public TrailMixRecipe(ResourceLocation group, CraftingHelper.ShapedPrimer input, @Nonnull ItemStack result, int damage) { @@ -50,37 +50,6 @@ public ItemStack getCraftingResult(@Nonnull InventoryCrafting inv) return output; } - @Override - public boolean matches(@Nonnull InventoryCrafting inv, @Nonnull World world) - { - if (super.matches(inv, world)) - { - List ingredients = new ArrayList<>(); - getIngredients(inv, ingredients); - return ingredients.size() > 0; - } - return false; - } - - private void getIngredients(InventoryCrafting inv, List ingredients) - { - for (int i = 0; i < inv.getSizeInventory(); i++) - { - ItemStack ingredientStack = inv.getStackInSlot(i); - IFood ingredientCap = ingredientStack.getCapability(CapabilityFood.CAPABILITY, null); - if (ingredientCap != null) - { - if (ingredientCap.isRotten()) - { - // Found a rotten ingredient, aborting - ingredients.clear(); - return; - } - ingredients.add(ingredientCap.getData()); - } - } - } - @SuppressWarnings("unused") public static class Factory implements IRecipeFactory { diff --git a/src/main/java/com/eerussianguy/firmalife/registry/BlocksFL.java b/src/main/java/com/eerussianguy/firmalife/registry/BlocksFL.java index 31142bb2..9b99172c 100644 --- a/src/main/java/com/eerussianguy/firmalife/registry/BlocksFL.java +++ b/src/main/java/com/eerussianguy/firmalife/registry/BlocksFL.java @@ -27,7 +27,6 @@ import net.dries007.tfc.objects.blocks.BlockFluidTFC; import net.dries007.tfc.objects.blocks.BlockTorchTFC; import net.dries007.tfc.objects.blocks.agriculture.*; -import net.dries007.tfc.objects.blocks.wood.BlockSaplingTFC; import net.dries007.tfc.objects.fluids.FluidsTFC; import net.dries007.tfc.objects.fluids.properties.FluidWrapper; import net.dries007.tfc.objects.items.ItemSeedsTFC; @@ -93,6 +92,8 @@ public class BlocksFL public static final BlockSpout SPOUT = Helpers.getNull(); @GameRegistry.ObjectHolder("sprinkler") public static final BlockSpout SPRINKLER = Helpers.getNull(); + @GameRegistry.ObjectHolder("turntable") + public static final BlockTurntable TURNTABLE = Helpers.getNull(); private static ImmutableList allIBs; private static ImmutableList allNormalIBs = Helpers.getNull(); @@ -223,6 +224,7 @@ public static void registerBlocks(RegistryEvent.Register event) register(r, "bee_nest", new BlockBeeNest(), CT_DECORATIONS); normalIBs.add(register(r, "spout", new BlockSpout(false), CT_DECORATIONS)); normalIBs.add(register(r, "sprinkler", new BlockSpout(true), CT_DECORATIONS)); + normalIBs.add(register(r, "turntable", new BlockTurntable(), CT_DECORATIONS)); normalIBs.add(register(r, "cheddar_wheel", new BlockCheesewheel(() -> ItemsFL.CHEDDAR), CT_FOOD)); normalIBs.add(register(r, "chevre_wheel", new BlockCheesewheel(() -> ItemsFL.CHEVRE), CT_FOOD)); @@ -313,6 +315,7 @@ public static void registerBlocks(RegistryEvent.Register event) register(TEString.class, "string"); register(TEStemCrop.class, "stem_crop"); register(TEClimateStation.class, "climate_station"); + register(TETurntable.class, "turntable"); //needs fix FluidsTFC.getWrapper(FluidsFL.COCONUT_MILK.get()); FluidsTFC.getWrapper(FluidsFL.YAK_MILK.get()); diff --git a/src/main/java/com/eerussianguy/firmalife/registry/ItemsFL.java b/src/main/java/com/eerussianguy/firmalife/registry/ItemsFL.java index d1524be3..72033576 100644 --- a/src/main/java/com/eerussianguy/firmalife/registry/ItemsFL.java +++ b/src/main/java/com/eerussianguy/firmalife/registry/ItemsFL.java @@ -137,6 +137,7 @@ public class ItemsFL public static ItemMetalMalletMold malletMold; private static ImmutableList allEasyItems; private static ImmutableList allFruitDoors; + private static ImmutableList unused; public static ImmutableList getAllEasyItems() { @@ -157,6 +158,11 @@ public static ItemFoodFL getFood(FoodFL food) return foods.get(food); } + public static Item getUnused(int idx) + { + return unused.get(idx); + } + @SubscribeEvent public static void registerItems(RegistryEvent.Register event) @@ -165,6 +171,7 @@ public static void registerItems(RegistryEvent.Register event) ImmutableList.Builder easyItems = ImmutableList.builder(); ImmutableList.Builder fruitDoors = ImmutableList.builder(); + ImmutableList.Builder unu = ImmutableList.builder(); for (FoodFL food : FoodFL.values()) { @@ -272,6 +279,13 @@ else if (!food.isReplacingOres()) easyItems.add(register(r, "treated_lumber", new ItemMisc(Size.SMALL, Weight.MEDIUM), CT_MISC)); easyItems.add(register(r, "beeswax", new ItemMisc(Size.VERY_SMALL, Weight.VERY_LIGHT), CT_FOOD)); + for (int i = 0; i < 5; i++) + { + ItemMisc item = register(r, "unused" + i, new ItemMisc(Size.VERY_SMALL, Weight.VERY_LIGHT)); + easyItems.add(item); + unu.add(item); + } + ItemMisc cpole = new ItemMisc(Size.SMALL, Weight.MEDIUM); easyItems.add(register(r, "cinnamon_pole", cpole, CT_MISC)); OreDictionary.registerOre("poleWooden", cpole); @@ -308,6 +322,7 @@ else if (!food.isReplacingOres()) } allEasyItems = easyItems.build(); allFruitDoors = fruitDoors.build(); + unused = unu.build(); } private static String convert(String in) @@ -346,6 +361,14 @@ private static T register(IForgeRegistry r, String name, return item; } + private static T register(IForgeRegistry r, String name, T item) + { + item.setRegistryName(MOD_ID, name); + item.setTranslationKey(MOD_ID + "." + name.replace('/', '.')); + r.register(item); + return item; + } + private static T registerIB(IForgeRegistry r, T item) { item.setRegistryName(item.getBlock().getRegistryName()); diff --git a/src/main/java/com/eerussianguy/firmalife/render/LargePlanterBakedModel.java b/src/main/java/com/eerussianguy/firmalife/render/LargePlanterBakedModel.java index a7af974d..194d32ac 100644 --- a/src/main/java/com/eerussianguy/firmalife/render/LargePlanterBakedModel.java +++ b/src/main/java/com/eerussianguy/firmalife/render/LargePlanterBakedModel.java @@ -4,8 +4,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; - -import javax.annotation.Nonnull; import javax.annotation.Nullable; import com.google.common.collect.ImmutableMap; @@ -15,22 +13,19 @@ import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.ItemOverrideList; import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.client.model.IModel; -import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoaderRegistry; import net.minecraftforge.common.property.IExtendedBlockState; import com.eerussianguy.firmalife.blocks.BlockLargePlanter; -import com.eerussianguy.firmalife.blocks.BlockQuadPlanter; import com.eerussianguy.firmalife.init.StatePropertiesFL; import com.eerussianguy.firmalife.recipe.PlanterRecipe; import mcp.MethodsReturnNonnullByDefault; import static com.eerussianguy.firmalife.FirmaLife.MOD_ID; +import static com.eerussianguy.firmalife.util.ClientHelpers.bake; @MethodsReturnNonnullByDefault public class LargePlanterBakedModel implements IBakedModel @@ -56,23 +51,6 @@ public List getQuads(@Nullable IBlockState state, @Nullable EnumFacin return bake(newModel).getQuads(state, side, rand); } - protected String resolveTexture(IExtendedBlockState state, UnlistedCropProperty property) - { - PlanterRecipe.PlantInfo info = state.getValue(property); - if (info == null || info.getRecipe() == null) return "tfc:blocks/empty"; - ResourceLocation crop = info.getRecipe().getRegistryName(); - if (crop != null && !property.valueToString(info).equals("null")) // epic non-null null - { - return crop.getNamespace() + ":blocks/crop/" + crop.getPath() + "_" + info.getStage(); - } - return "tfc:blocks/empty"; - } - - protected static IBakedModel bake(IModel model) - { - return model.bake(model.getDefaultState(), DefaultVertexFormats.BLOCK, ModelLoader.defaultTextureGetter()); - } - @Override public boolean isAmbientOcclusion() { @@ -102,4 +80,16 @@ public ItemOverrideList getOverrides() { return ItemOverrideList.NONE; } + + protected String resolveTexture(IExtendedBlockState state, UnlistedCropProperty property) + { + PlanterRecipe.PlantInfo info = state.getValue(property); + if (info == null || info.getRecipe() == null) return "tfc:blocks/empty"; + ResourceLocation crop = info.getRecipe().getRegistryName(); + if (crop != null && !property.valueToString(info).equals("null")) // epic non-null null + { + return crop.getNamespace() + ":blocks/crop/" + crop.getPath() + "_" + info.getStage(); + } + return "tfc:blocks/empty"; + } } diff --git a/src/main/java/com/eerussianguy/firmalife/render/QuadPlanterBakedModel.java b/src/main/java/com/eerussianguy/firmalife/render/QuadPlanterBakedModel.java index 4835fa9b..6c54434d 100644 --- a/src/main/java/com/eerussianguy/firmalife/render/QuadPlanterBakedModel.java +++ b/src/main/java/com/eerussianguy/firmalife/render/QuadPlanterBakedModel.java @@ -3,30 +3,24 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import javax.annotation.Nullable; import com.google.common.collect.ImmutableMap; import net.minecraft.block.state.IBlockState; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.IBakedModel; -import net.minecraft.client.renderer.block.model.ItemOverrideList; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.IModel; -import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoaderRegistry; import net.minecraftforge.common.property.IExtendedBlockState; import com.eerussianguy.firmalife.blocks.BlockQuadPlanter; import com.eerussianguy.firmalife.init.StatePropertiesFL; -import com.eerussianguy.firmalife.recipe.PlanterRecipe; import mcp.MethodsReturnNonnullByDefault; import static com.eerussianguy.firmalife.FirmaLife.MOD_ID; +import static com.eerussianguy.firmalife.util.ClientHelpers.bake; @MethodsReturnNonnullByDefault public class QuadPlanterBakedModel extends LargePlanterBakedModel implements IBakedModel diff --git a/src/main/java/com/eerussianguy/firmalife/render/TESRTurntable.java b/src/main/java/com/eerussianguy/firmalife/render/TESRTurntable.java new file mode 100644 index 00000000..8eab612b --- /dev/null +++ b/src/main/java/com/eerussianguy/firmalife/render/TESRTurntable.java @@ -0,0 +1,71 @@ +package com.eerussianguy.firmalife.render; + +import javax.annotation.ParametersAreNonnullByDefault; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.RenderItem; +import net.minecraft.client.renderer.block.model.ItemCameraTransforms; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; + +import com.eerussianguy.firmalife.registry.ItemsFL; +import com.eerussianguy.firmalife.te.TETurntable; + +@ParametersAreNonnullByDefault +@SideOnly(Side.CLIENT) +public class TESRTurntable extends TileEntitySpecialRenderer +{ + public static final ItemStack[] ITEMS = { + new ItemStack(ItemsFL.getUnused(0)), + new ItemStack(ItemsFL.getUnused(1)), + new ItemStack(ItemsFL.getUnused(2)), + new ItemStack(ItemsFL.getUnused(3)), + new ItemStack(ItemsFL.getUnused(4)) + }; + + @Override + public void render(TETurntable te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) + { + super.render(te, x, y, z, partialTicks, destroyStage, alpha); + + if (te.hasWorld()) + { + IBlockState state = te.getWorld().getBlockState(te.getPos()); + IItemHandler cap = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); + RenderItem itemRenderer = Minecraft.getMinecraft().getRenderItem(); + if (cap != null) + { + ItemStack stack = cap.getStackInSlot(0); + if (!stack.isEmpty()) + { + GlStateManager.pushMatrix(); + RenderHelper.enableStandardItemLighting(); + + GlStateManager.translate(x + 0.5F, y + 1.0F, z + 0.5F); + GlStateManager.scale(0.3F, 0.3F, 0.3F); + float timeD = (float) (360.0D * (double) (System.currentTimeMillis() & 16383L) / 16383.0D); + GlStateManager.rotate(timeD, 0.0F, 1.0F, 0.0F); + + itemRenderer.renderItem(stack, ItemCameraTransforms.TransformType.FIXED); + + RenderHelper.disableStandardItemLighting(); + GlStateManager.popMatrix(); + } + } + GlStateManager.pushMatrix(); + GlStateManager.translate(x + 0.5D, y + 0.5D, z + 0.5D); + GlStateManager.rotate((10F * te.getInternalProgress() - partialTicks), 0.0F, 1.0F, 0.0F); + RenderHelper.enableStandardItemLighting(); + itemRenderer.renderItem(ITEMS[te.getBlockMetadata()], ItemCameraTransforms.TransformType.FIXED); + RenderHelper.disableStandardItemLighting(); + GlStateManager.popMatrix(); + } + } +} diff --git a/src/main/java/com/eerussianguy/firmalife/te/TETurntable.java b/src/main/java/com/eerussianguy/firmalife/te/TETurntable.java new file mode 100644 index 00000000..5a6c3666 --- /dev/null +++ b/src/main/java/com/eerussianguy/firmalife/te/TETurntable.java @@ -0,0 +1,178 @@ +package com.eerussianguy.firmalife.te; + +import java.util.List; +import java.util.stream.Collectors; +import javax.annotation.Nonnull; +import javax.annotation.ParametersAreNonnullByDefault; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.World; + +import com.eerussianguy.firmalife.init.StatePropertiesFL; +import mcp.MethodsReturnNonnullByDefault; +import net.dries007.tfc.api.recipes.knapping.KnappingType; +import net.dries007.tfc.api.registries.TFCRegistries; +import net.dries007.tfc.client.TFCSounds; +import net.dries007.tfc.objects.te.TETickableInventory; +import net.dries007.tfc.util.Helpers; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class TETurntable extends TETickableInventory +{ + private static final List POTTERY = TFCRegistries.KNAPPING.getValuesCollection().stream() + .filter(recipe -> recipe.getType().equals(KnappingType.CLAY)) + .map(recipe -> recipe.getOutput(ItemStack.EMPTY).getItem()) + .collect(Collectors.toList()); + + private int speed; + private int progress; + private int internalProgress; + + public TETurntable() + { + super(1); + speed = 0; + progress = 0; + internalProgress = 0; + } + + public int getSpeed() + { + return speed; + } + + public int getInternalProgress() + { + return internalProgress; + } + + public void rotate() + { + speed++; + markForSync(); + world.playSound(null, pos, TFCSounds.QUERN_USE, SoundCategory.BLOCKS, 1.0F, 3.0F); + } + + @Override + public void update() + { + super.update(); + if (speed > 0 && world.getTotalWorldTime() % 10 == 0) + { + speed--; + } + speed = MathHelper.clamp(speed, 0, 20); + if (speed > 0) + { + internalProgress++; + } + int clay = getClayAmount(); + if (clay > 0 && speed > 0) + { + if (world.isRemote && speed > 5) + { + world.spawnParticle(EnumParticleTypes.ITEM_CRACK, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, (world.rand.nextDouble() - world.rand.nextDouble()) / 4.0D, world.rand.nextDouble() / 4.0D, (world.rand.nextDouble() - world.rand.nextDouble()) / 4.0D, Item.getIdFromItem(Items.CLAY_BALL)); + } + if (speed > 15 && hasPottery()) + { + progress++; + if (progress > 40) + { + progress = 0; + speed = 15; + if (!world.isRemote) + { + world.setBlockState(pos, getBlockType().getDefaultState().withProperty(StatePropertiesFL.CLAY, clay - 1)); + Helpers.spawnItemStack(world, pos.up(), item()); + markForSync(); + } + } + } + } + else + { + progress = 0; + } + if (speed == 0 && internalProgress % 360 == 0) + { + internalProgress = 0; + } + } + + private ItemStack item() + { + return inventory.getStackInSlot(0); + } + + public boolean hasPottery() + { + return isPottery(item()); + } + + public static boolean isPottery(ItemStack stack) + { + return POTTERY.contains(stack.getItem()); + } + + public int getClayAmount() + { + return world.getBlockState(pos).getValue(StatePropertiesFL.CLAY); + } + + @Override + @Nonnull + public NBTTagCompound writeToNBT(NBTTagCompound nbt) + { + nbt.setInteger("speed", speed); + nbt.setInteger("progress", progress); + nbt.setInteger("internalProgress", internalProgress); + return super.writeToNBT(nbt); + } + + @Override + public void readFromNBT(NBTTagCompound nbt) + { + super.readFromNBT(nbt); + speed = nbt.getInteger("speed"); + progress = nbt.getInteger("progress"); + internalProgress = nbt.getInteger("internalProgress"); + } + + @Override + public int getSlotLimit(int slot) + { + return 1; + } + + @Override + public boolean isItemValid(int slot, ItemStack stack) + { + return POTTERY.contains(stack.getItem()); + } + + @Override + public void setAndUpdateSlots(int slot) + { + markForBlockUpdate(); + super.setAndUpdateSlots(slot); + } + + public void onBreakBlock(World world, BlockPos pos, IBlockState state) + { + Helpers.spawnItemStack(world, pos, inventory.getStackInSlot(0)); + int clay = state.getValue(StatePropertiesFL.CLAY); + if (clay > 0) + { + Helpers.spawnItemStack(world, pos, new ItemStack(Items.CLAY_BALL, 5 * clay)); + } + } +} diff --git a/src/main/java/com/eerussianguy/firmalife/util/ClientHelpers.java b/src/main/java/com/eerussianguy/firmalife/util/ClientHelpers.java index bcbf58fa..95c1c495 100644 --- a/src/main/java/com/eerussianguy/firmalife/util/ClientHelpers.java +++ b/src/main/java/com/eerussianguy/firmalife/util/ClientHelpers.java @@ -1,7 +1,11 @@ package com.eerussianguy.firmalife.util; +import net.minecraft.client.renderer.block.model.IBakedModel; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.entity.Entity; import net.minecraft.util.math.Vec3d; +import net.minecraftforge.client.model.IModel; +import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -15,4 +19,9 @@ public static Vec3d getEntityMovementPartial(Entity entity, float partialTicks) final double z = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * partialTicks; return new Vec3d(x, y, z); } + + public static IBakedModel bake(IModel model) + { + return model.bake(model.getDefaultState(), DefaultVertexFormats.BLOCK, ModelLoader.defaultTextureGetter()); + } } diff --git a/src/main/resources/assets/firmalife/blockstates/turntable.json b/src/main/resources/assets/firmalife/blockstates/turntable.json new file mode 100644 index 00000000..fac8c5dc --- /dev/null +++ b/src/main/resources/assets/firmalife/blockstates/turntable.json @@ -0,0 +1,16 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "firmalife:turntable_base" + }, + "variants": { + "inventory": [{ + "transform": "forge:default-block", + "model": "firmalife:turntable_base" + }], + "normal": [{ + "transform": "forge:default-block", + "model": "firmalife:turntable_base" + }] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/firmalife/lang/en_us.lang b/src/main/resources/assets/firmalife/lang/en_us.lang index 6abc1c95..c8af26fa 100644 --- a/src/main/resources/assets/firmalife/lang/en_us.lang +++ b/src/main/resources/assets/firmalife/lang/en_us.lang @@ -138,6 +138,14 @@ item.firmalife.peach_door.name=Peach Door item.firmalife.plum_door.name=Plum Door item.firmalife.red_apple_door.name=Red Apple Door +tile.firmalife.chestnut_pile.name=Chestnut Grain Pile +tile.firmalife.rye_pile.name=Rye Grain Pile +tile.firmalife.rice_pile.name=Rice Grain Pile +tile.firmalife.wheat_pile.name=Wheat Grain Pile +tile.firmalife.barley_pile.name=Barley Grain Pile +tile.firmalife.oat_pile.name=Oat Grain Pile +tile.firmalife.maize_pile.name=Maize Pile + tile.firmalife.banana_door.name=Banana Door tile.firmalife.cherry_door.name=Cherry Door tile.firmalife.cinnamon_door.name=Cinnamon Door @@ -258,6 +266,7 @@ tile.firmalife.feta_wheel.name=Feta Wheel tile.firmalife.shosha_wheel.name=Shosha Wheel tile.firmalife.spout.name=Spout tile.firmalife.sprinkler.name=Sprinkler +tile.firmalife.turntable.name=Turntable item.firmalife.unfired_mallet_mold.name=Unfired Mallet Head Mold item.firmalife.mallet_mold.name=Mallet Head Mold diff --git a/src/main/resources/assets/firmalife/models/block/turntable_base.json b/src/main/resources/assets/firmalife/models/block/turntable_base.json new file mode 100644 index 00000000..dd8505a3 --- /dev/null +++ b/src/main/resources/assets/firmalife/models/block/turntable_base.json @@ -0,0 +1,20 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "tfc:blocks/wood/planks/douglas_fir", + "particle": "tfc:blocks/metal/wrought_iron" + }, + "elements": [ + { + "from": [4, 0, 4], + "to": [12, 3, 12], + "faces": { + "north": {"uv": [0, 6, 8, 9], "texture": "#1"}, + "east": {"uv": [0, 6, 8, 9], "texture": "#1"}, + "south": {"uv": [0, 6, 8, 9], "texture": "#1"}, + "west": {"uv": [0, 6, 8, 9], "texture": "#1"}, + "down": {"uv": [0, 2, 8, 10], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/firmalife/models/block/turntable_static.json b/src/main/resources/assets/firmalife/models/block/turntable_static.json new file mode 100644 index 00000000..78b18374 --- /dev/null +++ b/src/main/resources/assets/firmalife/models/block/turntable_static.json @@ -0,0 +1,33 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "tfc:blocks/metal/wrought_iron", + "1": "tfc:blocks/wood/planks/douglas_fir", + "particle": "tfc:blocks/metal/wrought_iron" + }, + "elements": [ + { + "from": [4, 0, 4], + "to": [12, 3, 12], + "faces": { + "north": {"uv": [0, 6, 8, 9], "texture": "#1"}, + "east": {"uv": [0, 6, 8, 9], "texture": "#1"}, + "south": {"uv": [0, 6, 8, 9], "texture": "#1"}, + "west": {"uv": [0, 6, 8, 9], "texture": "#1"}, + "down": {"uv": [0, 2, 8, 10], "texture": "#1"} + } + }, + { + "from": [3, 3, 3], + "to": [13, 4, 13], + "faces": { + "north": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 10, 10], "texture": "#0"}, + "down": {"uv": [0, 0, 10, 10], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/firmalife/models/item/unused0.json b/src/main/resources/assets/firmalife/models/item/unused0.json new file mode 100644 index 00000000..143ec9a3 --- /dev/null +++ b/src/main/resources/assets/firmalife/models/item/unused0.json @@ -0,0 +1,21 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "tfc:blocks/metal/wrought_iron", + "particle": "tfc:blocks/metal/wrought_iron" + }, + "elements": [ + { + "from": [3, 3, 3], + "to": [13, 4, 13], + "faces": { + "north": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 10, 10], "texture": "#0"}, + "down": {"uv": [0, 0, 10, 10], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/firmalife/models/item/unused1.json b/src/main/resources/assets/firmalife/models/item/unused1.json new file mode 100644 index 00000000..9fe299e0 --- /dev/null +++ b/src/main/resources/assets/firmalife/models/item/unused1.json @@ -0,0 +1,33 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "tfc:blocks/metal/wrought_iron", + "2": "tfc:gui/knapping/clay_button", + "particle": "tfc:blocks/metal/wrought_iron" + }, + "elements": [ + { + "from": [3, 3, 3], + "to": [13, 4, 13], + "faces": { + "north": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 10, 10], "texture": "#0"}, + "down": {"uv": [0, 0, 10, 10], "texture": "#0"} + } + }, + { + "from": [4, 4, 4], + "to": [12, 5, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/firmalife/models/item/unused2.json b/src/main/resources/assets/firmalife/models/item/unused2.json new file mode 100644 index 00000000..13c7e0ab --- /dev/null +++ b/src/main/resources/assets/firmalife/models/item/unused2.json @@ -0,0 +1,44 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "tfc:blocks/metal/wrought_iron", + "2": "tfc:gui/knapping/clay_button", + "particle": "tfc:blocks/metal/wrought_iron" + }, + "elements": [ + { + "from": [3, 3, 3], + "to": [13, 4, 13], + "faces": { + "north": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 10, 10], "texture": "#0"}, + "down": {"uv": [0, 0, 10, 10], "texture": "#0"} + } + }, + { + "from": [4, 4, 4], + "to": [12, 5, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + }, + { + "from": [4, 5, 4], + "to": [12, 6, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/firmalife/models/item/unused3.json b/src/main/resources/assets/firmalife/models/item/unused3.json new file mode 100644 index 00000000..8bc11920 --- /dev/null +++ b/src/main/resources/assets/firmalife/models/item/unused3.json @@ -0,0 +1,55 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "tfc:blocks/metal/wrought_iron", + "2": "tfc:gui/knapping/clay_button", + "particle": "tfc:blocks/metal/wrought_iron" + }, + "elements": [ + { + "from": [3, 3, 3], + "to": [13, 4, 13], + "faces": { + "north": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 10, 10], "texture": "#0"}, + "down": {"uv": [0, 0, 10, 10], "texture": "#0"} + } + }, + { + "from": [4, 4, 4], + "to": [12, 5, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + }, + { + "from": [4, 5, 4], + "to": [12, 6, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + }, + { + "from": [4, 6, 4], + "to": [12, 7, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/firmalife/models/item/unused4.json b/src/main/resources/assets/firmalife/models/item/unused4.json new file mode 100644 index 00000000..f719f866 --- /dev/null +++ b/src/main/resources/assets/firmalife/models/item/unused4.json @@ -0,0 +1,66 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "tfc:blocks/metal/wrought_iron", + "2": "tfc:gui/knapping/clay_button", + "particle": "tfc:blocks/metal/wrought_iron" + }, + "elements": [ + { + "from": [3, 3, 3], + "to": [13, 4, 13], + "faces": { + "north": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 10, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 10, 10], "texture": "#0"}, + "down": {"uv": [0, 0, 10, 10], "texture": "#0"} + } + }, + { + "from": [4, 4, 4], + "to": [12, 5, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + }, + { + "from": [4, 5, 4], + "to": [12, 6, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + }, + { + "from": [4, 6, 4], + "to": [12, 7, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + }, + { + "from": [4, 7, 4], + "to": [12, 8, 12], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#2"} + } + } + ] +} \ No newline at end of file