diff --git a/gradle.properties b/gradle.properties index 47da8528..a9d185c3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ mcversion=1.10.2 forgeversion=12.18.2.2114 mcp_mappings=snapshot_20160525 -forestry_version=5.2.17.353 +forestry_version=5.2.17.355 version_major=2 version_minor=0 diff --git a/src/main/java/binnie/botany/Botany.java b/src/main/java/binnie/botany/Botany.java index b5e98274..e7c11fab 100644 --- a/src/main/java/binnie/botany/Botany.java +++ b/src/main/java/binnie/botany/Botany.java @@ -7,7 +7,7 @@ import binnie.botany.api.IFlower; import binnie.botany.api.gardening.IBlockSoil; import binnie.botany.ceramic.BlockCeramic; import binnie.botany.ceramic.BlockCeramicPatterned; -import binnie.botany.ceramic.BlockStained; +import binnie.botany.ceramic.BlockStainedGlass; import binnie.botany.ceramic.brick.BlockCeramicBrick; import binnie.botany.core.BotanyCore; import binnie.botany.core.BotanyGUI; @@ -90,7 +90,7 @@ public class Botany extends AbstractMod { public static ItemClay clay; public static BlockCeramic ceramic; public static BlockCeramicPatterned ceramicTile; - public static BlockStained stained; + public static BlockStainedGlass stained; public static BlockCeramicBrick ceramicBrick; public static final float AGE_CHANCE = 0.2f; diff --git a/src/main/java/binnie/botany/ceramic/BlockStained.java b/src/main/java/binnie/botany/ceramic/BlockStainedGlass.java similarity index 80% rename from src/main/java/binnie/botany/ceramic/BlockStained.java rename to src/main/java/binnie/botany/ceramic/BlockStainedGlass.java index ec8a8bd3..5da9cee7 100644 --- a/src/main/java/binnie/botany/ceramic/BlockStained.java +++ b/src/main/java/binnie/botany/ceramic/BlockStainedGlass.java @@ -2,10 +2,11 @@ package binnie.botany.ceramic; import binnie.botany.CreativeTabBotany; import binnie.botany.genetics.EnumFlowerColor; +import binnie.core.BinnieCore; import binnie.core.block.BlockMetadata; import binnie.core.block.IBlockMetadata; import binnie.core.block.TileEntityMetadata; -import binnie.extratrees.ExtraTrees; +import binnie.core.util.TileUtil; import forestry.core.blocks.IColoredBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -24,11 +25,13 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Random; -public class BlockStained extends Block implements IBlockMetadata, IColoredBlock { - public BlockStained() { +public class BlockStainedGlass extends Block implements IBlockMetadata, IColoredBlock { + public BlockStainedGlass() { super(Material.GLASS); this.setCreativeTab(CreativeTabBotany.instance); this.setRegistryName("stained"); @@ -55,17 +58,34 @@ public class BlockStained extends Block implements IBlockMetadata, IColoredBlock public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { Block block2 = blockAccess.getBlockState(pos.offset(side)).getBlock(); Block block3 = blockAccess.getBlockState(pos).getBlock(); - return block3 != this && block3 != ExtraTrees.blockStained && super.shouldSideBeRendered(blockState, blockAccess, pos, side); + return true/*block3 != this && block3 != ExtraTrees.blockStained && super.shouldSideBeRendered(blockState, blockAccess, pos, side)*/; } @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { - return BlockMetadata.getBlockDropped(this, world, pos); + List list = new ArrayList<>(); + TileEntityMetadata tile = TileEntityMetadata.getTile(world, pos); + if (tile != null && !tile.hasDroppedBlock()) { + int meta = getDroppedMeta(getMetaFromState(state), tile.getTileMetadata()); + list.add(TileEntityMetadata.getItemStack(this, meta)); + } + return list; } @Override public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest) { - return BlockMetadata.breakBlock(this, player, world, pos); + List drops = new ArrayList<>(); + TileCeramic ceramic = TileUtil.getTile(world, pos, TileCeramic.class); + if (ceramic != null) { + drops = Collections.singletonList(ceramic.getStack()); + } + boolean hasBeenBroken = world.setBlockToAir(pos); + if (hasBeenBroken && BinnieCore.proxy.isSimulating(world) && drops.size() > 0 && (player == null || !player.capabilities.isCreativeMode)) { + for (ItemStack drop : drops) { + spawnAsEntity(world, pos, drop); + } + } + return hasBeenBroken; } @Override diff --git a/src/main/java/binnie/botany/gardening/BlockSoil.java b/src/main/java/binnie/botany/gardening/BlockSoil.java index b90bd78b..ffe15d7c 100644 --- a/src/main/java/binnie/botany/gardening/BlockSoil.java +++ b/src/main/java/binnie/botany/gardening/BlockSoil.java @@ -10,9 +10,6 @@ import binnie.botany.api.gardening.IBlockSoil; import forestry.api.core.IItemModelRegister; import forestry.api.core.IModelManager; import net.minecraft.block.Block; -import net.minecraft.block.BlockDirt; -import net.minecraft.block.BlockGrass; -import net.minecraft.block.BlockGrassPath; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyEnum; @@ -57,7 +54,8 @@ public class BlockSoil extends Block implements IBlockSoil, IItemModelRegister { this.type = type; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { switch (side){ case UP: @@ -77,11 +75,13 @@ public class BlockSoil extends Block implements IBlockSoil, IItemModelRegister { /** * Used to determine ambient occlusion and culling when rebuilding chunks for render */ - public boolean isOpaqueCube(IBlockState state){ + @Override + public boolean isOpaqueCube(IBlockState state){ return false; } - public boolean isFullCube(IBlockState state){ + @Override + public boolean isFullCube(IBlockState state){ return false; } diff --git a/src/main/java/binnie/botany/gardening/ModuleGardening.java b/src/main/java/binnie/botany/gardening/ModuleGardening.java index 4b0e8053..1245a602 100644 --- a/src/main/java/binnie/botany/gardening/ModuleGardening.java +++ b/src/main/java/binnie/botany/gardening/ModuleGardening.java @@ -8,7 +8,7 @@ import binnie.botany.api.EnumMoisture; import binnie.botany.api.EnumSoilType; import binnie.botany.ceramic.BlockCeramic; import binnie.botany.ceramic.BlockCeramicPatterned; -import binnie.botany.ceramic.BlockStained; +import binnie.botany.ceramic.BlockStainedGlass; import binnie.botany.ceramic.CeramicTileRecipe; import binnie.botany.ceramic.ItemCeramic; import binnie.botany.ceramic.PigmentRecipe; @@ -47,26 +47,20 @@ public class ModuleGardening implements IInitializable { @Override public void preInit() { - Botany.proxy.registerBlock(Botany.plant = new BlockPlant()); - Botany.proxy.registerItem(new ItemWeed(Botany.plant).setRegistryName(Botany.plant.getRegistryName())); + Botany.plant = new BlockPlant(); + Botany.proxy.registerBlock(Botany.plant, new ItemWeed(Botany.plant)); Botany.soil = new BlockSoil(EnumSoilType.SOIL, "soil", false); - Botany.proxy.registerBlock(Botany.soil); - Botany.proxy.registerItem(new ItemSoil(Botany.soil).setRegistryName(Botany.soil.getRegistryName())); + Botany.proxy.registerBlock(Botany.soil, new ItemSoil(Botany.soil)); Botany.loam = new BlockSoil(EnumSoilType.LOAM, "loam", false); - Botany.proxy.registerBlock(Botany.loam); - Botany.proxy.registerItem(new ItemSoil(Botany.loam).setRegistryName(Botany.loam.getRegistryName())); + Botany.proxy.registerBlock(Botany.loam, new ItemSoil(Botany.loam)); Botany.flowerbed = new BlockSoil(EnumSoilType.FLOWERBED, "flowerbed", false); - Botany.proxy.registerBlock(Botany.flowerbed); - Botany.proxy.registerItem(new ItemSoil(Botany.flowerbed).setRegistryName(Botany.flowerbed.getRegistryName())); + Botany.proxy.registerBlock(Botany.flowerbed, new ItemSoil(Botany.flowerbed)); Botany.soilNoWeed = new BlockSoil(EnumSoilType.SOIL, "soilNoWeed", true); - Botany.proxy.registerBlock(Botany.soilNoWeed); - Botany.proxy.registerItem(new ItemSoil(Botany.soilNoWeed).setRegistryName(Botany.soilNoWeed.getRegistryName())); + Botany.proxy.registerBlock(Botany.soilNoWeed, new ItemSoil(Botany.soilNoWeed)); Botany.loamNoWeed = new BlockSoil(EnumSoilType.LOAM, "loamNoWeed", true); - Botany.proxy.registerBlock(Botany.loamNoWeed); - Botany.proxy.registerItem(new ItemSoil(Botany.loamNoWeed).setRegistryName(Botany.loamNoWeed.getRegistryName())); + Botany.proxy.registerBlock(Botany.loamNoWeed, new ItemSoil(Botany.loamNoWeed)); Botany.flowerbedNoWeed = new BlockSoil(EnumSoilType.FLOWERBED, "flowerbedNoWeed", true); - Botany.proxy.registerBlock(Botany.flowerbedNoWeed); - Botany.proxy.registerItem(new ItemSoil(Botany.flowerbedNoWeed).setRegistryName(Botany.flowerbedNoWeed.getRegistryName())); + Botany.proxy.registerBlock(Botany.flowerbedNoWeed, new ItemSoil(Botany.flowerbedNoWeed)); Botany.soilMeter = new ItemSoilMeter(); Botany.proxy.registerItem(Botany.soilMeter); Botany.insulatedTube = new ItemInsulatedTube(); @@ -88,20 +82,16 @@ public class ModuleGardening implements IInitializable { Botany.clay = new ItemClay(); Botany.proxy.registerItem(Botany.clay); Botany.ceramic = new BlockCeramic(); - Botany.proxy.registerBlock(Botany.ceramic); - Botany.proxy.registerItem(new ItemCeramic(Botany.ceramic).setRegistryName(Botany.ceramic.getRegistryName())); + Botany.proxy.registerBlock(Botany.ceramic, new ItemCeramic(Botany.ceramic)); BinnieCore.proxy.registerTileEntity(TileCeramic.class, "botany.tile.ceramic"); // BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(Botany.ceramic), new ItemMetadataRenderer()); - Botany.stained = new BlockStained(); - Botany.proxy.registerBlock(Botany.stained); - Botany.proxy.registerItem(new ItemMetadata(Botany.stained).setRegistryName(Botany.stained.getRegistryName())); + Botany.stained = new BlockStainedGlass(); + Botany.proxy.registerBlock(Botany.stained, new ItemMetadata(Botany.stained)); // BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(Botany.stained), new ItemMetadataRenderer()); Botany.ceramicTile = new BlockCeramicPatterned(); - Botany.proxy.registerBlock(Botany.ceramicTile); - Botany.proxy.registerItem(new ItemMetadata(Botany.ceramicTile).setRegistryName(Botany.ceramicTile.getRegistryName())); + Botany.proxy.registerBlock(Botany.ceramicTile, new ItemMetadata(Botany.ceramicTile)); Botany.ceramicBrick = new BlockCeramicBrick(); - Botany.proxy.registerBlock(Botany.ceramicBrick); - Botany.proxy.registerItem(new ItemCeramicBrick(Botany.ceramicBrick).setRegistryName(Botany.ceramicBrick.getRegistryName())); + Botany.proxy.registerBlock(Botany.ceramicBrick, new ItemCeramicBrick(Botany.ceramicBrick)); GameRegistry.registerTileEntity(TileCeramicBrick.class, ""); BinnieCore.proxy.registerTileEntity(TileCeramicBrick.class, "botany.tile.ceramicBrick"); // BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(Botany.ceramicTile), new MultipassItemRenderer()); diff --git a/src/main/java/binnie/core/block/BlockMetadata.java b/src/main/java/binnie/core/block/BlockMetadata.java index 87df5c35..22eaef7e 100644 --- a/src/main/java/binnie/core/block/BlockMetadata.java +++ b/src/main/java/binnie/core/block/BlockMetadata.java @@ -15,6 +15,8 @@ import net.minecraft.world.World; import java.util.ArrayList; import java.util.List; +import binnie.core.BinnieCore; + public class BlockMetadata extends BlockContainer implements IBlockMetadata { static int temporyMeta = -1; @@ -91,17 +93,16 @@ public class BlockMetadata extends BlockContainer implements IBlockMetadata { final Block block2 = (Block) block; final TileEntityMetadata tile = TileEntityMetadata.getTile(world, pos); if (tile != null && !tile.hasDroppedBlock()) { - final int tileMeta = TileEntityMetadata.getTileMetadata(world, pos); - //drops = block2.getDrops(world, i, j, k, world.getBlockMetadata(i, j, k), 0); + drops = block2.getDrops(world, pos, world.getBlockState(pos), 0); } - //final boolean hasBeenBroken = world.setBlockToAir(i, j, k); -// if (hasBeenBroken && BinnieCore.proxy.isSimulating(world) && drops.size() > 0 && (player == null || !player.capabilities.isCreativeMode)) { -// for (final ItemStack drop : drops) { -// //block.dropAsStack(world, i, j, k, drop); -// } -// tile.dropBlock(); -// } - return false; //hasBeenBroken; + final boolean hasBeenBroken = world.setBlockToAir(pos); + if (hasBeenBroken && BinnieCore.proxy.isSimulating(world) && drops.size() > 0 && (player == null || !player.capabilities.isCreativeMode)) { + for (final ItemStack drop : drops) { + block.dropAsStack(world, pos, drop); + } + tile.dropBlock(); + } + return hasBeenBroken; } @Override diff --git a/src/main/java/binnie/core/liquid/ItemFluidContainer.java b/src/main/java/binnie/core/liquid/ItemFluidContainer.java index 58187979..f8a62a87 100644 --- a/src/main/java/binnie/core/liquid/ItemFluidContainer.java +++ b/src/main/java/binnie/core/liquid/ItemFluidContainer.java @@ -7,21 +7,17 @@ import binnie.extratrees.alcohol.drink.IDrinkLiquid; import forestry.api.core.IItemModelRegister; import forestry.api.core.IModelManager; import forestry.core.items.IColoredItem; -import forestry.core.items.ItemFluidContainerForestry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.SoundEvents; import net.minecraft.item.EnumAction; import net.minecraft.item.Item; -import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.util.SoundCategory; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; -import scala.collection.parallel.BucketCombiner; - import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/binnie/core/proxy/BinnieModProxy.java b/src/main/java/binnie/core/proxy/BinnieModProxy.java index 1b85b9a9..8715c8f6 100644 --- a/src/main/java/binnie/core/proxy/BinnieModProxy.java +++ b/src/main/java/binnie/core/proxy/BinnieModProxy.java @@ -10,6 +10,7 @@ import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; import net.minecraft.util.math.BlockPos; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -33,6 +34,16 @@ public class BinnieModProxy implements IBinnieModProxy { public Block registerBlock(Block block) { return GameRegistry.register(block); } + + @Override + public void registerBlock(T block, ItemBlock itemBlock) { + registerBlock(block); + + if(itemBlock.getRegistryName() == null){ + itemBlock.setRegistryName(block.getRegistryName()); + } + registerItem(itemBlock); + } @Override public void registerModels() { diff --git a/src/main/java/binnie/core/proxy/IProxyCore.java b/src/main/java/binnie/core/proxy/IProxyCore.java index 8c6287ed..4a52c3c2 100644 --- a/src/main/java/binnie/core/proxy/IProxyCore.java +++ b/src/main/java/binnie/core/proxy/IProxyCore.java @@ -4,6 +4,7 @@ import binnie.core.AbstractMod; import binnie.core.IInitializable; import net.minecraft.block.Block; import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; public interface IProxyCore extends IInitializable { @@ -12,6 +13,8 @@ public interface IProxyCore extends IInitializable { Item registerItem(Item item); Block registerBlock(Block block); + + void registerBlock(B block, ItemBlock itemBlock); public void registerModels(); diff --git a/src/main/java/binnie/extratrees/ExtraTrees.java b/src/main/java/binnie/extratrees/ExtraTrees.java index f56648d4..7ea84769 100644 --- a/src/main/java/binnie/extratrees/ExtraTrees.java +++ b/src/main/java/binnie/extratrees/ExtraTrees.java @@ -13,6 +13,9 @@ import binnie.extratrees.alcohol.drink.ItemDrink; import binnie.extratrees.block.ModuleBlocks; import binnie.extratrees.block.decor.BlockHedge; import binnie.extratrees.block.decor.BlockMultiFence; +import binnie.extratrees.block.log.BlockETLog; +import binnie.extratrees.block.plank.BlockETPlank; +import binnie.extratrees.block.slab.BlockETSlab; import binnie.extratrees.carpentry.BlockCarpentry; import binnie.extratrees.carpentry.BlockStainedDesign; import binnie.extratrees.carpentry.ModuleCarpentry; @@ -26,6 +29,7 @@ import binnie.extratrees.proxy.Proxy; import forestry.api.arboriculture.ITreeRoot; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.AlleleSpeciesRegisterEvent; +import forestry.arboriculture.blocks.BlockForestryStairs; import net.minecraft.block.Block; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; @@ -55,6 +59,16 @@ public class ExtraTrees extends AbstractMod { public static Item itemDictionaryLepi; public static Item itemMisc; public static Item itemFood; + public static List logs; + public static List logsFireproof; + public static List planks; + public static List planksFireproof; + public static List slabs; + public static List slabsDouble; + public static List slabsFireproof; + public static List slabsDoubleFireproof; + public static List stairs; + public static List stairsFireproof; public static Block blockStairs; public static BlockCarpentry blockCarpentry; public static Block blockMachine; diff --git a/src/main/java/binnie/extratrees/block/EnumExtraTreeLog.java b/src/main/java/binnie/extratrees/block/EnumExtraTreeLog.java index b1f7b6b0..1e9b314b 100644 --- a/src/main/java/binnie/extratrees/block/EnumExtraTreeLog.java +++ b/src/main/java/binnie/extratrees/block/EnumExtraTreeLog.java @@ -1,5 +1,7 @@ package binnie.extratrees.block; +import javax.annotation.Nonnull; + import binnie.Constants; import forestry.api.arboriculture.IWoodType; @@ -46,6 +48,8 @@ public enum EnumExtraTreeLog implements IWoodType { PinkIvory("Pink Ivory", PlankType.ExtraTreePlanks.PinkIvory), EMPTY("EMPTY", PlankType.VanillaPlanks.OAK);//TODO change name/create wood for SHRUBS + public static final EnumExtraTreeLog[] VALUES = values(); + String name; IPlankType plank; @@ -118,5 +122,13 @@ public enum EnumExtraTreeLog implements IWoodType { public int getMetadata() { return ordinal(); } + + @Nonnull + public static EnumExtraTreeLog byMetadata(int meta) { + if (meta < 0 || meta >= VALUES.length) { + meta = 0; + } + return VALUES[meta]; + } } diff --git a/src/main/java/binnie/extratrees/block/ModuleBlocks.java b/src/main/java/binnie/extratrees/block/ModuleBlocks.java index b6d17e29..6da8f4d5 100644 --- a/src/main/java/binnie/extratrees/block/ModuleBlocks.java +++ b/src/main/java/binnie/extratrees/block/ModuleBlocks.java @@ -1,5 +1,8 @@ package binnie.extratrees.block; +import java.util.ArrayList; + +import binnie.Constants; import binnie.core.IInitializable; import binnie.core.Mods; import binnie.core.block.ItemMetadata; @@ -7,18 +10,32 @@ import binnie.core.liquid.ILiquidType; import binnie.extratrees.ExtraTrees; import binnie.extratrees.block.decor.*; import binnie.extratrees.block.log.BlockETLog; +import binnie.extratrees.block.log.ItemETLog; import binnie.extratrees.block.plank.BlockETPlank; +import binnie.extratrees.block.plank.ItemETPlank; import binnie.extratrees.block.slab.BlockETSlab; -import binnie.extratrees.block.stairs.BlockETStairs; -import binnie.extratrees.genetics.WoodAccess; +import binnie.extratrees.block.slab.ItemETSlab; +import binnie.extratrees.block.stairs.ItemETStairs; import binnie.extratrees.item.ExtraTreeLiquid; import forestry.api.arboriculture.EnumVanillaWoodType; +import forestry.api.arboriculture.IWoodAccess; import forestry.api.arboriculture.IWoodType; import forestry.api.arboriculture.TreeManager; import forestry.api.arboriculture.WoodBlockKind; import forestry.api.recipes.RecipeManagers; +import forestry.arboriculture.WoodAccess; +import forestry.arboriculture.blocks.BlockForestryStairs; +import forestry.core.recipes.RecipeUtil; +import forestry.core.utils.OreDictUtil; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fml.common.event.FMLInterModComms; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.RecipeSorter; @@ -31,10 +48,93 @@ public class ModuleBlocks implements IInitializable { public void preInit() { PlankType.setup(); - BlockETLog.init(); - BlockETPlank.init(); - BlockETSlab.init(); - BlockETStairs.init(); + //TODO: clean up + ExtraTrees.logs = BlockETLog.create(false); + for (BlockETLog block : ExtraTrees.logs) { + ExtraTrees.proxy.registerBlock(block, new ItemETLog(block)); + registerOreDictWildcard(OreDictUtil.LOG_WOOD, block); + } + + ExtraTrees.logsFireproof = BlockETLog.create(true); + for (BlockETLog block : ExtraTrees.logsFireproof) { + ExtraTrees.proxy.registerBlock(block, new ItemETLog(block)); + registerOreDictWildcard(OreDictUtil.LOG_WOOD, block); + } + + WoodAccess.registerLogs(ExtraTrees.logs); + WoodAccess.registerLogs(ExtraTrees.logsFireproof); + + ExtraTrees.planks = BlockETPlank.create(false); + for (BlockETPlank block : ExtraTrees.planks) { + ExtraTrees.proxy.registerBlock(block, new ItemETPlank(block)); + registerOreDictWildcard(OreDictUtil.PLANK_WOOD, block); + } + + ExtraTrees.planksFireproof = BlockETPlank.create(true); + for (BlockETPlank block : ExtraTrees.planksFireproof) { + ExtraTrees.proxy.registerBlock(block, new ItemETPlank(block)); + registerOreDictWildcard(OreDictUtil.PLANK_WOOD, block); + } + + WoodAccess.registerPlanks(ExtraTrees.planks); + WoodAccess.registerPlanks(ExtraTrees.planksFireproof); + + ExtraTrees.slabs = BlockETSlab.create(false, false); + ExtraTrees.slabsDouble = BlockETSlab.create(false, true); + for (int i = 0; i < ExtraTrees.slabs.size(); i++) { + BlockETSlab slab = ExtraTrees.slabs.get(i); + BlockETSlab slabDouble = ExtraTrees.slabsDouble.get(i); + ExtraTrees.proxy.registerBlock(slab, new ItemETSlab(slab, slab, slabDouble)); + ExtraTrees.proxy.registerBlock(slabDouble, new ItemETSlab(slabDouble, slab, slabDouble)); + registerOreDictWildcard(OreDictUtil.SLAB_WOOD, slab); + } + + ExtraTrees.slabsFireproof = BlockETSlab.create(true, false); + ExtraTrees.slabsDoubleFireproof = BlockETSlab.create(true, true); + for (int i = 0; i < ExtraTrees.slabsFireproof.size(); i++) { + BlockETSlab slab = ExtraTrees.slabsFireproof.get(i); + BlockETSlab slabDouble = ExtraTrees.slabsDoubleFireproof.get(i); + ExtraTrees.proxy.registerBlock(slab, new ItemETSlab(slab, slab, slabDouble)); + ExtraTrees.proxy.registerBlock(slabDouble, new ItemETSlab(slabDouble, slab, slabDouble)); + registerOreDictWildcard(OreDictUtil.SLAB_WOOD, slab); + } + WoodAccess.registerSlabs(ExtraTrees.slabs); + WoodAccess.registerSlabs(ExtraTrees.slabsFireproof); + + ExtraTrees.stairs = new ArrayList<>(); + for (BlockETPlank plank : ExtraTrees.planks) { + for (IBlockState blockState : plank.getBlockState().getValidStates()) { + int meta = plank.getMetaFromState(blockState); + EnumExtraTreeLog woodType = plank.getWoodType(meta); + + BlockForestryStairs stair = new BlockForestryStairs(false, blockState, woodType); + String name = "stairs." + woodType; + stair.setRegistryName(new ResourceLocation(Constants.EXTRA_TREES_MOD_ID, name)); + stair.setUnlocalizedName(name); + ExtraTrees.proxy.registerBlock(stair, new ItemETStairs(stair)); + ExtraTrees.stairs.add(stair); + registerOreDictWildcard(OreDictUtil.STAIR_WOOD, stair); + } + } + + ExtraTrees.stairsFireproof = new ArrayList<>(); + for (BlockETPlank plank : ExtraTrees.planksFireproof) { + for (IBlockState blockState : plank.getBlockState().getValidStates()) { + int meta = plank.getMetaFromState(blockState); + EnumExtraTreeLog woodType = plank.getWoodType(meta); + + BlockForestryStairs stair = new BlockForestryStairs(true, blockState, woodType); + String name = "stairs.fireproof." + woodType; + stair.setRegistryName(new ResourceLocation(Constants.EXTRA_TREES_MOD_ID, "stairs.fireproof." + woodType)); + stair.setUnlocalizedName(name); + ExtraTrees.proxy.registerBlock(stair, new ItemETStairs(stair)); + ExtraTrees.stairsFireproof.add(stair); + registerOreDictWildcard(OreDictUtil.STAIR_WOOD, stair); + } + } + + WoodAccess.registerStairs(ExtraTrees.stairs); + WoodAccess.registerStairs(ExtraTrees.stairsFireproof); ExtraTrees.blockFence = new BlockFence("fence"); ExtraTrees.blockGate = new BlockGate(); @@ -54,16 +154,14 @@ public class ModuleBlocks implements IInitializable { // GameRegistry.register(new ItemETStairs(ExtraTrees.blockStairs).setRegistryName(ExtraTrees.blockStairs.getRegistryName())); //BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockStairs), new StairItemRenderer()); //BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockGate), new GateItemRenderer()); - for (final EnumExtraTreeLog plank : EnumExtraTreeLog.values()) { - OreDictionary.registerOre("logWood", WoodAccess.getInstance().getStack(plank, WoodBlockKind.LOG, false)); - OreDictionary.registerOre("plankWood", WoodAccess.getInstance().getStack(plank, WoodBlockKind.PLANKS, false)); + for (BlockETLog log : ExtraTrees.logs) { + ItemStack logInput = new ItemStack(log, 1, OreDictionary.WILDCARD_VALUE); + ItemStack coalOutput = new ItemStack(Items.COAL, 1, 1); + RecipeUtil.addSmelting(logInput, coalOutput, 0.15F); } -// GameRegistry.addSmelting(ExtraTrees.blockLog, new ItemStack(Items.COAL, 1, 1), 0.15f); - // FMLInterModComms.sendMessage("forestry", "add-fence-block", "ExtraTrees:fence"); - // FMLInterModComms.sendMessage("forestry", "add-fence-block", "ExtraTrees:gate"); - // FMLInterModComms.sendMessage("Forestry", "add-alveary-slab", - // "ExtraTrees:slab"); - // FMLInterModComms.sendMessage("forestry", "add-fence-block", "ExtraTrees:multifence"); + FMLInterModComms.sendMessage("forestry", "add-fence-block", "ExtraTrees:fence"); + FMLInterModComms.sendMessage("forestry", "add-fence-block", "ExtraTrees:gate"); + FMLInterModComms.sendMessage("forestry", "add-fence-block", "ExtraTrees:multifence"); //ModuleBlocks.hedgeRenderID = BinnieCore.proxy.getUniqueRenderID(); } @@ -83,14 +181,21 @@ public class ModuleBlocks implements IInitializable { @Override public void postInit() { - for (final PlankType.ExtraTreePlanks plank : PlankType.ExtraTreePlanks.values()) { - final ItemStack planks = plank.getStack(); - //final ItemStack slabs = TileEntityMetadata.getItemStack(ExtraTrees.blockSlab, plank.ordinal()); - //final ItemStack stairs = TileEntityMetadata.getItemStack(ExtraTrees.blockStairs, plank.ordinal()); - //stairs.stackSize = 4; - //GameRegistry.addRecipe(stairs.copy(), "# ", "## ", "###", '#', planks.copy()); - //slabs.stackSize = 6; - //CraftingManager.getInstance().getRecipeList().add(0, new ShapedOreRecipe(slabs.copy(), "###", '#', planks.copy())); + IWoodAccess woodAccess = TreeManager.woodAccess; + for(EnumExtraTreeLog woodType : EnumExtraTreeLog.VALUES){ + for(boolean fireproof : new boolean[]{false, true}){ + ItemStack planks = woodAccess.getStack(woodType, WoodBlockKind.PLANKS, fireproof); + ItemStack slabs = woodAccess.getStack(woodType, WoodBlockKind.SLAB, fireproof); + ItemStack stairs = woodAccess.getStack(woodType, WoodBlockKind.STAIRS, fireproof); + stairs.stackSize = 4; + RecipeUtil.addPriorityRecipe(stairs.copy(), + "# ", + "## ", + "###", + '#', planks.copy()); + slabs.stackSize = 6; + RecipeUtil.addPriorityRecipe(slabs.copy(), "###", '#', planks.copy()); + } } GameRegistry.addRecipe(new MultiFenceRecipeSize()); GameRegistry.addRecipe(new MultiFenceRecipeEmbedded()); @@ -128,4 +233,13 @@ public class ModuleBlocks implements IInitializable { public void addSqueezer(final IWoodType log, final ILiquidType liquid, final int amount) { this.addSqueezer(log, liquid, amount, 0.5f); } + + private static void addRecipeAtPosition(int position, IRecipe recipe){ + CraftingManager manager = CraftingManager.getInstance(); + manager.getRecipeList().add(position, recipe); + } + + private static void registerOreDictWildcard(String oreDictName, Block block) { + OreDictionary.registerOre(oreDictName, new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE)); + } } diff --git a/src/main/java/binnie/extratrees/block/PropertyExtraTreeWoodType.java b/src/main/java/binnie/extratrees/block/PropertyExtraTreeWoodType.java new file mode 100644 index 00000000..8bf4a802 --- /dev/null +++ b/src/main/java/binnie/extratrees/block/PropertyExtraTreeWoodType.java @@ -0,0 +1,28 @@ +package binnie.extratrees.block; + +import java.util.Collection; + +import javax.annotation.Nonnull; + +import com.google.common.collect.Collections2; +import com.google.common.collect.Lists; + +import forestry.arboriculture.blocks.WoodTypePredicate; +import forestry.arboriculture.blocks.property.PropertyWoodType; + +public class PropertyExtraTreeWoodType extends PropertyWoodType { + public static PropertyExtraTreeWoodType[] create(@Nonnull String name, int variantsPerBlock) { + final int variantCount = (int) Math.ceil((float) EnumExtraTreeLog.VALUES.length / variantsPerBlock); + PropertyExtraTreeWoodType[] variants = new PropertyExtraTreeWoodType[variantCount]; + for (int variantNumber = 0; variantNumber < variantCount; variantNumber++) { + WoodTypePredicate filter = new WoodTypePredicate(variantNumber, variantsPerBlock); + Collection allowedValues = Collections2.filter(Lists.newArrayList(EnumExtraTreeLog.class.getEnumConstants()), filter); + variants[variantNumber] = new PropertyExtraTreeWoodType(name, EnumExtraTreeLog.class, allowedValues); + } + return variants; + } + + protected PropertyExtraTreeWoodType(String name, Class valueClass, Collection allowedValues) { + super(name, valueClass, allowedValues); + } +} diff --git a/src/main/java/binnie/extratrees/block/WoodManager.java b/src/main/java/binnie/extratrees/block/WoodManager.java index d57a7eac..2829e28f 100644 --- a/src/main/java/binnie/extratrees/block/WoodManager.java +++ b/src/main/java/binnie/extratrees/block/WoodManager.java @@ -6,6 +6,10 @@ import binnie.extratrees.api.CarpentryManager; import binnie.extratrees.api.IDesignMaterial; import binnie.extratrees.block.decor.FenceDescription; import binnie.extratrees.block.decor.FenceType; +import forestry.api.arboriculture.IWoodType; +import forestry.api.arboriculture.WoodBlockKind; +import forestry.arboriculture.IWoodTyped; +import forestry.core.utils.Translator; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -14,7 +18,36 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import javax.annotation.Nonnull; + public class WoodManager { + @Nonnull + public static String getDisplayName(IWoodTyped wood, IWoodType woodType) { + WoodBlockKind blockKind = wood.getBlockKind(); + + String displayName; + + if (woodType instanceof EnumExtraTreeLog) { + String customUnlocalizedName = "tile.et." + blockKind + "." + woodType + ".name"; + if (Translator.canTranslateToLocal(customUnlocalizedName)) { + displayName = Translator.translateToLocal(customUnlocalizedName); + } else { + String woodGrammar = Translator.translateToLocal("for." + blockKind + ".grammar"); + String woodTypeName = Translator.translateToLocal("et.trees.woodType." + woodType); + + displayName = woodGrammar.replaceAll("%TYPE", woodTypeName); + } + } else { + throw new IllegalArgumentException("Unknown wood type: " + woodType); + } + + if (wood.isFireproof()) { + displayName = Translator.translateToLocalFormatted("tile.for.fireproof", displayName); + } + + return displayName; + } + public static IPlankType getPlankType(final int index) { final IDesignMaterial wood = CarpentryManager.carpentryInterface.getWoodMaterial(index); if (wood instanceof IPlankType) { diff --git a/src/main/java/binnie/extratrees/block/log/BlockETLog.java b/src/main/java/binnie/extratrees/block/log/BlockETLog.java index 2b7b75bd..0ef24afe 100644 --- a/src/main/java/binnie/extratrees/block/log/BlockETLog.java +++ b/src/main/java/binnie/extratrees/block/log/BlockETLog.java @@ -1,205 +1,50 @@ package binnie.extratrees.block.log; import binnie.Constants; -import binnie.extratrees.ExtraTrees; import binnie.extratrees.block.EnumExtraTreeLog; -import binnie.extratrees.block.IWoodKind; -import binnie.extratrees.block.PropertyEnumWoodType; -import binnie.extratrees.genetics.WoodAccess; -import forestry.api.arboriculture.WoodBlockKind; -import forestry.api.core.IItemModelRegister; -import forestry.api.core.IModelManager; -import forestry.api.core.IStateMapperRegister; -import forestry.api.core.Tabs; -import net.minecraft.block.BlockLog; -import net.minecraft.block.SoundType; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import java.util.Arrays; +import binnie.extratrees.block.PropertyExtraTreeWoodType; +import forestry.arboriculture.blocks.log.BlockForestryLog; +import forestry.arboriculture.blocks.property.PropertyWoodType; +import net.minecraft.util.ResourceLocation; +import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; +import javax.annotation.Nonnull; -public abstract class BlockETLog extends BlockLog implements IWoodKind, IStateMapperRegister, IItemModelRegister { - protected static final int VARIANTS_PER_BLOCK = 4; - protected static final int VARIANTS_META_MASK = VARIANTS_PER_BLOCK - 1; - public static final String BLOCK_NAME = "log"; - protected int offset = -1; - protected boolean fireproof; - protected static PropertyEnumWoodType[] types = PropertyEnumWoodType.create(VARIANTS_PER_BLOCK); - - public BlockETLog(int offset, boolean fireproof) { - this.setCreativeTab(Tabs.tabArboriculture); - this.setRegistryName(BLOCK_NAME + "." + (fireproof ? "fireproof." : "") + offset); - this.setResistance(5.0f); - this.setHardness(2.0f); - this.setSoundType(SoundType.WOOD); - this.setUnlocalizedName(BLOCK_NAME + "." + (fireproof ? "fireproof." : "") + offset); - this.offset = offset; - this.fireproof = fireproof; - setDefaultState(this.blockState.getBaseState().withProperty(types[offset], types[offset].getFirstValue()).withProperty(LOG_AXIS, EnumAxis.Y)); +public abstract class BlockETLog extends BlockForestryLog { + public static List create(boolean fireproof) { + List blocks = new ArrayList<>(); + PropertyExtraTreeWoodType[] variants = PropertyExtraTreeWoodType.create("variant", VARIANTS_PER_BLOCK); + for (int i = 0; i < variants.length; i++) { + PropertyExtraTreeWoodType variant = variants[i]; + BlockETLog block = new BlockETLog(fireproof, i) { + @Nonnull + @Override + public PropertyWoodType getVariant() { + return variant; + } + }; + blocks.add(block); + } + return blocks; } + private BlockETLog(boolean fireproof, int blockNumber) { + super(fireproof, blockNumber); + String name = "logs."; + if(fireproof){ + name+="fireproof."; + } + name+=blockNumber; + setRegistryName(new ResourceLocation(Constants.EXTRA_TREES_MOD_ID, name)); + setUnlocalizedName(name); + } - @Override - public abstract PropertyEnum getVariant(); - + @Nonnull @Override public EnumExtraTreeLog getWoodType(int meta) { - return EnumExtraTreeLog.values()[offset * VARIANTS_PER_BLOCK + (meta & VARIANTS_META_MASK)]; - } - - private static EnumAxis getAxis(int meta) { - switch (meta & 12) { - case 0: - return EnumAxis.Y; - case 4: - return EnumAxis.X; - case 8: - return EnumAxis.Z; - default: - return EnumAxis.NONE; - } - } - - - @Override - public final IBlockState getStateFromMeta(int meta) { - EnumExtraTreeLog woodType = getWoodType(meta); - EnumAxis axis = getAxis(meta); - return getDefaultState().withProperty(getVariant(), woodType).withProperty(LOG_AXIS, axis); - } - - @SuppressWarnings("incomplete-switch") - @Override - public final int getMetaFromState(IBlockState state) { - int i = 0; - try { - i = damageDropped(state); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } - switch (state.getValue(LOG_AXIS)) { - case X: - i |= 4; - break; - case Z: - i |= 8; - break; - case NONE: - i |= 12; - } - - return i; - } - - @Override - protected final BlockStateContainer createBlockState() { - return new BlockStateContainer(this, getVariant(), LOG_AXIS); - } - - - @Override - public final int damageDropped(IBlockState state) { - return state.getValue(getVariant()).getMetadata() % VARIANTS_PER_BLOCK; - } - - @Override - protected final ItemStack createStackedBlock(IBlockState state) { - int meta = damageDropped(state); - Item item = Item.getItemFromBlock(this); - return new ItemStack(item, 1, meta); - } - - @Override - public final IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { - EnumAxis axis = EnumAxis.fromFacingAxis(facing.getAxis()); - EnumExtraTreeLog woodType = getWoodType(meta); - return getDefaultState().withProperty(getVariant(), woodType).withProperty(LOG_AXIS, axis); - } - - @Override - public final void getSubBlocks(Item item, CreativeTabs tab, List list) { - list.addAll(getVariant().getAllowedValues().stream().map(woodType -> new ItemStack(this, 1, woodType.getMetadata() % VARIANTS_PER_BLOCK)).collect(Collectors.toList())); - } - - @Override - public final float getBlockHardness(IBlockState blockState, World worldIn, BlockPos pos) { - int meta = getMetaFromState(blockState); - EnumExtraTreeLog woodType = getWoodType(meta); - return woodType.getHardness(); - } - - @Override - public final int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { - if (fireproof) { - return 0; - } else if (face == EnumFacing.DOWN) { - return 20; - } else if (face != EnumFacing.UP) { - return 10; - } else { - return 5; - } - } - - @Override - public final int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { - if (fireproof) { - return 0; - } - return 5; - } - - @Override - public WoodBlockKind getWoodKind() { - return WoodBlockKind.LOG; - } - - @Override - public void registerModel(Item item, IModelManager manager) { - manager.registerItemModel(item, stack -> new ModelResourceLocation(Constants.EXTRA_TREES_MOD_ID + ":" + BLOCK_NAME, "axis=y,wood_type=" + getWoodType(stack.getMetadata()).getName())); - } - - @Override - public void registerStateMapper() { - ExtraTrees.proxy.setCustomStateMapper(BLOCK_NAME, this); - } - - public static void init() { - Arrays.stream(types).forEach(type -> { - BlockETLog log = new BlockETLog(type.getGroup(), false) { - @Override - public PropertyEnum getVariant() { - return type; - } - }; - - BlockETLog log_fireproof = new BlockETLog(type.getGroup(), true) { - @Override - public PropertyEnum getVariant() { - return type; - } - }; - - ExtraTrees.proxy.registerItem(new ItemETLog<>(log)); - ExtraTrees.proxy.registerItem(new ItemETLog<>(log_fireproof)); - ExtraTrees.proxy.registerBlock(log); - ExtraTrees.proxy.registerBlock(log_fireproof); - - WoodAccess.getInstance().registerWithVariants(log, log.getWoodKind(), type, true); - WoodAccess.getInstance().registerWithVariants(log_fireproof, log.getWoodKind(), type, false); - }); - + int variantCount = getVariant().getAllowedValues().size(); + int variantMeta = (meta % variantCount) + getBlockNumber() * VARIANTS_PER_BLOCK; + return EnumExtraTreeLog.byMetadata(variantMeta); } + } diff --git a/src/main/java/binnie/extratrees/block/log/ItemETLog.java b/src/main/java/binnie/extratrees/block/log/ItemETLog.java index e90f753e..580d6642 100644 --- a/src/main/java/binnie/extratrees/block/log/ItemETLog.java +++ b/src/main/java/binnie/extratrees/block/log/ItemETLog.java @@ -1,28 +1,26 @@ package binnie.extratrees.block.log; -import binnie.extratrees.block.EnumExtraTreeLog; -import net.minecraft.item.ItemBlock; +import binnie.extratrees.block.WoodManager; +import forestry.api.arboriculture.IWoodType; +import forestry.arboriculture.IWoodTyped; +import forestry.arboriculture.items.ItemBlockWood; import net.minecraft.item.ItemStack; -public class ItemETLog extends ItemBlock { - EnumExtraTreeLog[] values; +public class ItemETLog extends ItemBlockWood { public ItemETLog(V block) { super(block); setHasSubtypes(true); setMaxDamage(0); setRegistryName(block.getRegistryName()); - values = block.getVariant().getAllowedValues().toArray(new EnumExtraTreeLog[]{}); } - + @Override - public int getMetadata(int damage) { - return damage; - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return "tile." + BlockETLog.BLOCK_NAME + "." + values[stack.getMetadata()].getName(); + public String getItemStackDisplayName(ItemStack itemstack) { + IWoodTyped wood = getBlock(); + int meta = itemstack.getMetadata(); + IWoodType woodType = wood.getWoodType(meta); + return WoodManager.getDisplayName(wood, woodType); } } diff --git a/src/main/java/binnie/extratrees/block/plank/BlockETPlank.java b/src/main/java/binnie/extratrees/block/plank/BlockETPlank.java index b5bd9343..4f4689f4 100644 --- a/src/main/java/binnie/extratrees/block/plank/BlockETPlank.java +++ b/src/main/java/binnie/extratrees/block/plank/BlockETPlank.java @@ -1,157 +1,50 @@ package binnie.extratrees.block.plank; import binnie.Constants; -import binnie.extratrees.ExtraTrees; import binnie.extratrees.block.EnumExtraTreeLog; -import binnie.extratrees.block.IWoodKind; -import binnie.extratrees.block.PropertyEnumWoodType; -import binnie.extratrees.genetics.WoodAccess; -import forestry.api.arboriculture.WoodBlockKind; -import forestry.api.core.IItemModelRegister; -import forestry.api.core.IModelManager; -import forestry.api.core.IStateMapperRegister; -import forestry.api.core.Tabs; -import net.minecraft.block.Block; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import java.util.Arrays; +import binnie.extratrees.block.PropertyExtraTreeWoodType; +import forestry.arboriculture.blocks.planks.BlockForestryPlanks; +import net.minecraft.util.ResourceLocation; +import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; +import javax.annotation.Nonnull; -public abstract class BlockETPlank extends Block implements IWoodKind, IItemModelRegister, IStateMapperRegister { - protected static final int VARIANTS_PER_BLOCK = 16; - protected static final int VARIANTS_META_MASK = VARIANTS_PER_BLOCK - 1; +public abstract class BlockETPlank extends BlockForestryPlanks { public static final String BLOCK_NAME = "plank"; - private final boolean fireproof; - protected int offset = -1; - protected static PropertyEnumWoodType[] types = PropertyEnumWoodType.create(VARIANTS_PER_BLOCK); - - public BlockETPlank(int offset, boolean fireproof) { - super(Material.WOOD); - this.fireproof = fireproof; - this.offset = offset; - this.setRegistryName(BLOCK_NAME + "." + (fireproof ? "fireproof." : "") + offset); - this.setCreativeTab(Tabs.tabArboriculture); - this.setResistance(5.0f); - this.setHardness(2.0f); - this.setHarvestLevel("axe", 0); - this.setSoundType(SoundType.WOOD); - } - - @Override - public float getBlockHardness(IBlockState blockState, World worldIn, BlockPos pos) { - int meta = getMetaFromState(blockState); - EnumExtraTreeLog woodType = getWoodType(meta); - return woodType.getHardness(); - } - - @Override - public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { - if (fireproof) { - return 0; + + public static List create(boolean fireproof) { + List blocks = new ArrayList<>(); + PropertyExtraTreeWoodType[] variants = PropertyExtraTreeWoodType.create("variant", VARIANTS_PER_BLOCK); + for (int i = 0; i < variants.length; i++) { + PropertyExtraTreeWoodType variant = variants[i]; + BlockETPlank block = new BlockETPlank(fireproof, i) { + @Nonnull + @Override + public PropertyExtraTreeWoodType getVariant() { + return variant; + } + }; + blocks.add(block); } - return 20; + return blocks; } - @Override - public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { - if (fireproof) { - return 0; + private BlockETPlank(boolean fireproof, int blockNumber) { + super(fireproof, blockNumber); + String name = "planks."; + if(fireproof){ + name+="fireproof."; } - return 5; - } - - @Override - public int getMetaFromState(IBlockState state) { - return damageDropped(state); - } - - @Override - public IBlockState getStateFromMeta(int meta) { - EnumExtraTreeLog woodType = getWoodType(meta); - return getDefaultState().withProperty(getVariant(), woodType); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, getVariant()); - } - - @Override - public void getSubBlocks(Item item, CreativeTabs tab, List list) { - list.addAll(getVariant().getAllowedValues().stream().map(woodType -> new ItemStack(this, 1, woodType.getMetadata() % VARIANTS_PER_BLOCK)).collect(Collectors.toList())); - } - - @Override - public final int damageDropped(IBlockState state) { - return state.getValue(getVariant()).getMetadata() % VARIANTS_PER_BLOCK; - } - - @Override - public final IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { - EnumExtraTreeLog woodType = getWoodType(meta); - return getDefaultState().withProperty(getVariant(), woodType); + name+=blockNumber; + setRegistryName(new ResourceLocation(Constants.EXTRA_TREES_MOD_ID, name)); + setUnlocalizedName(name); } + @Nonnull @Override public EnumExtraTreeLog getWoodType(int meta) { - return EnumExtraTreeLog.values()[offset * VARIANTS_PER_BLOCK + (meta & VARIANTS_META_MASK)]; + int variantCount = getVariant().getAllowedValues().size(); + int variantMeta = (meta % variantCount) + getBlockNumber() * VARIANTS_PER_BLOCK; + return EnumExtraTreeLog.byMetadata(variantMeta); } - - @Override - public WoodBlockKind getWoodKind() { - return WoodBlockKind.PLANKS; - } - - @Override - public void registerStateMapper() { - ExtraTrees.proxy.setCustomStateMapper(BLOCK_NAME, this); - } - - @Override - public void registerModel(Item item, IModelManager manager) { - manager.registerItemModel(item, stack -> new ModelResourceLocation(Constants.EXTRA_TREES_MOD_ID + ":" + BLOCK_NAME, "wood_type=" + getWoodType(stack.getMetadata()).getName())); - } - - public static void init() { - Arrays.stream(types).forEach(type -> { - BlockETPlank plank = new BlockETPlank(type.getGroup(), false) { - @Override - public PropertyEnum getVariant() { - return type; - } - }; - - BlockETPlank plank_fireproof = new BlockETPlank(type.getGroup(), true) { - @Override - public PropertyEnum getVariant() { - return type; - } - }; - - ExtraTrees.proxy.registerItem(new ItemETPlank<>(plank)); - ExtraTrees.proxy.registerItem(new ItemETPlank<>(plank_fireproof)); - ExtraTrees.proxy.registerBlock(plank); - ExtraTrees.proxy.registerBlock(plank_fireproof); - - WoodAccess.getInstance().registerWithVariants(plank, plank.getWoodKind(), type, true); - WoodAccess.getInstance().registerWithVariants(plank_fireproof, plank.getWoodKind(), type, false); - }); - - } - } diff --git a/src/main/java/binnie/extratrees/block/plank/ItemETPlank.java b/src/main/java/binnie/extratrees/block/plank/ItemETPlank.java index b0de3036..2308b0a0 100644 --- a/src/main/java/binnie/extratrees/block/plank/ItemETPlank.java +++ b/src/main/java/binnie/extratrees/block/plank/ItemETPlank.java @@ -1,31 +1,26 @@ package binnie.extratrees.block.plank; -import binnie.extratrees.block.EnumExtraTreeLog; -import net.minecraft.item.ItemBlock; +import binnie.extratrees.block.WoodManager; +import forestry.api.arboriculture.IWoodType; +import forestry.arboriculture.IWoodTyped; +import forestry.arboriculture.items.ItemBlockWood; import net.minecraft.item.ItemStack; -/** - * Created by Marcin on 03.11.2016. - */ -public class ItemETPlank extends ItemBlock { - EnumExtraTreeLog[] values; +public class ItemETPlank extends ItemBlockWood { public ItemETPlank(V block) { super(block); setHasSubtypes(true); setMaxDamage(0); setRegistryName(block.getRegistryName()); - values = block.getVariant().getAllowedValues().toArray(new EnumExtraTreeLog[]{}); } @Override - public int getMetadata(int damage) { - return damage; - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return "tile." + BlockETPlank.BLOCK_NAME + "." + values[stack.getMetadata()].getName(); + public String getItemStackDisplayName(ItemStack itemstack) { + IWoodTyped wood = getBlock(); + int meta = itemstack.getMetadata(); + IWoodType woodType = wood.getWoodType(meta); + return WoodManager.getDisplayName(wood, woodType); } } diff --git a/src/main/java/binnie/extratrees/block/slab/BlockETSlab.java b/src/main/java/binnie/extratrees/block/slab/BlockETSlab.java index b58d25c5..d84cda16 100644 --- a/src/main/java/binnie/extratrees/block/slab/BlockETSlab.java +++ b/src/main/java/binnie/extratrees/block/slab/BlockETSlab.java @@ -1,229 +1,58 @@ package binnie.extratrees.block.slab; import binnie.Constants; -import binnie.extratrees.ExtraTrees; import binnie.extratrees.block.EnumExtraTreeLog; -import binnie.extratrees.block.IWoodKind; -import binnie.extratrees.block.PropertyEnumWoodType; -import binnie.extratrees.block.plank.BlockETPlank; -import binnie.extratrees.genetics.WoodAccess; -import forestry.api.arboriculture.WoodBlockKind; -import forestry.api.core.IItemModelRegister; -import forestry.api.core.IModelManager; -import forestry.api.core.IStateMapperRegister; -import forestry.api.core.Tabs; -import net.minecraft.block.BlockSlab; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - +import binnie.extratrees.block.PropertyExtraTreeWoodType; +import forestry.arboriculture.blocks.slab.BlockForestrySlab; +import net.minecraft.util.ResourceLocation; import javax.annotation.Nonnull; -import java.util.Arrays; + +import java.util.ArrayList; import java.util.List; -import java.util.Random; -import java.util.stream.Collectors; -public abstract class BlockETSlab extends BlockSlab implements IWoodKind, IItemModelRegister, IStateMapperRegister{ - protected static final int VARIANTS_PER_BLOCK = 8; - protected static final int VARIANTS_META_MASK = VARIANTS_PER_BLOCK - 1; - public static final String BLOCK_NAME = "slab"; - private final boolean fireproof; - private final int offset; - protected static final PropertyEnumWoodType[] types = PropertyEnumWoodType.create(VARIANTS_PER_BLOCK); +public abstract class BlockETSlab extends BlockForestrySlab { + public static List create(boolean fireproof, final boolean doubleSlab) { + List blocks = new ArrayList<>(); + PropertyExtraTreeWoodType[] variants = PropertyExtraTreeWoodType.create("variant", VARIANTS_PER_BLOCK); + for (int i = 0; i < variants.length; i++) { + PropertyExtraTreeWoodType variant = variants[i]; + BlockETSlab block = new BlockETSlab(fireproof, i) { + @Nonnull + @Override + public PropertyExtraTreeWoodType getVariant() { + return variant; + } - public BlockETSlab(int offset, boolean fireproof) { - super(Material.WOOD); - this.fireproof = fireproof; - this.offset = offset; - setCreativeTab(Tabs.tabArboriculture); - setHardness(2.0f); - setResistance(5.0f); - setSoundType(SoundType.WOOD); - setLightOpacity(0); - setRegistryName(BLOCK_NAME + "." + (fireproof ? "fireproof." : "") + (isDouble()?"double.":"") + offset); + @Override + public boolean isDouble() { + return doubleSlab; + } + }; + blocks.add(block); + } + return blocks; } + private BlockETSlab(boolean fireproof, int blockNumber) { + super(fireproof, blockNumber); + String name = "slabs."; + if(fireproof){ + name+="fireproof."; + } + if(isDouble()){ + name+="double."; + } + name+=blockNumber; + setRegistryName(new ResourceLocation(Constants.EXTRA_TREES_MOD_ID, name)); + setUnlocalizedName(name); + } + + @Nonnull @Override public EnumExtraTreeLog getWoodType(int meta) { - return EnumExtraTreeLog.values()[offset * VARIANTS_PER_BLOCK + (meta & VARIANTS_META_MASK)]; - } - - @Nonnull - @Override - protected BlockStateContainer createBlockState() { - return this.isDouble() ? new BlockStateContainer(this, getVariant()) : new BlockStateContainer(this, HALF, getVariant()); - } - - @Nonnull - @Override - public IBlockState getStateFromMeta(int meta) { - EnumExtraTreeLog woodType = getWoodType(meta); - IBlockState iblockstate = this.getDefaultState().withProperty(getVariant(), woodType); - - if (!this.isDouble()) { - iblockstate = iblockstate.withProperty(HALF, (meta & 8) == 0 ? BlockSlab.EnumBlockHalf.BOTTOM : BlockSlab.EnumBlockHalf.TOP); - } - - return iblockstate; - } - - @Override - public int getMetaFromState(IBlockState state) { - int meta = damageDropped(state); - - if (!this.isDouble() && state.getValue(HALF) == BlockSlab.EnumBlockHalf.TOP) { - meta |= 8; - } - - return meta; - } - - @Override - public int damageDropped(IBlockState state) { - EnumExtraTreeLog woodType = state.getValue(getVariant()); - return woodType.getMetadata() - offset * VARIANTS_PER_BLOCK; - } - - @Override - public Item getItemDropped(IBlockState state, Random rand, int fortune) { - EnumExtraTreeLog woodType = state.getValue(getVariant()); - ItemStack slab = WoodAccess.getInstance().getStack(woodType, WoodBlockKind.SLAB, fireproof); - return slab.getItem(); - } - - @SuppressWarnings("deprecation") // this is the way the vanilla slabs work - @Override - public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) { - EnumExtraTreeLog woodType = state.getValue(getVariant()); - ItemStack slab = WoodAccess.getInstance().getStack(woodType, WoodBlockKind.SLAB, fireproof); - return new ItemStack(slab.getItem(), 1, getMetaFromState(state)); - } - - @Override - public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List list) { - if (!isDouble()) { - list.addAll(getVariant().getAllowedValues().stream().map(woodType -> new ItemStack(this, 1, woodType.getMetadata() % VARIANTS_PER_BLOCK)).collect(Collectors.toList())); - } - } - - @Override - public float getBlockHardness(IBlockState blockState, World worldIn, BlockPos pos) { - int meta = getMetaFromState(blockState); - EnumExtraTreeLog woodType = getWoodType(meta); - return woodType.getHardness(); - } - - @Override - public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { - return fireproof ? 0 : 20; - } - - @Override - public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { - return fireproof ? 0 : 5; - } - - @Override - public String getUnlocalizedName(int meta) { - EnumExtraTreeLog woodType = getWoodType(meta); - return woodType.name(); - } - - @Override - public boolean isDouble() { - return false; - } - - @Override - public IProperty getVariantProperty() { - return getVariant(); - } - - @Override - public Comparable getTypeForItem(ItemStack stack) { - return getWoodType(stack.getMetadata()); - } - - @Override - public WoodBlockKind getWoodKind() { - return WoodBlockKind.SLAB; - } - - @Override - public void registerModel(Item item, IModelManager manager) { - if(!isDouble()) - manager.registerItemModel(item, stack -> new ModelResourceLocation(Constants.EXTRA_TREES_MOD_ID + ":" + BLOCK_NAME, "half=bottom,wood_type=" + getWoodType(stack.getMetadata()).getName())); - } - - @Override - public void registerStateMapper() { - if(isDouble()) - ExtraTrees.proxy.setCustomStateMapper(BlockETPlank.BLOCK_NAME, this); - else - ExtraTrees.proxy.setCustomStateMapper(BLOCK_NAME, this); - } - - public static void init() { - Arrays.stream(types).forEach(type -> { - BlockETSlab slab = new BlockETSlab(type.getGroup(), false) { - @Override - public PropertyEnum getVariant() { - return type; - } - }; - - BlockETSlab slab_double = new BlockETSlab(type.getGroup(), false) { - @Override - public PropertyEnum getVariant() { - return type; - } - - @Override - public boolean isDouble() { - return true; - } - }; - - BlockETSlab slab_fireproof = new BlockETSlab(type.getGroup(), true) { - @Override - public PropertyEnum getVariant() { - return type; - } - }; - - BlockETSlab slab_double_fireproof = new BlockETSlab(type.getGroup(), true) { - @Override - public PropertyEnum getVariant() { - return type; - } - - @Override - public boolean isDouble() { - return true; - } - }; - - ExtraTrees.proxy.registerItem(new ItemETSlab<>(slab, slab_double)); - ExtraTrees.proxy.registerItem(new ItemETSlab<>(slab_fireproof, slab_double_fireproof)); - ExtraTrees.proxy.registerBlock(slab); - ExtraTrees.proxy.registerBlock(slab_fireproof); - ExtraTrees.proxy.registerBlock(slab_double); - ExtraTrees.proxy.registerBlock(slab_double_fireproof); - - WoodAccess.getInstance().registerWithVariants(slab, slab.getWoodKind(), type, true); - WoodAccess.getInstance().registerWithVariants(slab_fireproof, slab.getWoodKind(), type, false); - }); - + meta &= ~8; // unset the top/bottom slab bit + int variantCount = getVariant().getAllowedValues().size(); + int variantMeta = (meta % variantCount) + getBlockNumber() * VARIANTS_PER_BLOCK; + return EnumExtraTreeLog.byMetadata(variantMeta); } } diff --git a/src/main/java/binnie/extratrees/block/slab/ItemETSlab.java b/src/main/java/binnie/extratrees/block/slab/ItemETSlab.java index 874d0527..620075b2 100644 --- a/src/main/java/binnie/extratrees/block/slab/ItemETSlab.java +++ b/src/main/java/binnie/extratrees/block/slab/ItemETSlab.java @@ -1,25 +1,22 @@ package binnie.extratrees.block.slab; -import binnie.extratrees.block.EnumExtraTreeLog; +import binnie.extratrees.block.WoodManager; +import forestry.api.arboriculture.IWoodType; import net.minecraft.item.ItemSlab; import net.minecraft.item.ItemStack; -public class ItemETSlab extends ItemSlab { - EnumExtraTreeLog[] values; - - public ItemETSlab(V block, V doubleBlock) { - super(block, block, doubleBlock); +public class ItemETSlab extends ItemSlab { + + public ItemETSlab(BlockETSlab block, BlockETSlab slab, BlockETSlab doubleSlab) { + super(block, slab, doubleSlab); setRegistryName(block.getRegistryName()); - values = block.getVariant().getAllowedValues().toArray(new EnumExtraTreeLog[]{}); } @Override - public int getMetadata(int damage) { - return damage; - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return "tile." + BlockETSlab.BLOCK_NAME + "." + values[stack.getMetadata()].getName(); + public String getItemStackDisplayName(ItemStack itemstack) { + BlockETSlab wood = (BlockETSlab) getBlock(); + int meta = itemstack.getMetadata(); + IWoodType woodType = wood.getWoodType(meta); + return WoodManager.getDisplayName(wood, woodType); } } \ No newline at end of file diff --git a/src/main/java/binnie/extratrees/block/stairs/BlockETStairs.java b/src/main/java/binnie/extratrees/block/stairs/BlockETStairs.java deleted file mode 100644 index 7e24aa84..00000000 --- a/src/main/java/binnie/extratrees/block/stairs/BlockETStairs.java +++ /dev/null @@ -1,108 +0,0 @@ -package binnie.extratrees.block.stairs; - -import binnie.Constants; -import binnie.extratrees.ExtraTrees; -import binnie.extratrees.block.*; -import binnie.extratrees.genetics.WoodAccess; -import forestry.api.arboriculture.WoodBlockKind; -import forestry.api.core.IItemModelRegister; -import forestry.api.core.IModelManager; -import forestry.api.core.IStateMapperRegister; -import forestry.api.core.Tabs; -import net.minecraft.block.BlockStairs; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import java.util.Arrays; - -public abstract class BlockETStairs extends BlockStairs implements IWoodKind, IItemModelRegister, IStateMapperRegister { - private final boolean fireproof; - protected static final int VARIANTS_PER_BLOCK = 1; - protected static final PropertyEnumWoodType[] types = PropertyEnumWoodType.create(VARIANTS_PER_BLOCK); - public static final String BLOCK_NAME = "stairs"; - private final int offset; - - public BlockETStairs(int offset, boolean fireproof) { - super(WoodAccess.getInstance().getBlock(types[offset].getFirstValue(), WoodBlockKind.PLANKS, fireproof)); - this.setCreativeTab(Tabs.tabArboriculture); - this.setRegistryName(BLOCK_NAME + "." + (fireproof ? "fireproof." : "") + offset); - this.offset = offset; - this.fireproof = fireproof; - this.setUnlocalizedName(types[offset].getFirstValue().getName()); - } - - @Override - public EnumExtraTreeLog getWoodType(int meta) { - return types[offset].getFirstValue(); - } - - @Override - public WoodBlockKind getWoodKind() { - return WoodBlockKind.STAIRS; - } - - @Override - public float getBlockHardness(IBlockState blockState, World worldIn, BlockPos pos) { - int meta = getMetaFromState(blockState); - EnumExtraTreeLog woodType = getWoodType(meta); - return woodType.getHardness(); - } - - @Override - public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { - if (fireproof) { - return 0; - } - return 20; - } - - @Override - public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { - if (fireproof) { - return 0; - } - return 5; - } - - @Override - public void registerModel(Item item, IModelManager manager) { - manager.registerItemModel(item, stack -> new ModelResourceLocation(Constants.EXTRA_TREES_MOD_ID + ":" + BLOCK_NAME + "." + getWoodType(0).getMetadata(), "facing=east,half=bottom,shape=straight")); - } - - @Override - public void registerStateMapper() { - ExtraTrees.proxy.setCustomStateMapper(BLOCK_NAME + "." + getWoodType(0).getMetadata(), this); - } - - public static void init() { - Arrays.stream(types).forEach(type -> { - BlockETStairs stairs = new BlockETStairs(type.getGroup(), false) { - @Override - public PropertyEnum getVariant() { - return type; - } - }; - - BlockETStairs stairs_fireproof = new BlockETStairs(type.getGroup(), true) { - @Override - public PropertyEnum getVariant() { - return type; - } - }; - - ExtraTrees.proxy.registerItem(new ItemETStairs<>(stairs)); - ExtraTrees.proxy.registerItem(new ItemETStairs<>(stairs_fireproof)); - ExtraTrees.proxy.registerBlock(stairs); - ExtraTrees.proxy.registerBlock(stairs_fireproof); - - WoodAccess.getInstance().registerWithBlockState(stairs.getDefaultState(), stairs.getWoodKind(), type.getFirstValue(), true); - WoodAccess.getInstance().registerWithBlockState(stairs_fireproof.getDefaultState(), stairs.getWoodKind(), type.getFirstValue(), false); - }); - - } -} diff --git a/src/main/java/binnie/extratrees/block/stairs/ItemETStairs.java b/src/main/java/binnie/extratrees/block/stairs/ItemETStairs.java index 3c3b1280..bc51bfef 100644 --- a/src/main/java/binnie/extratrees/block/stairs/ItemETStairs.java +++ b/src/main/java/binnie/extratrees/block/stairs/ItemETStairs.java @@ -1,12 +1,25 @@ package binnie.extratrees.block.stairs; -import net.minecraft.item.ItemBlock; +import binnie.extratrees.block.EnumExtraTreeLog; +import binnie.extratrees.block.WoodManager; +import forestry.api.arboriculture.IWoodType; +import forestry.arboriculture.blocks.BlockForestryStairs; +import forestry.arboriculture.items.ItemBlockWood; +import net.minecraft.item.ItemStack; -public class ItemETStairs extends ItemBlock{ +public class ItemETStairs> extends ItemBlockWood{ - public ItemETStairs(final V block) { + public ItemETStairs(B block) { super(block); setRegistryName(block.getRegistryName()); } + + @Override + public String getItemStackDisplayName(ItemStack itemstack) { + B wood = getBlock(); + int meta = itemstack.getMetadata(); + IWoodType woodType = wood.getWoodType(meta); + return WoodManager.getDisplayName(wood, woodType); + } } diff --git a/src/main/java/binnie/extratrees/genetics/WoodProvider.java b/src/main/java/binnie/extratrees/genetics/WoodProvider.java index a3e041ec..2a0b1d9d 100644 --- a/src/main/java/binnie/extratrees/genetics/WoodProvider.java +++ b/src/main/java/binnie/extratrees/genetics/WoodProvider.java @@ -54,11 +54,7 @@ public class WoodProvider implements IWoodProvider { @Override public ItemStack getWoodStack() { - if (type instanceof EnumExtraTreeLog) { - return WoodAccess.getInstance().getStack(type, WoodBlockKind.LOG, false); - } else { - return TreeManager.woodAccess.getStack(type, WoodBlockKind.LOG, false); - } + return TreeManager.woodAccess.getStack(type, WoodBlockKind.LOG, false); } @Override diff --git a/src/main/java/binnie/extratrees/item/Food.java b/src/main/java/binnie/extratrees/item/Food.java index 5ae04cd7..d8afec85 100644 --- a/src/main/java/binnie/extratrees/item/Food.java +++ b/src/main/java/binnie/extratrees/item/Food.java @@ -1,11 +1,11 @@ package binnie.extratrees.item; -import binnie.Binnie; import binnie.core.Mods; import binnie.core.item.IItemMiscProvider; import binnie.extratrees.ExtraTrees; import binnie.extratrees.alcohol.Juice; import forestry.api.recipes.RecipeManagers; +import forestry.core.fluids.Fluids; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; @@ -121,15 +121,15 @@ public enum Food implements IItemMiscProvider { } public void addJuice(final Juice juice, final int time, final int amount, final int mulch) { - RecipeManagers.squeezerManager.addRecipe(time, new ItemStack[]{this.get(1)}, Binnie.Liquid.getFluidStack("juice", amount), Mods.Forestry.stack("mulch"), mulch); + RecipeManagers.squeezerManager.addRecipe(time, new ItemStack[]{this.get(1)}, Fluids.JUICE.getFluid(amount), Mods.Forestry.stack("mulch"), mulch); } public void addJuice(final int time, final int amount, final int mulch) { - RecipeManagers.squeezerManager.addRecipe(time, new ItemStack[]{this.get(1)}, Binnie.Liquid.getFluidStack("juice", amount), Mods.Forestry.stack("mulch"), mulch); + RecipeManagers.squeezerManager.addRecipe(time, new ItemStack[]{this.get(1)}, Fluids.JUICE.getFluid(amount), Mods.Forestry.stack("mulch"), mulch); } public void addOil(final int time, final int amount, final int mulch) { - RecipeManagers.squeezerManager.addRecipe(time, new ItemStack[]{this.get(1)}, Binnie.Liquid.getFluidStack("seedoil", amount), Mods.Forestry.stack("mulch"), mulch); + RecipeManagers.squeezerManager.addRecipe(time, new ItemStack[]{this.get(1)}, Fluids.SEED_OIL.getFluid(amount), Mods.Forestry.stack("mulch"), mulch); } public static void registerOreDictionary() { diff --git a/src/main/resources/assets/extratrees/blockstates/log.json b/src/main/resources/assets/extratrees/blockstates/log.json deleted file mode 100644 index 9838e790..00000000 --- a/src/main/resources/assets/extratrees/blockstates/log.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "cube_column" - }, - - - - - "variants": { - "normal":[{}], - "inventory":[{}], - "axis":{ - "x":{ - "x":90, - "y":90 - }, - "y":{}, - "z":{ - "x":90 - }, - "none":{} - }, - "wood_type":{ - "apple":{ - "textures": { - "end": "extratrees:blocks/logs/appleTrunk", - "side": "extratrees:blocks/logs/appleBark" - } - }, - "fig": { - "textures": { - "end": "extratrees:blocks/logs/figTrunk", - "side": "extratrees:blocks/logs/figBark" - } - }, - "butternut":{ - "textures": { - "end": "extratrees:blocks/logs/butternutTrunk", - "side": "extratrees:blocks/logs/butternutBark" - } - }, - "cherry":{ - "textures": { - "end": "extratrees:blocks/logs/cherryTrunk", - "side": "extratrees:blocks/logs/cherryBark" - } - }, - "whitebeam":{ - "textures": { - "end": "extratrees:blocks/logs/whitebeamTrunk", - "side": "extratrees:blocks/logs/whitebeamBark" - } - }, - "rowan":{ - "textures": { - "end": "extratrees:blocks/logs/rowanTrunk", - "side": "extratrees:blocks/logs/rowanBark" - } - }, - "hemlock":{ - "textures": { - "end": "extratrees:blocks/logs/hemlockTrunk", - "side": "extratrees:blocks/logs/hemlockBark" - } - }, - "ash":{ - "textures": { - "end": "extratrees:blocks/logs/ashTrunk", - "side": "extratrees:blocks/logs/ashBark" - } - }, - "alder":{ - "textures": { - "end": "extratrees:blocks/logs/alderTrunk", - "side": "extratrees:blocks/logs/alderBark" - } - }, - "beech":{ - "textures": { - "end": "extratrees:blocks/logs/beechTrunk", - "side": "extratrees:blocks/logs/beechBark" - } - }, - "hawthorn":{ - "textures": { - "end": "extratrees:blocks/logs/hawthornTrunk", - "side": "extratrees:blocks/logs/hawthornBark" - } - }, - "banana":{ - "textures": { - "end": "extratrees:blocks/logs/bananaTrunk", - "side": "extratrees:blocks/logs/bananaBark" - } - }, - "yew":{ - "textures": { - "end": "extratrees:blocks/logs/yewTrunk", - "side": "extratrees:blocks/logs/yewBark" - } - }, - "cypress":{ - "textures": { - "end": "extratrees:blocks/logs/cypressTrunk", - "side": "extratrees:blocks/logs/cypressBark" - } - }, - "fir":{ - "textures": { - "end": "extratrees:blocks/logs/firTrunk", - "side": "extratrees:blocks/logs/firBark" - } - }, - "hazel":{ - "textures": { - "end": "extratrees:blocks/logs/hazelTrunk", - "side": "extratrees:blocks/logs/hazelBark" - } - }, - "hickory":{ - "textures": { - "end": "extratrees:blocks/logs/hickoryTrunk", - "side": "extratrees:blocks/logs/hickoryBark" - } - }, - "elm":{ - "textures": { - "end": "extratrees:blocks/logs/elmTrunk", - "side": "extratrees:blocks/logs/elmBark" - } - }, - "elder":{ - "textures": { - "end": "extratrees:blocks/logs/elderTrunk", - "side": "extratrees:blocks/logs/elderBark" - } - }, - "holly":{ - "textures": { - "end": "extratrees:blocks/logs/hollyTrunk", - "side": "extratrees:blocks/logs/hollyBark" - } - }, - "hornbeam":{ - "textures": { - "end": "extratrees:blocks/logs/hornbeamTrunk", - "side": "extratrees:blocks/logs/hornbeamBark" - } - }, - "cedar":{ - "textures": { - "end": "extratrees:blocks/logs/cedarTrunk", - "side": "extratrees:blocks/logs/cedarBark" - } - }, - "olive":{ - "textures": { - "end": "extratrees:blocks/logs/oliveTrunk", - "side": "extratrees:blocks/logs/oliveBark" - } - }, - "sweetgum":{ - "textures": { - "end": "extratrees:blocks/logs/sweetgumTrunk", - "side": "extratrees:blocks/logs/sweetgumBark" - } - }, - "locust":{ - "textures": { - "end": "extratrees:blocks/logs/locustTrunk", - "side": "extratrees:blocks/logs/locustBark" - } - }, - "pear":{ - "textures": { - "end": "extratrees:blocks/logs/pearTrunk", - "side": "extratrees:blocks/logs/pearBark" - } - }, - "maclura":{ - "textures": { - "end": "extratrees:blocks/logs/macluraTrunk", - "side": "extratrees:blocks/logs/macluraBark" - } - }, - "brazilwood":{ - "textures": { - "end": "extratrees:blocks/logs/brazilwoodTrunk", - "side": "extratrees:blocks/logs/brazilwoodBark" - } - }, - "logwood":{ - "textures": { - "end": "extratrees:blocks/logs/logwoodTrunk", - "side": "extratrees:blocks/logs/logwoodBark" - } - }, - "rosewood":{ - "textures": { - "end": "extratrees:blocks/logs/rosewoodTrunk", - "side": "extratrees:blocks/logs/rosewoodBark" - } - }, - "purpleheart":{ - "textures": { - "end": "extratrees:blocks/logs/purpleheartTrunk", - "side": "extratrees:blocks/logs/purpleheartBark" - } - }, - "iroko":{ - "textures": { - "end": "extratrees:blocks/logs/irokoTrunk", - "side": "extratrees:blocks/logs/irokoBark" - } - }, - "gingko":{ - "textures": { - "end": "extratrees:blocks/logs/gingkoTrunk", - "side": "extratrees:blocks/logs/gingkoBark" - } - }, - "eucalyptus":{ - "textures": { - "end": "extratrees:blocks/logs/eucalyptusTrunk", - "side": "extratrees:blocks/logs/eucalyptusBark" - } - }, - "eucalyptus2":{ - "textures": { - "end": "extratrees:blocks/logs/eucalyptus2Trunk", - "side": "extratrees:blocks/logs/eucalyptus2Bark" - } - }, - "box":{ - "textures": { - "end": "extratrees:blocks/logs/boxTrunk", - "side": "extratrees:blocks/logs/boxBark" - } - }, - "syzgium":{ - "textures": { - "end": "extratrees:blocks/logs/syzgiumTrunk", - "side": "extratrees:blocks/logs/syzgiumBark" - } - }, - "eucalyptus3":{ - "textures": { - "end": "extratrees:blocks/logs/eucalyptus3Trunk", - "side": "extratrees:blocks/logs/eucalyptus3Bark" - } - }, - "cinnamon": { - "textures": { - "end": "extratrees:blocks/logs/cinnamonTrunk", - "side": "extratrees:blocks/logs/cinnamonBark" - } - }, - "pinkivory":{ - "textures": { - "end": "extratrees:blocks/logs/pinkivoryTrunk", - "side": "extratrees:blocks/logs/pinkivoryBark" - } - }, - "empty":{ - "textures": { - "end": "extratrees:blocks/logs/emptyTrunk", - "side": "extratrees:blocks/logs/emptyBark" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/extratrees/blockstates/plank.json b/src/main/resources/assets/extratrees/blockstates/plank.json deleted file mode 100644 index e6fa7dcb..00000000 --- a/src/main/resources/assets/extratrees/blockstates/plank.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "cube_all" - }, - - "variants": { - "wood_type":{ - "apple":{ - "textures": { - "all": "extratrees:blocks/planks/Apple" - } - }, - "fig": { - "textures": { - "all": "extratrees:blocks/planks/Fig" - } - }, - "butternut":{ - "textures": { - "all": "extratrees:blocks/planks/Butternut" - } - }, - "cherry":{ - "textures": { - "all": "forestry:blocks/wood/planks.cherry" - } - }, - "whitebeam":{ - "textures": { - "all": "extratrees:blocks/planks/Whitebeam" - } - }, - "rowan":{ - "textures": { - "all": "extratrees:blocks/planks/Rowan" - } - }, - "hemlock":{ - "textures": { - "all": "extratrees:blocks/planks/Hemlock" - } - }, - "ash":{ - "textures": { - "all": "extratrees:blocks/planks/Ash" - } - }, - "alder":{ - "textures": { - "all": "extratrees:blocks/planks/Alder" - } - }, - "beech":{ - "textures": { - "all": "extratrees:blocks/planks/Beech" - } - }, - "hawthorn":{ - "textures": { - "all": "extratrees:blocks/planks/Hawthorn" - } - }, - "banana":{ - "textures": { - "all": "extratrees:blocks/planks/Banana" - } - }, - "yew":{ - "textures": { - "all": "extratrees:blocks/planks/Yew" - } - }, - "cypress":{ - "textures": { - "all": "extratrees:blocks/planks/Cypress" - } - }, - "fir":{ - "textures": { - "all": "extratrees:blocks/planks/Fir" - } - }, - "hazel":{ - "textures": { - "all": "extratrees:blocks/planks/Hazel" - } - }, - "hickory":{ - "textures": { - "all": "extratrees:blocks/planks/Hickory" - } - }, - "elm":{ - "textures": { - "all": "extratrees:blocks/planks/Elm" - } - }, - "elder":{ - "textures": { - "all": "extratrees:blocks/planks/Elder" - } - }, - "holly":{ - "textures": { - "all": "extratrees:blocks/planks/Holly" - } - }, - "hornbeam":{ - "textures": { - "all": "extratrees:blocks/planks/Hornbeam" - } - }, - "cedar":{ - "textures": { - "all": "extratrees:blocks/planks/Cedar" - } - }, - "olive":{ - "textures": { - "all": "extratrees:blocks/planks/Olive" - } - }, - "sweetgum":{ - "textures": { - "all": "extratrees:blocks/planks/Sweetgum" - } - }, - "locust":{ - "textures": { - "all": "extratrees:blocks/planks/Locust" - } - }, - "pear":{ - "textures": { - "all": "extratrees:blocks/planks/Pear" - } - }, - "maclura":{ - "textures": { - "all": "extratrees:blocks/planks/Maclura" - } - }, - "brazilwood":{ - "textures": { - "all": "extratrees:blocks/planks/Brazilwood" - } - }, - "logwood":{ - "textures": { - "all": "extratrees:blocks/planks/Logwood" - } - }, - "rosewood":{ - "textures": { - "all": "extratrees:blocks/planks/Rosewood" - } - }, - "purpleheart":{ - "textures": { - "all": "extratrees:blocks/planks/Purpleheart" - } - }, - "iroko":{ - "textures": { - "all": "extratrees:blocks/planks/Iroko" - } - }, - "gingko":{ - "textures": { - "all": "extratrees:blocks/planks/Gingko" - } - }, - "eucalyptus":{ - "textures": { - "all": "extratrees:blocks/planks/Eucalyptus" - } - }, - "eucalyptus2":{ - "textures": { - "all": "extratrees:blocks/planks/Eucalyptus" - } - }, - "box":{ - "textures": { - "all": "extratrees:blocks/planks/Box" - } - }, - "syzgium":{ - "textures": { - "all": "extratrees:blocks/planks/Syzgium" - } - }, - "eucalyptus3":{ - "textures": { - "all": "extratrees:blocks/planks/Eucalyptus" - } - }, - "cinnamon": { - "textures": { - "all": "minecraft:blocks/planks_jungle" - } - }, - "pinkivory":{ - "textures": { - "all": "extratrees:blocks/planks/Pinkivory" - } - }, - "empty":{ - "textures": { - "all": "extratrees:blocks/planks/Empty" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/extratrees/blockstates/slab.json b/src/main/resources/assets/extratrees/blockstates/slab.json deleted file mode 100644 index 2fb25bf8..00000000 --- a/src/main/resources/assets/extratrees/blockstates/slab.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "extratrees:half_slab" - }, - "variants": { - "half": { - "bottom": { - "model": "extratrees:half_slab" - }, - "top": { - "model": "extratrees:upper_slab" - } - }, - "wood_type":{ - "apple":{ - "textures": { - "all": "extratrees:blocks/planks/Apple" - } - }, - "fig": { - "textures": { - "all": "extratrees:blocks/planks/Fig" - } - }, - "butternut":{ - "textures": { - "all": "extratrees:blocks/planks/Butternut" - } - }, - "cherry":{ - "textures": { - "all": "forestry:blocks/wood/planks.cherry" - } - }, - "whitebeam":{ - "textures": { - "all": "extratrees:blocks/planks/Whitebeam" - } - }, - "rowan":{ - "textures": { - "all": "extratrees:blocks/planks/Rowan" - } - }, - "hemlock":{ - "textures": { - "all": "extratrees:blocks/planks/Hemlock" - } - }, - "ash":{ - "textures": { - "all": "extratrees:blocks/planks/Ash" - } - }, - "alder":{ - "textures": { - "all": "extratrees:blocks/planks/Alder" - } - }, - "beech":{ - "textures": { - "all": "extratrees:blocks/planks/Beech" - } - }, - "hawthorn":{ - "textures": { - "all": "extratrees:blocks/planks/Hawthorn" - } - }, - "banana":{ - "textures": { - "all": "extratrees:blocks/planks/Banana" - } - }, - "yew":{ - "textures": { - "all": "extratrees:blocks/planks/Yew" - } - }, - "cypress":{ - "textures": { - "all": "extratrees:blocks/planks/Cypress" - } - }, - "fir":{ - "textures": { - "all": "extratrees:blocks/planks/Fir" - } - }, - "hazel":{ - "textures": { - "all": "extratrees:blocks/planks/Hazel" - } - }, - "hickory":{ - "textures": { - "all": "extratrees:blocks/planks/Hickory" - } - }, - "elm":{ - "textures": { - "all": "extratrees:blocks/planks/Elm" - } - }, - "elder":{ - "textures": { - "all": "extratrees:blocks/planks/Elder" - } - }, - "holly":{ - "textures": { - "all": "extratrees:blocks/planks/Holly" - } - }, - "hornbeam":{ - "textures": { - "all": "extratrees:blocks/planks/Hornbeam" - } - }, - "cedar":{ - "textures": { - "all": "extratrees:blocks/planks/Cedar" - } - }, - "olive":{ - "textures": { - "all": "extratrees:blocks/planks/Olive" - } - }, - "sweetgum":{ - "textures": { - "all": "extratrees:blocks/planks/Sweetgum" - } - }, - "locust":{ - "textures": { - "all": "extratrees:blocks/planks/Locust" - } - }, - "pear":{ - "textures": { - "all": "extratrees:blocks/planks/Pear" - } - }, - "maclura":{ - "textures": { - "all": "extratrees:blocks/planks/Maclura" - } - }, - "brazilwood":{ - "textures": { - "all": "extratrees:blocks/planks/Brazilwood" - } - }, - "logwood":{ - "textures": { - "all": "extratrees:blocks/planks/Logwood" - } - }, - "rosewood":{ - "textures": { - "all": "extratrees:blocks/planks/Rosewood" - } - }, - "purpleheart":{ - "textures": { - "all": "extratrees:blocks/planks/Purpleheart" - } - }, - "iroko":{ - "textures": { - "all": "extratrees:blocks/planks/Iroko" - } - }, - "gingko":{ - "textures": { - "all": "extratrees:blocks/planks/Gingko" - } - }, - "eucalyptus":{ - "textures": { - "all": "extratrees:blocks/planks/Eucalyptus" - } - }, - "eucalyptus2":{ - "textures": { - "all": "extratrees:blocks/planks/Eucalyptus" - } - }, - "box":{ - "textures": { - "all": "extratrees:blocks/planks/Box" - } - }, - "syzgium":{ - "textures": { - "all": "extratrees:blocks/planks/Syzgium" - } - }, - "eucalyptus3":{ - "textures": { - "all": "extratrees:blocks/planks/Eucalyptus" - } - }, - "cinnamon": { - "textures": { - "all": "minecraft:blocks/planks_jungle" - } - }, - "pinkivory":{ - "textures": { - "all": "extratrees:blocks/planks/Pinkivory" - } - }, - "empty":{ - "textures": { - "all": "extratrees:blocks/planks/Empty" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/extratrees/blockstates/stairs.json b/src/main/resources/assets/extratrees/blockstates/stairs.json deleted file mode 100644 index 3f27390f..00000000 --- a/src/main/resources/assets/extratrees/blockstates/stairs.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "variants": { - "facing=east,half=bottom,shape=straight": { "model": "extratrees:stairs" }, - "facing=west,half=bottom,shape=straight": { "model": "extratrees:stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=straight": { "model": "extratrees:stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=straight": { "model": "extratrees:stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=outer_right": { "model": "extratrees:stairs_outer" }, - "facing=west,half=bottom,shape=outer_right": { "model": "extratrees:stairs_outer", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=outer_right": { "model": "extratrees:stairs_outer", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=outer_right": { "model": "extratrees:stairs_outer", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=outer_left": { "model": "extratrees:stairs_outer", "y": 270, "uvlock": true }, - "facing=west,half=bottom,shape=outer_left": { "model": "extratrees:stairs_outer", "y": 90, "uvlock": true }, - "facing=south,half=bottom,shape=outer_left": { "model": "extratrees:stairs_outer" }, - "facing=north,half=bottom,shape=outer_left": { "model": "extratrees:stairs_outer", "y": 180, "uvlock": true }, - "facing=east,half=bottom,shape=inner_right": { "model": "extratrees:stairs_inner" }, - "facing=west,half=bottom,shape=inner_right": { "model": "extratrees:stairs_inner", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=inner_right": { "model": "extratrees:stairs_inner", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=inner_right": { "model": "extratrees:stairs_inner", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=inner_left": { "model": "extratrees:stairs_inner", "y": 270, "uvlock": true }, - "facing=west,half=bottom,shape=inner_left": { "model": "extratrees:stairs_inner", "y": 90, "uvlock": true }, - "facing=south,half=bottom,shape=inner_left": { "model": "extratrees:stairs_inner" }, - "facing=north,half=bottom,shape=inner_left": { "model": "extratrees:stairs_inner", "y": 180, "uvlock": true }, - "facing=east,half=top,shape=straight": { "model": "extratrees:stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=straight": { "model": "extratrees:stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=straight": { "model": "extratrees:stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=straight": { "model": "extratrees:stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=east,half=top,shape=outer_right": { "model": "extratrees:stairs_outer", "x": 180, "y": 90, "uvlock": true }, - "facing=west,half=top,shape=outer_right": { "model": "extratrees:stairs_outer", "x": 180, "y": 270, "uvlock": true }, - "facing=south,half=top,shape=outer_right": { "model": "extratrees:stairs_outer", "x": 180, "y": 180, "uvlock": true }, - "facing=north,half=top,shape=outer_right": { "model": "extratrees:stairs_outer", "x": 180, "uvlock": true }, - "facing=east,half=top,shape=outer_left": { "model": "extratrees:stairs_outer", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=outer_left": { "model": "extratrees:stairs_outer", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=outer_left": { "model": "extratrees:stairs_outer", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=outer_left": { "model": "extratrees:stairs_outer", "x": 180, "y": 270, "uvlock": true }, - "facing=east,half=top,shape=inner_right": { "model": "extratrees:stairs_inner", "x": 180, "y": 90, "uvlock": true }, - "facing=west,half=top,shape=inner_right": { "model": "extratrees:stairs_inner", "x": 180, "y": 270, "uvlock": true }, - "facing=south,half=top,shape=inner_right": { "model": "extratrees:stairs_inner", "x": 180, "y": 180, "uvlock": true }, - "facing=north,half=top,shape=inner_right": { "model": "extratrees:stairs_inner", "x": 180, "uvlock": true }, - "facing=east,half=top,shape=inner_left": { "model": "extratrees:stairs_inner", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=inner_left": { "model": "extratrees:stairs_inner", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=inner_left": { "model": "extratrees:stairs_inner", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=inner_left": { "model": "extratrees:stairs_inner", "x": 180, "y": 270, "uvlock": true } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/extratrees/models/block/half_slab.json b/src/main/resources/assets/extratrees/models/block/half_slab.json deleted file mode 100644 index 463164f2..00000000 --- a/src/main/resources/assets/extratrees/models/block/half_slab.json +++ /dev/null @@ -1,18 +0,0 @@ -{ "parent": "block/block", - "textures": { - "particle": "#all" - }, - "elements": [ - { "from": [ 0, 0, 0 ], - "to": [ 16, 8, 16 ], - "faces": { - "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "down" }, - "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#all" }, - "north": { "uv": [ 0, 8, 16, 16 ], "texture": "#all", "cullface": "north" }, - "south": { "uv": [ 0, 8, 16, 16 ], "texture": "#all", "cullface": "south" }, - "west": { "uv": [ 0, 8, 16, 16 ], "texture": "#all", "cullface": "west" }, - "east": { "uv": [ 0, 8, 16, 16 ], "texture": "#all", "cullface": "east" } - } - } - ] -} diff --git a/src/main/resources/assets/extratrees/models/block/stairs.json b/src/main/resources/assets/extratrees/models/block/stairs.json deleted file mode 100644 index 9f94b320..00000000 --- a/src/main/resources/assets/extratrees/models/block/stairs.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parent": "block/stairs", - "textures": { - "particle": "extratrees:blocks/planks/Apple", - "side": "extratrees:blocks/planks/Apple", - "top": "extratrees:blocks/planks/Apple", - "bottom": "extratrees:blocks/planks/Apple" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/extratrees/models/block/stairs_inner.json b/src/main/resources/assets/extratrees/models/block/stairs_inner.json deleted file mode 100644 index 5c154fd8..00000000 --- a/src/main/resources/assets/extratrees/models/block/stairs_inner.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parent": "block/inner_stairs", - "textures": { - "particle": "extratrees:blocks/planks/Apple", - "side": "extratrees:blocks/planks/Apple", - "top": "extratrees:blocks/planks/Apple", - "bottom": "extratrees:blocks/planks/Apple" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/extratrees/models/block/stairs_outer.json b/src/main/resources/assets/extratrees/models/block/stairs_outer.json deleted file mode 100644 index 4790d8ca..00000000 --- a/src/main/resources/assets/extratrees/models/block/stairs_outer.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parent": "block/outer_stairs", - "textures": { - "particle": "extratrees:blocks/planks/Apple", - "side": "extratrees:blocks/planks/Apple", - "top": "extratrees:blocks/planks/Apple", - "bottom": "extratrees:blocks/planks/Apple" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/extratrees/models/block/upper_slab.json b/src/main/resources/assets/extratrees/models/block/upper_slab.json deleted file mode 100644 index b41cc923..00000000 --- a/src/main/resources/assets/extratrees/models/block/upper_slab.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "textures": { - "particle": "#all" - }, - "elements": [ - { "from": [ 0, 8, 0 ], - "to": [ 16, 16, 16 ], - "faces": { - "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#all" }, - "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "up" }, - "north": { "uv": [ 0, 0, 16, 8 ], "texture": "#all", "cullface": "north" }, - "south": { "uv": [ 0, 0, 16, 8 ], "texture": "#all", "cullface": "south" }, - "west": { "uv": [ 0, 0, 16, 8 ], "texture": "#all", "cullface": "west" }, - "east": { "uv": [ 0, 0, 16, 8 ], "texture": "#all", "cullface": "east" } - } - } - ] -} \ No newline at end of file