diff --git a/build.gradle b/build.gradle index 4c33b0a6..3d4a6299 100644 --- a/build.gradle +++ b/build.gradle @@ -35,10 +35,6 @@ repositories { name 'CB Maven FS' url "http://chickenbones.net/maven/" } - maven { - name "ProfMobius Maven FS" - url "http://mobiusstrip.eu/maven" - } maven { name 'DVS1 Maven FS' url 'http://dvs1.progwml6.com/files/maven' @@ -51,6 +47,14 @@ repositories { name 'MCMultiPart' url 'http://maven.amadornes.com/' } + maven { + name "Tehnut Maven FS" + url "http://tehnut.info/maven" + } + maven { + name "ProfMobius Maven FS" + url "http://mobiusstrip.eu/maven" + } } group = 'com.progwml6.natura' @@ -58,15 +62,15 @@ sourceCompatibility = 1.8 targetCompatibility = 1.8 dependencies { - //deobfCompile "net.minecraftforge.lex:YUNoMakeGoodMap:${minecraft_version}-${yunomakegoodmap_version}" deobfCompile "slimeknights.mantle:Mantle:${minecraft_version}-${mantle_version}" //deobfCompile "slimeknights:TConstruct:${minecraft_version}-${tconstruct_version}" + deobfCompile "mcp.mobius.waila:Hwyla:${hwyla_version}_1.11" //deobfCompile "mcp.mobius.waila:Waila:${waila_version}_1.9.4" // ${minecraft_version}" No 1.10 version of waila, must use 1.9.4 version deobfCompile "mezz.jei:jei_${minecraft_version}:${jei_version}" - //deobfCompile "MCMultiPart:MCMultiPart-experimental:${mcmultipart_version}:universal" + deobfCompile "MCMultiPart2:MCMultiPart-exp:${mcmultipart_version}:universal" } // sets version to the slimeKnights version format diff --git a/gradle.properties b/gradle.properties index 30ce9d25..92617227 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,15 +1,15 @@ -mod_version=4.1.0 +mod_version=4.2.0 -minecraft_version=1.11 +minecraft_version=1.11.2 -forge_version=13.19.0.2153 -mappings_version=snapshot_20161119 +forge_version=13.20.0.2282 +mappings_version=snapshot_20170415 mantle_version=1.2.0.+ -tconstruct_version=2.5.6.+ +tconstruct_version=2.6.2.+ -jei_version=4.0.+ -waila_version=1.7.0-B3 -mcmultipart_version=2.0.0_88 +jei_version=4.3.2.+ -yunomakegoodmap_version=6.1.0.24 \ No newline at end of file +hwyla_version=1.8.13-B26 + +mcmultipart_version=2.0.0_9 \ No newline at end of file diff --git a/src/main/java/com/progwml6/natura/Natura.java b/src/main/java/com/progwml6/natura/Natura.java index 0ca29cd3..e6fa6928 100644 --- a/src/main/java/com/progwml6/natura/Natura.java +++ b/src/main/java/com/progwml6/natura/Natura.java @@ -4,13 +4,16 @@ import org.apache.logging.log4j.Logger; import com.progwml6.natura.common.CommonProxy; -import com.progwml6.natura.common.NaturaOredict; import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.common.gui.GuiHandler; +import com.progwml6.natura.decorative.NaturaDecorative; import com.progwml6.natura.entities.NaturaEntities; import com.progwml6.natura.library.Util; import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.oredict.NaturaOredict; import com.progwml6.natura.overworld.NaturaOverworld; import com.progwml6.natura.shared.NaturaCommons; +import com.progwml6.natura.tools.NaturaTools; import com.progwml6.natura.world.NaturaWorld; import net.minecraftforge.fml.common.Mod; @@ -18,9 +21,10 @@ import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.network.NetworkRegistry; import slimeknights.mantle.pulsar.control.PulseManager; -@Mod(modid = Natura.modID, name = Natura.modName, version = Natura.modVersion, dependencies = "required-after:Forge@[12.18.0.1993,);required-after:mantle@[1.10-0.10.3,)", acceptedMinecraftVersions = "[1.10, 1.11)") +@Mod(modid = Natura.modID, name = Natura.modName, version = Natura.modVersion, dependencies = "required-after:Forge@[12.18.0.1993,);required-after:mantle@[1.10-0.10.3,);", acceptedMinecraftVersions = "[1.10, 1.11)") public class Natura { public static final String modID = Util.MODID; @@ -45,6 +49,8 @@ public class Natura pulseManager.registerPulse(new NaturaCommons()); pulseManager.registerPulse(new NaturaOverworld()); pulseManager.registerPulse(new NaturaNether()); + pulseManager.registerPulse(new NaturaDecorative()); + pulseManager.registerPulse(new NaturaTools()); pulseManager.registerPulse(new NaturaEntities()); pulseManager.registerPulse(new NaturaOredict()); pulseManager.registerPulse(new NaturaWorld()); @@ -54,6 +60,8 @@ public class Natura public void preInit(FMLPreInitializationEvent event) { Config.load(event); + + NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); } } diff --git a/src/main/java/com/progwml6/natura/common/GuiIDs.java b/src/main/java/com/progwml6/natura/common/GuiIDs.java new file mode 100644 index 00000000..fe82904d --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/GuiIDs.java @@ -0,0 +1,11 @@ +package com.progwml6.natura.common; + +/** + * Sole purpose of this class is to have all mod GUI IDs in one place so we don't assign them twice and conflict. + */ +public interface GuiIDs +{ + int CRAFTING_TABLE = 0; + + int FURNACE = 1; +} diff --git a/src/main/java/com/progwml6/natura/common/ModelRegisterUtil.java b/src/main/java/com/progwml6/natura/common/ModelRegisterUtil.java index 48c55c35..42db40f1 100644 --- a/src/main/java/com/progwml6/natura/common/ModelRegisterUtil.java +++ b/src/main/java/com/progwml6/natura/common/ModelRegisterUtil.java @@ -7,6 +7,7 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; @@ -20,7 +21,6 @@ @SideOnly(Side.CLIENT) public final class ModelRegisterUtil { - public static final String VARIANT_INVENTORY = "inventory"; // Regular ITEM MODELS // @@ -41,10 +41,12 @@ public static void registerItemModel(ItemStack itemStack, ResourceLocation name) public static ResourceLocation registerItemModel(Item item) { ResourceLocation itemLocation = null; - if (item != null) + + if (item != Items.AIR) { itemLocation = item.getRegistryName(); } + if (itemLocation != null) { itemLocation = registerIt(item, itemLocation); @@ -65,6 +67,7 @@ public static void registerItemBlockMeta(Block block) if (block != null) { Item item = Item.getItemFromBlock(block); + if (item instanceof ItemBlockMeta) { ((ItemBlockMeta) item).registerItemModels(); @@ -85,7 +88,7 @@ public static void registerItemModel(Item item, int meta) /** Registers the given item with the given meta and its registry name for the given variant */ public static void registerItemModel(Item item, int meta, String variant) { - if (item != null) + if (item != Items.AIR) { registerItemModel(item, meta, item.getRegistryName(), variant); } @@ -94,7 +97,7 @@ public static void registerItemModel(Item item, int meta, String variant) /** Registers the given item/meta combination with the model at the given location, and the given variant */ public static void registerItemModel(Item item, int meta, ResourceLocation location, String variant) { - if (item != null && !StringUtils.isNullOrEmpty(variant)) + if (item != Items.AIR && !StringUtils.isNullOrEmpty(variant)) { //ModelLoader.registerItemVariants(item, location); ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), variant)); diff --git a/src/main/java/com/progwml6/natura/common/NaturaOredict.java b/src/main/java/com/progwml6/natura/common/NaturaOredict.java deleted file mode 100644 index 5597ec7f..00000000 --- a/src/main/java/com/progwml6/natura/common/NaturaOredict.java +++ /dev/null @@ -1,194 +0,0 @@ -package com.progwml6.natura.common; - -import com.google.common.eventbus.Subscribe; -import com.progwml6.natura.nether.NaturaNether; -import com.progwml6.natura.nether.block.glass.BlockNetherGlass; -import com.progwml6.natura.overworld.NaturaOverworld; -import com.progwml6.natura.shared.NaturaCommons; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.oredict.OreDictionary; -import slimeknights.mantle.pulsar.pulse.Pulse; - -/** - * Created by progwml6 on 9/19/16. - */ -@Pulse(id = NaturaOredict.PULSE_ID, forced = true) -public class NaturaOredict -{ - public static final String PULSE_ID = "NaturaOredict"; - - @Subscribe - public static void oreDictAllTheThings(FMLPreInitializationEvent event) - { - ensureOredict(); - registerCommons(); - registerOverworld(); - registerNether(); - registerModCompat(); - } - /* - //Crafting table - OreDictionary.registerOre("crafterWood", new ItemStack(alternateWorkbench, 1, OreDictionary.WILDCARD_VALUE)); - OreDictionary.registerOre("craftingTableWood", new ItemStack(alternateWorkbench, 1, OreDictionary.WILDCARD_VALUE)); - - - //Stick - OreDictionary.registerOre("stickWood", new ItemStack(stickItem, 1, OreDictionary.WILDCARD_VALUE)); - */ - - // Things that are not from natura but should be oredicted - private static void ensureOredict() - { - oredict(Items.BOWL, "bowlWood"); - oredict(Blocks.CHEST, "chestWood"); - oredict(Blocks.TRAPPED_CHEST, "chestWood"); - - } - - private static void registerCommons() - { - oredict(NaturaCommons.bloodwood_emptybowl, "bowlWood"); - oredict(NaturaCommons.ghostwood_emptybowl, "bowlWood"); - oredict(NaturaCommons.darkwood_emptybowl, "bowlWood"); - oredict(NaturaCommons.fusewood_emptybowl, "bowlWood"); - //Food - //overworld - oredict(NaturaCommons.raspberry, "cropRaspberry"); - oredict(NaturaCommons.blueberry, "cropBlueberry"); - oredict(NaturaCommons.blackberry, "cropBlackberry"); - oredict(NaturaCommons.maloberry, "cropMaloberry"); - oredict(NaturaCommons.barleyFlour, "foodFlour"); - oredict(NaturaCommons.wheatFlour, "foodFlour"); - - oredict(NaturaCommons.barley, "cropBarley"); - oredict(NaturaCommons.cotton, "cropCotton"); - - //seeds - //OreDictionary.registerOre("seedBarley", new ItemStack(seeds, 1, 0)); - //OreDictionary.registerOre("seedCotton", new ItemStack(seeds, 1, 1)); - - //nether - oredict(NaturaCommons.blightberry, "cropBlightberry"); - oredict(NaturaCommons.duskberry, "cropDuskberry"); - oredict(NaturaCommons.skyberry, "cropSkyberry"); - oredict(NaturaCommons.stingberry, "cropStingberry"); - - //Dye - oredict(NaturaCommons.blueDye, "dyeBlue"); - - //Dusts - oredict(NaturaCommons.sulfurPowder, "dustSulphur"); - oredict(NaturaCommons.sulfurPowder, "dustSulfur"); - - } - - private static void registerOverworld() - { - - //Planks - oredict(NaturaOverworld.overworldPlanks, "plankWood"); - - //Logs - oredict(NaturaOverworld.overworldLog, "logWood"); - oredict(NaturaOverworld.overworldLog2, "logWood"); - oredict(NaturaOverworld.redwoodLog, "logWood"); - //Slabs - oredict(NaturaOverworld.overworldSlab, "slabWood"); - oredict(NaturaOverworld.overworldSlab2, "slabWood"); - //Saplings - oredict(NaturaOverworld.overworldSapling, "treeSapling"); - oredict(NaturaOverworld.overworldSapling2, "treeSapling"); - oredict(NaturaOverworld.redwoodSapling, "treeSapling"); - //Leaves - oredict(NaturaOverworld.overworldLeaves, "treeLeaves"); - oredict(NaturaOverworld.overworldLeaves2, "treeLeaves"); - oredict(NaturaOverworld.redwoodLeaves, "treeLeaves"); - - //Stairs - oredict(NaturaOverworld.overworldStairsAmaranth, "stairWood"); - oredict(NaturaOverworld.overworldStairsEucalyptus, "stairWood"); - oredict(NaturaOverworld.overworldStairsHopseed, "stairWood"); - oredict(NaturaOverworld.overworldStairsMaple, "stairWood"); - oredict(NaturaOverworld.overworldStairsRedwood, "stairWood"); - oredict(NaturaOverworld.overworldStairsSakura, "stairWood"); - oredict(NaturaOverworld.overworldStairsSilverbell, "stairWood"); - oredict(NaturaOverworld.overworldStairsTiger, "stairWood"); - oredict(NaturaOverworld.overworldStairsWillow, "stairWood"); - } - - private static void registerNether() - { - //Planks - oredict(NaturaNether.netherPlanks, "plankWood"); - //Logs - oredict(NaturaNether.netherLog, "logWood"); - //Slabs - oredict(NaturaNether.netherSlab, "slabWood"); - //Saplings - oredict(NaturaNether.netherSapling, "treeSapling"); - //Leaves - oredict(NaturaNether.netherLeaves, "treeLeaves"); - oredict(NaturaNether.netherLeaves2, "treeLeaves"); - //Stairs - oredict(NaturaNether.netherStairsBloodwood, "stairWood"); - oredict(NaturaNether.netherStairsDarkwood, "stairWood"); - oredict(NaturaNether.netherStairsGhostwood, "stairWood"); - oredict(NaturaNether.netherStairsFusewood, "stairWood"); - - oredict(NaturaNether.netherTaintedSoil, "taintedSoil"); - - //Glass - oredict(new ItemStack(NaturaNether.netherGlass, 1, BlockNetherGlass.GlassType.SOUL.getMeta()), "glassSoul");//meta 0 - oredict(NaturaNether.netherGlass, "glass"); - - } - - //TODO 1.10 double check the objects in here and finish the rest - private static void registerModCompat() - { - //For Harvestcraft - //OreDictionary.registerOre("listAllseed", new ItemStack(seeds, 1, 0)); - //OreDictionary.registerOre("listAllseed", new ItemStack(seeds, 1, 1)); - oredict(NaturaCommons.wheatFlour, "foodEqualswheat"); - oredict(NaturaCommons.barley, "listAllGrain"); - - } - - public static void oredict(Item item, String... name) - { - oredict(item, OreDictionary.WILDCARD_VALUE, name); - } - - public static void oredict(Block block, String... name) - { - oredict(block, OreDictionary.WILDCARD_VALUE, name); - } - - public static void oredict(Item item, int meta, String... name) - { - oredict(new ItemStack(item, 1, meta), name); - } - - public static void oredict(Block block, int meta, String... name) - { - oredict(new ItemStack(block, 1, meta), name); - } - - public static void oredict(ItemStack stack, String... names) - { - if (stack != ItemStack.EMPTY && stack.getItem() != null) - { - for (String name : names) - { - OreDictionary.registerOre(name, stack); - } - } - } - -} diff --git a/src/main/java/com/progwml6/natura/common/NaturaPulse.java b/src/main/java/com/progwml6/natura/common/NaturaPulse.java index 1a565908..ea49ba16 100644 --- a/src/main/java/com/progwml6/natura/common/NaturaPulse.java +++ b/src/main/java/com/progwml6/natura/common/NaturaPulse.java @@ -1,12 +1,20 @@ package com.progwml6.natura.common; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Locale; +import java.util.Map; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; import com.progwml6.natura.Natura; import com.progwml6.natura.common.block.BlockGrassStairs; +import com.progwml6.natura.common.block.base.BlockButtonBase; +import com.progwml6.natura.common.block.base.BlockFenceBase; +import com.progwml6.natura.common.block.base.BlockFenceGateBase; +import com.progwml6.natura.common.block.base.BlockNaturaStairsBase; +import com.progwml6.natura.common.block.base.BlockPressurePlateBase; +import com.progwml6.natura.common.block.base.BlockTrapDoorBase; +import com.progwml6.natura.decorative.NaturaDecorative; import com.progwml6.natura.entities.NaturaEntities; import com.progwml6.natura.library.Util; import com.progwml6.natura.nether.NaturaNether; @@ -18,14 +26,13 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IStringSerializable; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.IForgeRegistryEntry; -import slimeknights.mantle.block.BlockStairsBase; import slimeknights.mantle.block.EnumBlock; import slimeknights.mantle.block.EnumBlockSlab; import slimeknights.mantle.item.ItemBlockMeta; @@ -61,6 +68,11 @@ protected static boolean isNetherLoaded() return Natura.pulseManager.isPulseLoaded(NaturaNether.PulseId); } + protected static boolean isDecorativeLoaded() + { + return Natura.pulseManager.isPulseLoaded(NaturaDecorative.PulseId); + } + /** * Sets the correct unlocalized name and registers the item. */ @@ -99,9 +111,9 @@ protected static > T registerEnumBlockSlab(T block, S return block; } - protected static & EnumBlock.IEnumMeta & IStringSerializable> BlockStairsBase registerBlockStairsFrom(EnumBlock block, E value, String name) + protected static & EnumBlock.IEnumMeta & IStringSerializable> BlockNaturaStairsBase registerBlockStairsFrom(EnumBlock block, E value, String name) { - return registerBlock(new BlockStairsBase(block.getDefaultState().withProperty(block.prop, value)), name); + return registerBlock(new BlockNaturaStairsBase(block.getDefaultState().withProperty(block.prop, value)), name); } protected static & EnumBlock.IEnumMeta & IStringSerializable> BlockGrassStairs registerBlockGrassStairsFrom(EnumBlock block, E value, String name) @@ -109,6 +121,33 @@ protected static & EnumBlock.IEnumMeta & IStringSerializable> return registerBlock(new BlockGrassStairs(block.getDefaultState().withProperty(block.prop, value)), name); } + // Buttons, Trap Doors, Fences, Fence Gates, Pressure Plates START + protected static BlockButtonBase registerBlockButton(String name) + { + return registerBlock(new BlockButtonBase(), name); + } + + protected static BlockPressurePlateBase registerBlockPressurePlate(String name) + { + return registerBlock(new BlockPressurePlateBase(), name); + } + + protected static BlockTrapDoorBase registerBlockTrapDoor(String name) + { + return registerBlock(new BlockTrapDoorBase(), name); + } + + protected static BlockFenceBase registerBlockFence(String name) + { + return registerBlock(new BlockFenceBase(), name); + } + + protected static BlockFenceGateBase registerBlockFenceGate(String name) + { + return registerBlock(new BlockFenceGateBase(), name); + } + // Buttons, Pressure Plates, Trap Doors Fences, Fence Gates END + @SuppressWarnings("unchecked") protected static T registerBlock(ItemBlock itemBlock, String name) { @@ -171,108 +210,105 @@ protected static void registerTE(Class teClazz, String nam GameRegistry.registerTileEntity(teClazz, Util.prefix(name)); } - protected void addShapedRecipeFirst(List recipeList, ItemStack itemstack, Object... objArray) + protected void addShapedRecipe(ItemStack stack, Object... recipeComponents) { - String var3 = ""; - int var4 = 0; - int var5 = 0; - int var6 = 0; + String s = ""; + int i = 0; + int j = 0; + int k = 0; - if (objArray[var4] instanceof String[]) + if (recipeComponents[i] instanceof String[]) { - String[] var7 = ((String[]) objArray[var4++]); + String[] astring = ((String[]) recipeComponents[i++]); - for (String var9 : var7) + for (String s2 : astring) { - ++var6; - var5 = var9.length(); - var3 = var3 + var9; + ++k; + j = s2.length(); + s = s + s2; } } else { - while (objArray[var4] instanceof String) + while (recipeComponents[i] instanceof String) { - String var11 = (String) objArray[var4++]; - ++var6; - var5 = var11.length(); - var3 = var3 + var11; + String s1 = (String) recipeComponents[i++]; + ++k; + j = s1.length(); + s = s + s1; } } - HashMap var12; + Map map; - for (var12 = new HashMap<>(); var4 < objArray.length; var4 += 2) + for (map = Maps. newHashMap(); i < recipeComponents.length; i += 2) { - Character var13 = (Character) objArray[var4]; - ItemStack var14 = ItemStack.EMPTY; + Character character = (Character) recipeComponents[i]; + ItemStack itemstack = ItemStack.EMPTY; - if (objArray[var4 + 1] instanceof Item) + if (recipeComponents[i + 1] instanceof Item) { - var14 = new ItemStack((Item) objArray[var4 + 1]); + itemstack = new ItemStack((Item) recipeComponents[i + 1]); } - else if (objArray[var4 + 1] instanceof Block) + else if (recipeComponents[i + 1] instanceof Block) { - var14 = new ItemStack((Block) objArray[var4 + 1], 1, Short.MAX_VALUE); + itemstack = new ItemStack((Block) recipeComponents[i + 1], 1, 32767); } - else if (objArray[var4 + 1] instanceof ItemStack) + else if (recipeComponents[i + 1] instanceof ItemStack) { - var14 = (ItemStack) objArray[var4 + 1]; + itemstack = (ItemStack) recipeComponents[i + 1]; } - var12.put(var13, var14); + map.put(character, itemstack); } - ItemStack[] var15 = new ItemStack[var5 * var6]; + ItemStack[] aitemstack = new ItemStack[j * k]; - for (int var16 = 0; var16 < var5 * var6; ++var16) + for (int l = 0; l < j * k; ++l) { - char var10 = var3.charAt(var16); + char c0 = s.charAt(l); - if (var12.containsKey(Character.valueOf(var10))) + if (map.containsKey(Character.valueOf(c0))) { - var15[var16] = var12.get(Character.valueOf(var10)).copy(); + aitemstack[l] = map.get(Character.valueOf(c0)).copy(); } else { - var15[var16] = ItemStack.EMPTY; + aitemstack[l] = ItemStack.EMPTY; } } - ShapedRecipes var17 = new ShapedRecipes(var5, var6, var15, itemstack); - recipeList.add(0, var17); + ShapedRecipes shapedrecipes = new ShapedRecipes(j, k, aitemstack, stack); + + CraftingManager.getInstance().getRecipeList().add(shapedrecipes); } - protected void addShapelessRecipeFirst(List recipeList, ItemStack par1ItemStack, Object... par2ArrayOfObj) + protected void addShapelessRecipe(ItemStack stack, Object... recipeComponents) { - ArrayList arraylist = new ArrayList<>(); - Object[] aobject = par2ArrayOfObj; - int i = par2ArrayOfObj.length; + List list = Lists. newArrayList(); - for (int j = 0; j < i; ++j) + for (Object object : recipeComponents) { - Object object1 = aobject[j]; - - if (object1 instanceof ItemStack) + if (object instanceof ItemStack) { - arraylist.add(((ItemStack) object1).copy()); + list.add(((ItemStack) object).copy()); } - else if (object1 instanceof Item) + else if (object instanceof Item) { - arraylist.add(new ItemStack((Item) object1)); + list.add(new ItemStack((Item) object)); } else { - if (!(object1 instanceof Block)) + if (!(object instanceof Block)) { - throw new RuntimeException("Invalid shapeless recipe!"); + throw new IllegalArgumentException("Invalid shapeless recipe: unknown type " + object.getClass().getName() + "!"); } - arraylist.add(new ItemStack((Block) object1)); + list.add(new ItemStack((Block) object)); } } - recipeList.add(0, new ShapelessRecipes(par1ItemStack, arraylist)); + CraftingManager.getInstance().getRecipeList().add(new ShapelessRecipes(stack, list)); } protected static void addSlabRecipe(ItemStack slab, ItemStack input) diff --git a/src/main/java/com/progwml6/natura/common/block/BlockEnumBerryBush.java b/src/main/java/com/progwml6/natura/common/block/BlockEnumBerryBush.java index 88d1ca65..da65ff70 100644 --- a/src/main/java/com/progwml6/natura/common/block/BlockEnumBerryBush.java +++ b/src/main/java/com/progwml6/natura/common/block/BlockEnumBerryBush.java @@ -35,7 +35,7 @@ public class BlockEnumBerryBush extends Block implements IPlantable, IGrowable { public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 3); - private ItemStack itemDrop; + private final ItemStack itemDrop; //@formatter:off public static final AxisAlignedBB SMALL_BUSH_AABB = new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 0.5D, 0.75D); diff --git a/src/main/java/com/progwml6/natura/common/block/BlockGrassStairs.java b/src/main/java/com/progwml6/natura/common/block/BlockGrassStairs.java index 46a4d8fa..a06ae089 100644 --- a/src/main/java/com/progwml6/natura/common/block/BlockGrassStairs.java +++ b/src/main/java/com/progwml6/natura/common/block/BlockGrassStairs.java @@ -2,13 +2,14 @@ import java.util.Locale; +import com.progwml6.natura.common.block.base.BlockNaturaStairsBase; + import net.minecraft.block.SoundType; import net.minecraft.block.state.IBlockState; import net.minecraft.util.IStringSerializable; -import slimeknights.mantle.block.BlockStairsBase; import slimeknights.mantle.block.EnumBlock; -public class BlockGrassStairs extends BlockStairsBase +public class BlockGrassStairs extends BlockNaturaStairsBase { public final IBlockState customModelState; diff --git a/src/main/java/com/progwml6/natura/common/block/BlockNaturaDoor.java b/src/main/java/com/progwml6/natura/common/block/BlockNaturaDoor.java new file mode 100644 index 00000000..87914ba5 --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/block/BlockNaturaDoor.java @@ -0,0 +1,65 @@ +package com.progwml6.natura.common.block; + +import java.util.Random; + +import javax.annotation.Nullable; + +import net.minecraft.block.BlockDoor; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockNaturaDoor extends BlockDoor +{ + private ItemStack itemStack; + + public BlockNaturaDoor() + { + super(Material.WOOD); + + this.setHardness(3F); + this.setSoundType(SoundType.WOOD); + this.disableStats(); + } + + public void setDoor(ItemStack itemStack) + { + this.itemStack = itemStack; + } + + protected ItemStack getDoor() + { + return this.itemStack.copy(); + } + + /** + * Get the Item that this Block should drop when harvested. + */ + @Override + @Nullable + public Item getItemDropped(IBlockState state, Random rand, int fortune) + { + return state.getValue(HALF) == BlockDoor.EnumDoorHalf.UPPER ? Items.AIR : this.itemStack.getItem(); + } + + @Override + public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) + { + return this.itemStack; + } + + /** + * Gets the metadata of the item this Block can drop. This method is called when the block gets destroyed. It + * returns the metadata of the dropped item based on the old metadata of the block. + */ + @Override + public int damageDropped(IBlockState state) + { + return this.itemStack.getMetadata(); + } +} diff --git a/src/main/java/com/progwml6/natura/common/block/base/BlockButtonBase.java b/src/main/java/com/progwml6/natura/common/block/base/BlockButtonBase.java new file mode 100644 index 00000000..c307b60a --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/block/base/BlockButtonBase.java @@ -0,0 +1,36 @@ +package com.progwml6.natura.common.block.base; + +import javax.annotation.Nullable; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockButton; +import net.minecraft.block.SoundType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.SoundEvents; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockButtonBase extends BlockButton +{ + public BlockButtonBase() + { + super(true); + this.setHardness(0.5F); + this.setSoundType(SoundType.WOOD); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } + + @Override + protected void playClickSound(@Nullable EntityPlayer player, World worldIn, BlockPos pos) + { + worldIn.playSound(player, pos, SoundEvents.BLOCK_WOOD_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.3F, 0.6F); + } + + @Override + protected void playReleaseSound(World worldIn, BlockPos pos) + { + worldIn.playSound((EntityPlayer) null, pos, SoundEvents.BLOCK_WOOD_BUTTON_CLICK_OFF, SoundCategory.BLOCKS, 0.3F, 0.5F); + } +} diff --git a/src/main/java/com/progwml6/natura/common/block/base/BlockFenceBase.java b/src/main/java/com/progwml6/natura/common/block/base/BlockFenceBase.java new file mode 100644 index 00000000..7aa1eb72 --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/block/base/BlockFenceBase.java @@ -0,0 +1,40 @@ +package com.progwml6.natura.common.block.base; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; + +public class BlockFenceBase extends BlockFence +{ + public BlockFenceBase() + { + super(Material.WOOD, Material.WOOD.getMaterialMapColor()); + this.setHardness(2.0F); + this.setResistance(5.0F); + this.setSoundType(SoundType.WOOD); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } + + @Override + public boolean canPlaceTorchOnTop(IBlockState state, IBlockAccess world, BlockPos pos) + { + return true; + } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + Block block = iblockstate.getBlock(); + + return block == Blocks.BARRIER ? false : ((!(block instanceof BlockFence) || iblockstate.getMaterial() != this.blockMaterial) && !(block instanceof BlockFenceGate) ? (iblockstate.getMaterial().isOpaque() && iblockstate.isFullCube() ? iblockstate.getMaterial() != Material.GOURD : false) : true); + } +} diff --git a/src/main/java/com/progwml6/natura/common/block/base/BlockFenceGateBase.java b/src/main/java/com/progwml6/natura/common/block/base/BlockFenceGateBase.java new file mode 100644 index 00000000..ef8d3be2 --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/block/base/BlockFenceGateBase.java @@ -0,0 +1,20 @@ +package com.progwml6.natura.common.block.base; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockFenceGate; +import net.minecraft.block.BlockPlanks.EnumType; +import net.minecraft.block.SoundType; + +public class BlockFenceGateBase extends BlockFenceGate +{ + public BlockFenceGateBase() + { + super(EnumType.OAK); + this.setHardness(2.0F); + this.setResistance(5.0F); + this.setSoundType(SoundType.WOOD); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } + +} diff --git a/src/main/java/com/progwml6/natura/common/block/base/BlockNaturaStairsBase.java b/src/main/java/com/progwml6/natura/common/block/base/BlockNaturaStairsBase.java new file mode 100644 index 00000000..23e5463f --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/block/base/BlockNaturaStairsBase.java @@ -0,0 +1,15 @@ +package com.progwml6.natura.common.block.base; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.state.IBlockState; +import slimeknights.mantle.block.BlockStairsBase; + +public class BlockNaturaStairsBase extends BlockStairsBase +{ + public BlockNaturaStairsBase(IBlockState modelState) + { + super(modelState); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } +} diff --git a/src/main/java/com/progwml6/natura/common/block/base/BlockPressurePlateBase.java b/src/main/java/com/progwml6/natura/common/block/base/BlockPressurePlateBase.java new file mode 100644 index 00000000..08d107ab --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/block/base/BlockPressurePlateBase.java @@ -0,0 +1,18 @@ +package com.progwml6.natura.common.block.base; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockPressurePlate; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; + +public class BlockPressurePlateBase extends BlockPressurePlate +{ + public BlockPressurePlateBase() + { + super(Material.WOOD, Sensitivity.EVERYTHING); + this.setHardness(0.5F); + this.setSoundType(SoundType.WOOD); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } +} diff --git a/src/main/java/com/progwml6/natura/common/block/base/BlockTrapDoorBase.java b/src/main/java/com/progwml6/natura/common/block/base/BlockTrapDoorBase.java new file mode 100644 index 00000000..bc3020d0 --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/block/base/BlockTrapDoorBase.java @@ -0,0 +1,19 @@ +package com.progwml6.natura.common.block.base; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockTrapDoor; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; + +public class BlockTrapDoorBase extends BlockTrapDoor +{ + public BlockTrapDoorBase() + { + super(Material.WOOD); + this.disableStats(); + this.setHardness(3.0F); + this.setSoundType(SoundType.WOOD); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } +} diff --git a/src/main/java/com/progwml6/natura/common/config/Config.java b/src/main/java/com/progwml6/natura/common/config/Config.java index 1939e34a..7cd87501 100644 --- a/src/main/java/com/progwml6/natura/common/config/Config.java +++ b/src/main/java/com/progwml6/natura/common/config/Config.java @@ -5,6 +5,7 @@ import com.progwml6.natura.library.Util; import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.config.Property; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import slimeknights.mantle.pulsar.config.ForgeCFG; @@ -131,7 +132,14 @@ public static boolean syncConfig() } // Trees Start - seaLevel = configFile.get(WORLDGEN, "Sea level", seaLevel).getInt(seaLevel); + Property prop; + prop = configFile.get(WORLDGEN, "Sea level", seaLevel); + prop.setComment("Controls what the lowest Y level trees can grow at, make lower if the tree will not grow"); + seaLevel = prop.getInt(seaLevel); + + prop = configFile.get(WORLDGEN, "Flat Sea level", flatSeaLevel); + prop.setComment("Controls what the lowest Y level trees can grow at in a flat world, make value lower if the tree will not grow"); + flatSeaLevel = prop.getInt(flatSeaLevel); redwoodSpawnRarity = configFile.get(WORLDGEN, "Redwood Tree Spawn Rarity", redwoodSpawnRarity).getInt(redwoodSpawnRarity); @@ -249,6 +257,7 @@ public static boolean syncConfig() // Entites End public static int seaLevel = 64; + public static int flatSeaLevel = 1; public static boolean overrideNether = true; public static boolean canRespawnInNether = true; diff --git a/src/main/java/com/progwml6/natura/common/gui/GuiHandler.java b/src/main/java/com/progwml6/natura/common/gui/GuiHandler.java new file mode 100644 index 00000000..f97753e3 --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/gui/GuiHandler.java @@ -0,0 +1,46 @@ +package com.progwml6.natura.common.gui; + +import com.progwml6.natura.common.GuiIDs; +import com.progwml6.natura.common.gui.client.FurnaceGui; +import com.progwml6.natura.common.gui.client.WorkbenchGui; +import com.progwml6.natura.common.gui.common.FurnaceContainer; +import com.progwml6.natura.common.gui.common.WorkbenchContainer; +import com.progwml6.natura.nether.block.furnace.tile.TileEntityNetherrackFurnace; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.fml.common.network.IGuiHandler; + +public class GuiHandler implements IGuiHandler +{ + @Override + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) + { + if (ID == GuiIDs.CRAFTING_TABLE) + { + return new WorkbenchContainer(player.inventory, world, new BlockPos(x, y, z)); + } + else if (ID == GuiIDs.FURNACE) + { + return new FurnaceContainer(player.inventory, (TileEntityNetherrackFurnace) world.getTileEntity(new BlockPos(x, y, z))); + } + + return null; + } + + @Override + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) + { + if (ID == GuiIDs.CRAFTING_TABLE) + { + return new WorkbenchGui(player.inventory, world, new BlockPos(x, y, z)); + } + else if (ID == GuiIDs.FURNACE) + { + return new FurnaceGui(player.inventory, (TileEntityNetherrackFurnace) world.getTileEntity(new BlockPos(x, y, z))); + } + + return null; + } +} diff --git a/src/main/java/com/progwml6/natura/common/gui/client/FurnaceGui.java b/src/main/java/com/progwml6/natura/common/gui/client/FurnaceGui.java new file mode 100644 index 00000000..f3ad79c5 --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/gui/client/FurnaceGui.java @@ -0,0 +1,82 @@ +package com.progwml6.natura.common.gui.client; + +import com.progwml6.natura.common.gui.common.FurnaceContainer; +import com.progwml6.natura.nether.block.furnace.tile.TileEntityNetherrackFurnace; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class FurnaceGui extends GuiContainer +{ + private static final ResourceLocation FURNACE_GUI_TEXTURES = new ResourceLocation("textures/gui/container/furnace.png"); + + /** The player inventory bound to this GUI. */ + private final InventoryPlayer playerInventory; + + private final IInventory tileFurnace; + + public FurnaceGui(InventoryPlayer playerInv, IInventory furnaceInv) + { + super(new FurnaceContainer(playerInv, furnaceInv)); + this.playerInventory = playerInv; + this.tileFurnace = furnaceInv; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + @Override + protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) + { + String s = this.tileFurnace.getDisplayName().getUnformattedText(); + this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 6, 4210752); + this.fontRenderer.drawString(this.playerInventory.getDisplayName().getUnformattedText(), 8, this.ySize - 96 + 2, 4210752); + } + + /** + * Draws the background layer of this container (behind the items). + */ + @Override + protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) + { + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(FURNACE_GUI_TEXTURES); + int i = (this.width - this.xSize) / 2; + int j = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize); + + if (TileEntityNetherrackFurnace.isBurning(this.tileFurnace)) + { + int k = this.getBurnLeftScaled(13); + this.drawTexturedModalRect(i + 56, j + 36 + 12 - k, 176, 12 - k, 14, k + 1); + } + + int l = this.getCookProgressScaled(24); + this.drawTexturedModalRect(i + 79, j + 34, 176, 14, l + 1, 16); + } + + private int getCookProgressScaled(int pixels) + { + int i = this.tileFurnace.getField(2); + int j = this.tileFurnace.getField(3); + return j != 0 && i != 0 ? i * pixels / j : 0; + } + + private int getBurnLeftScaled(int pixels) + { + int i = this.tileFurnace.getField(1); + + if (i == 0) + { + i = 200; + } + + return this.tileFurnace.getField(0) * pixels / i; + } +} diff --git a/src/main/java/com/progwml6/natura/common/gui/client/WorkbenchGui.java b/src/main/java/com/progwml6/natura/common/gui/client/WorkbenchGui.java new file mode 100644 index 00000000..026e5360 --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/gui/client/WorkbenchGui.java @@ -0,0 +1,52 @@ +package com.progwml6.natura.common.gui.client; + +import com.progwml6.natura.common.gui.common.WorkbenchContainer; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class WorkbenchGui extends GuiContainer +{ + private static final ResourceLocation CRAFTING_TABLE_GUI_TEXTURES = new ResourceLocation("textures/gui/container/crafting_table.png"); + + public WorkbenchGui(InventoryPlayer playerInv, World worldIn) + { + this(playerInv, worldIn, BlockPos.ORIGIN); + } + + public WorkbenchGui(InventoryPlayer playerInv, World worldIn, BlockPos blockPosition) + { + super(new WorkbenchContainer(playerInv, worldIn, blockPosition)); + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + @Override + protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) + { + this.fontRenderer.drawString(I18n.format("container.crafting", new Object[0]), 28, 6, 4210752); + this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + /** + * Draws the background layer of this container (behind the items). + */ + @Override + protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) + { + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(CRAFTING_TABLE_GUI_TEXTURES); + int i = (this.width - this.xSize) / 2; + int j = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/com/progwml6/natura/common/gui/common/FurnaceContainer.java b/src/main/java/com/progwml6/natura/common/gui/common/FurnaceContainer.java new file mode 100644 index 00000000..638b14b1 --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/gui/common/FurnaceContainer.java @@ -0,0 +1,191 @@ +package com.progwml6.natura.common.gui.common; + +import javax.annotation.Nullable; + +import com.progwml6.natura.nether.block.furnace.tile.TileEntityNetherrackFurnace; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IContainerListener; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.inventory.SlotFurnaceFuel; +import net.minecraft.inventory.SlotFurnaceOutput; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class FurnaceContainer extends Container +{ + private final IInventory tileFurnace; + + private int cookTime; + + private int totalCookTime; + + private int furnaceBurnTime; + + private int currentItemBurnTime; + + public FurnaceContainer(InventoryPlayer playerInventory, IInventory furnaceInventory) + { + this.tileFurnace = furnaceInventory; + this.addSlotToContainer(new Slot(furnaceInventory, 0, 56, 17)); + this.addSlotToContainer(new SlotFurnaceFuel(furnaceInventory, 1, 56, 53)); + this.addSlotToContainer(new SlotFurnaceOutput(playerInventory.player, furnaceInventory, 2, 116, 35)); + + for (int i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(playerInventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (int k = 0; k < 9; ++k) + { + this.addSlotToContainer(new Slot(playerInventory, k, 8 + k * 18, 142)); + } + } + + @Override + public void addListener(IContainerListener listener) + { + super.addListener(listener); + listener.sendAllWindowProperties(this, this.tileFurnace); + } + + /** + * Looks for changes made in the container, sends them to every listener. + */ + @Override + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.listeners.size(); ++i) + { + IContainerListener icontainerlistener = this.listeners.get(i); + + if (this.cookTime != this.tileFurnace.getField(2)) + { + icontainerlistener.sendProgressBarUpdate(this, 2, this.tileFurnace.getField(2)); + } + + if (this.furnaceBurnTime != this.tileFurnace.getField(0)) + { + icontainerlistener.sendProgressBarUpdate(this, 0, this.tileFurnace.getField(0)); + } + + if (this.currentItemBurnTime != this.tileFurnace.getField(1)) + { + icontainerlistener.sendProgressBarUpdate(this, 1, this.tileFurnace.getField(1)); + } + + if (this.totalCookTime != this.tileFurnace.getField(3)) + { + icontainerlistener.sendProgressBarUpdate(this, 3, this.tileFurnace.getField(3)); + } + } + + this.cookTime = this.tileFurnace.getField(2); + this.furnaceBurnTime = this.tileFurnace.getField(0); + this.currentItemBurnTime = this.tileFurnace.getField(1); + this.totalCookTime = this.tileFurnace.getField(3); + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int id, int data) + { + this.tileFurnace.setField(id, data); + } + + /** + * Determines whether supplied player can use this container + */ + @Override + public boolean canInteractWith(EntityPlayer playerIn) + { + return this.tileFurnace.isUsableByPlayer(playerIn); + } + + /** + * Take a stack from the specified inventory slot. + */ + @Override + @Nullable + public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) + { + ItemStack itemstack = ItemStack.EMPTY; + Slot slot = this.inventorySlots.get(index); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (index == 2) + { + if (!this.mergeItemStack(itemstack1, 3, 39, true)) + { + return ItemStack.EMPTY; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (index != 1 && index != 0) + { + if (FurnaceRecipes.instance().getSmeltingResult(itemstack1).isEmpty()) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return ItemStack.EMPTY; + } + } + else if (TileEntityNetherrackFurnace.isItemFuel(itemstack1)) + { + if (!this.mergeItemStack(itemstack1, 1, 2, false)) + { + return ItemStack.EMPTY; + } + } + else if (index >= 3 && index < 30) + { + if (!this.mergeItemStack(itemstack1, 30, 39, false)) + { + return ItemStack.EMPTY; + } + } + else if (index >= 30 && index < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) + { + return ItemStack.EMPTY; + } + } + else if (!this.mergeItemStack(itemstack1, 3, 39, false)) + { + return ItemStack.EMPTY; + } + + if (itemstack1.isEmpty()) + { + slot.putStack(ItemStack.EMPTY); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.getCount() == itemstack.getCount()) + { + return ItemStack.EMPTY; + } + + slot.onTake(playerIn, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/com/progwml6/natura/common/gui/common/WorkbenchContainer.java b/src/main/java/com/progwml6/natura/common/gui/common/WorkbenchContainer.java new file mode 100644 index 00000000..03ca7cf1 --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/gui/common/WorkbenchContainer.java @@ -0,0 +1,182 @@ +package com.progwml6.natura.common.gui.common; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryCraftResult; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.inventory.SlotCrafting; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class WorkbenchContainer extends Container +{ + /** The crafting matrix inventory (3x3). */ + public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); + + public IInventory craftResult = new InventoryCraftResult(); + + private final World world; + + /** Position of the workbench */ + private final BlockPos pos; + + public WorkbenchContainer(InventoryPlayer playerInventory, World worldIn, BlockPos posIn) + { + this.world = worldIn; + this.pos = posIn; + this.addSlotToContainer(new SlotCrafting(playerInventory.player, this.craftMatrix, this.craftResult, 0, 124, 35)); + + for (int i = 0; i < 3; ++i) + { + for (int j = 0; j < 3; ++j) + { + this.addSlotToContainer(new Slot(this.craftMatrix, j + i * 3, 30 + j * 18, 17 + i * 18)); + } + } + + for (int k = 0; k < 3; ++k) + { + for (int i1 = 0; i1 < 9; ++i1) + { + this.addSlotToContainer(new Slot(playerInventory, i1 + k * 9 + 9, 8 + i1 * 18, 84 + k * 18)); + } + } + + for (int l = 0; l < 9; ++l) + { + this.addSlotToContainer(new Slot(playerInventory, l, 8 + l * 18, 142)); + } + + this.onCraftMatrixChanged(this.craftMatrix); + } + + /** + * Callback for when the crafting matrix is changed. + */ + @Override + public void onCraftMatrixChanged(IInventory inventoryIn) + { + this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.world)); + } + + /** + * Called when the container is closed. + */ + @Override + public void onContainerClosed(EntityPlayer playerIn) + { + super.onContainerClosed(playerIn); + + if (!this.world.isRemote) + { + for (int i = 0; i < 9; ++i) + { + ItemStack itemstack = this.craftMatrix.removeStackFromSlot(i); + + if (!itemstack.isEmpty()) + { + playerIn.dropItem(itemstack, false); + } + } + } + } + + /** + * Determines whether supplied player can use this container + */ + @Override + public boolean canInteractWith(EntityPlayer playerIn) + { + return this.world.getBlockState(this.pos).getBlock() != Blocks.CRAFTING_TABLE ? false : playerIn.getDistanceSq(this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D) <= 64.0D; + } + + /** + * Handle when the stack in slot {@code index} is shift-clicked. Normally this moves the stack between the player + * inventory and the other inventory(s). + * + * @param playerIn Player that interacted with this {@code Container}. + * @param index Index of the {@link Slot}. This index is relative to the list of slots in this {@code Container}, + * {@link #inventorySlots}. + */ + @Override + public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) + { + ItemStack itemstack = ItemStack.EMPTY; + Slot slot = this.inventorySlots.get(index); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (index == 0) + { + itemstack1.getItem().onCreated(itemstack1, this.world, playerIn); + + if (!this.mergeItemStack(itemstack1, 10, 46, true)) + { + return ItemStack.EMPTY; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (index >= 10 && index < 37) + { + if (!this.mergeItemStack(itemstack1, 37, 46, false)) + { + return ItemStack.EMPTY; + } + } + else if (index >= 37 && index < 46) + { + if (!this.mergeItemStack(itemstack1, 10, 37, false)) + { + return ItemStack.EMPTY; + } + } + else if (!this.mergeItemStack(itemstack1, 10, 46, false)) + { + return ItemStack.EMPTY; + } + + if (itemstack1.isEmpty()) + { + slot.putStack(ItemStack.EMPTY); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.getCount() == itemstack.getCount()) + { + return ItemStack.EMPTY; + } + + ItemStack itemstack2 = slot.onTake(playerIn, itemstack1); + + if (index == 0) + { + playerIn.dropItem(itemstack2, false); + } + } + + return itemstack; + } + + /** + * Called to determine if the current slot is valid for the stack merging (double-click) code. The stack passed in + * is null for the initial slot that was double-clicked. + */ + @Override + public boolean canMergeSlot(ItemStack stack, Slot slotIn) + { + return slotIn.inventory != this.craftResult && super.canMergeSlot(stack, slotIn); + } +} diff --git a/src/main/java/com/progwml6/natura/common/item/ItemNaturaDoor.java b/src/main/java/com/progwml6/natura/common/item/ItemNaturaDoor.java new file mode 100644 index 00000000..5739c01f --- /dev/null +++ b/src/main/java/com/progwml6/natura/common/item/ItemNaturaDoor.java @@ -0,0 +1,118 @@ +package com.progwml6.natura.common.item; + +import gnu.trove.map.hash.TIntObjectHashMap; +import net.minecraft.block.Block; +import net.minecraft.block.BlockDoor; +import net.minecraft.block.SoundType; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import slimeknights.mantle.item.ItemMetaDynamic; + +public class ItemNaturaDoor extends ItemMetaDynamic +{ + protected TIntObjectHashMap states = new TIntObjectHashMap<>(); + + public ItemStack addMeta(int meta, String name, IBlockState state) + { + this.states.put(meta, state); + + ItemStack ret = this.addMeta(meta, name); + + return ret; + } + + @Override + public ItemStack addMeta(int meta, String name) + { + if (!this.states.containsKey(meta)) + { + throw new RuntimeException("Usage of wrong function. Use the addMeta function that has an state paired with it with this implementation"); + } + + return super.addMeta(meta, name); + } + + @Override + public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if (facing != EnumFacing.UP) + { + return EnumActionResult.FAIL; + } + else + { + ItemStack itemstack = playerIn.getHeldItem(hand); + + int meta = itemstack.getMetadata(); + + if (this.isValid(meta)) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + Block block = iblockstate.getBlock(); + + if (!block.isReplaceable(worldIn, pos)) + { + pos = pos.offset(facing); + } + + if (playerIn.canPlayerEdit(pos, facing, itemstack) && this.states.get(meta).getBlock().canPlaceBlockAt(worldIn, pos)) + { + EnumFacing enumfacing = EnumFacing.fromAngle(playerIn.rotationYaw); + int i = enumfacing.getFrontOffsetX(); + int j = enumfacing.getFrontOffsetZ(); + boolean flag = i < 0 && hitZ < 0.5F || i > 0 && hitZ > 0.5F || j < 0 && hitX > 0.5F || j > 0 && hitX < 0.5F; + placeDoor(worldIn, pos, enumfacing, this.states.get(meta), flag); + SoundType soundtype = worldIn.getBlockState(pos).getBlock().getSoundType(worldIn.getBlockState(pos), worldIn, pos, playerIn); + worldIn.playSound(playerIn, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F); + itemstack.shrink(1); + return EnumActionResult.SUCCESS; + } + else + { + return EnumActionResult.FAIL; + } + } + else + { + return EnumActionResult.FAIL; + } + } + } + + public static void placeDoor(World worldIn, BlockPos pos, EnumFacing facing, IBlockState door, boolean isRightHinge) + { + BlockPos blockpos = pos.offset(facing.rotateY()); + BlockPos blockpos1 = pos.offset(facing.rotateYCCW()); + int i = (worldIn.getBlockState(blockpos1).isNormalCube() ? 1 : 0) + (worldIn.getBlockState(blockpos1.up()).isNormalCube() ? 1 : 0); + int j = (worldIn.getBlockState(blockpos).isNormalCube() ? 1 : 0) + (worldIn.getBlockState(blockpos.up()).isNormalCube() ? 1 : 0); + boolean flag = worldIn.getBlockState(blockpos1).getBlock() == door || worldIn.getBlockState(blockpos1.up()).getBlock() == door; + boolean flag1 = worldIn.getBlockState(blockpos).getBlock() == door || worldIn.getBlockState(blockpos.up()).getBlock() == door; + + if ((!flag || flag1) && j <= i) + { + if (flag1 && !flag || j < i) + { + isRightHinge = false; + } + } + else + { + isRightHinge = true; + } + + BlockPos blockpos2 = pos.up(); + boolean flag2 = worldIn.isBlockPowered(pos) || worldIn.isBlockPowered(blockpos2); + IBlockState iblockstate = door.withProperty(BlockDoor.FACING, facing).withProperty(BlockDoor.HINGE, isRightHinge ? BlockDoor.EnumHingePosition.RIGHT : BlockDoor.EnumHingePosition.LEFT).withProperty(BlockDoor.POWERED, Boolean.valueOf(flag2)).withProperty(BlockDoor.OPEN, Boolean.valueOf(flag2)); + worldIn.setBlockState(pos, iblockstate.withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER), 2); + worldIn.setBlockState(blockpos2, iblockstate.withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), 2); + worldIn.notifyNeighborsOfStateChange(pos, door.getBlock(), false); + worldIn.notifyNeighborsOfStateChange(blockpos2, door.getBlock(), false); + } +} diff --git a/src/main/java/com/progwml6/natura/decorative/DecorativeClientProxy.java b/src/main/java/com/progwml6/natura/decorative/DecorativeClientProxy.java new file mode 100644 index 00000000..b6db105d --- /dev/null +++ b/src/main/java/com/progwml6/natura/decorative/DecorativeClientProxy.java @@ -0,0 +1,66 @@ +package com.progwml6.natura.decorative; + +import static com.progwml6.natura.common.ModelRegisterUtil.registerItemBlockMeta; +import static com.progwml6.natura.common.ModelRegisterUtil.registerItemModel; + +import com.progwml6.natura.common.ClientProxy; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFenceGate; +import net.minecraft.client.renderer.block.statemap.StateMap; +import net.minecraftforge.client.model.ModelLoader; + +public class DecorativeClientProxy extends ClientProxy +{ + @Override + public void preInit() + { + super.preInit(); + } + + @Override + public void init() + { + super.init(); + } + + @Override + protected void registerModels() + { + for (Block block : NaturaDecorative.fenceGates) + { + ModelLoader.setCustomStateMapper(block, (new StateMap.Builder()).ignore(BlockFenceGate.POWERED).build()); + } + + for (Block block : NaturaDecorative.buttons) + { + registerItemModel(block); + } + + for (Block block : NaturaDecorative.pressurePlates) + { + registerItemModel(block); + } + + for (Block block : NaturaDecorative.trapDoors) + { + registerItemModel(block); + } + + for (Block block : NaturaDecorative.fences) + { + registerItemModel(block); + } + + for (Block block : NaturaDecorative.fenceGates) + { + registerItemModel(block); + } + + registerItemBlockMeta(NaturaDecorative.overworldBookshelves); + registerItemBlockMeta(NaturaDecorative.netherBookshelves); + + registerItemBlockMeta(NaturaDecorative.overworldWorkbenches); + registerItemBlockMeta(NaturaDecorative.netherWorkbenches); + } +} diff --git a/src/main/java/com/progwml6/natura/decorative/NaturaDecorative.java b/src/main/java/com/progwml6/natura/decorative/NaturaDecorative.java new file mode 100644 index 00000000..765b825c --- /dev/null +++ b/src/main/java/com/progwml6/natura/decorative/NaturaDecorative.java @@ -0,0 +1,154 @@ +package com.progwml6.natura.decorative; + +import org.apache.logging.log4j.Logger; + +import com.google.common.eventbus.Subscribe; +import com.progwml6.natura.common.CommonProxy; +import com.progwml6.natura.common.NaturaPulse; +import com.progwml6.natura.decorative.block.bookshelves.BlockNetherBookshelves; +import com.progwml6.natura.decorative.block.bookshelves.BlockOverworldBookshelves; +import com.progwml6.natura.decorative.block.workbenches.BlockNetherWorkbenches; +import com.progwml6.natura.decorative.block.workbenches.BlockOverworldWorkbenches; +import com.progwml6.natura.library.Util; +import com.progwml6.natura.library.enums.WoodTypes; +import com.progwml6.natura.library.enums.WoodTypes.WorldType; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.planks.BlockNetherPlanks; +import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.overworld.block.planks.BlockOverworldPlanks; +import com.progwml6.natura.shared.NaturaCommons; + +import net.minecraft.block.Block; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.SidedProxy; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import slimeknights.mantle.pulsar.pulse.Pulse; + +@Pulse(id = NaturaDecorative.PulseId, description = "Everything that's decorative for Natura. (bookshelfs, etc)") +public class NaturaDecorative extends NaturaPulse +{ + public static final String PulseId = "NaturaDecorative"; + + static final Logger log = Util.getLogger(PulseId); + + @SidedProxy(clientSide = "com.progwml6.natura.decorative.DecorativeClientProxy", serverSide = "com.progwml6.natura.common.CommonProxy") + public static CommonProxy proxy; + + //@formatter:off + public static Block[] buttons = new Block[WoodTypes.values().length]; + public static Block[] pressurePlates = new Block[WoodTypes.values().length]; + public static Block[] trapDoors = new Block[WoodTypes.values().length]; + public static Block[] fences = new Block[WoodTypes.values().length]; + public static Block[] fenceGates = new Block[WoodTypes.values().length]; + + public static BlockOverworldBookshelves overworldBookshelves; + public static BlockNetherBookshelves netherBookshelves; + + public static BlockOverworldWorkbenches overworldWorkbenches; + public static BlockNetherWorkbenches netherWorkbenches; + //@formatter:on + + @Subscribe + public void preInit(FMLPreInitializationEvent event) + { + if (isOverworldLoaded()) + { + for (WoodTypes type : WoodTypes.values()) + { + if (type.getWorldType() == WorldType.OVERWORLD) + { + buttons[type.ordinal()] = registerBlockButton(type.getName() + "_button"); + pressurePlates[type.ordinal()] = registerBlockPressurePlate(type.getName() + "_pressure_plate"); + trapDoors[type.ordinal()] = registerBlockTrapDoor(type.getName() + "_trap_door"); + fences[type.ordinal()] = registerBlockFence(type.getName() + "_fence"); + fenceGates[type.ordinal()] = registerBlockFenceGate(type.getName() + "_fence_gate"); + } + } + + overworldBookshelves = registerEnumBlock(new BlockOverworldBookshelves(), "overworld_bookshelves"); + overworldWorkbenches = registerEnumBlock(new BlockOverworldWorkbenches(), "overworld_workbenches"); + } + + if (isNetherLoaded()) + { + for (WoodTypes type : WoodTypes.values()) + { + if (type.getWorldType() == WorldType.NETHER) + { + buttons[type.ordinal()] = registerBlockButton(type.getName() + "_button"); + pressurePlates[type.ordinal()] = registerBlockPressurePlate(type.getName() + "_pressure_plate"); + trapDoors[type.ordinal()] = registerBlockTrapDoor(type.getName() + "_trap_door"); + fences[type.ordinal()] = registerBlockFence(type.getName() + "_fence"); + fenceGates[type.ordinal()] = registerBlockFenceGate(type.getName() + "_fence_gate"); + } + } + + netherBookshelves = registerEnumBlock(new BlockNetherBookshelves(), "nether_bookshelves"); + netherWorkbenches = registerEnumBlock(new BlockNetherWorkbenches(), "nether_workbenches"); + } + + proxy.preInit(); + } + + @Subscribe + public void init(FMLInitializationEvent event) + { + proxy.init(); + + this.registerRecipes(); + } + + @Subscribe + public void postInit(FMLPostInitializationEvent event) + { + proxy.postInit(); + } + + private void registerRecipes() + { + if (isOverworldLoaded()) + { + for (WoodTypes type : WoodTypes.values()) + { + if (type.getWorldType() == WorldType.OVERWORLD) + { + addShapedRecipe(new ItemStack(buttons[type.ordinal()], 1), "#", '#', new ItemStack(NaturaOverworld.overworldPlanks, 1, type.getPlankMeta())); + addShapedRecipe(new ItemStack(pressurePlates[type.ordinal()], 1), "##", '#', new ItemStack(NaturaOverworld.overworldPlanks, 1, type.getPlankMeta())); + addShapedRecipe(new ItemStack(trapDoors[type.ordinal()], 2), "###", "###", '#', new ItemStack(NaturaOverworld.overworldPlanks, 1, type.getPlankMeta())); + addShapedRecipe(new ItemStack(fences[type.ordinal()], 2), "###", "###", '#', new ItemStack(NaturaCommons.sticks, 1, type.getStickMeta())); + addShapedRecipe(new ItemStack(fenceGates[type.ordinal()], 1), "s#s", "s#s", '#', new ItemStack(NaturaOverworld.overworldPlanks, 1, type.getPlankMeta()), 's', new ItemStack(NaturaCommons.sticks, 1, type.getStickMeta())); + } + } + + for (BlockOverworldPlanks.PlankType type : BlockOverworldPlanks.PlankType.values()) + { + addShapedRecipe(new ItemStack(overworldWorkbenches, 1, type.getMeta()), "##", "##", '#', new ItemStack(NaturaOverworld.overworldPlanks, 1, type.getMeta())); + addShapedRecipe(new ItemStack(overworldBookshelves, 1, type.getMeta()), "###", "bbb", "###", '#', new ItemStack(NaturaOverworld.overworldPlanks, 1, type.getMeta()), 'b', Items.BOOK); + } + } + + if (isNetherLoaded()) + { + for (WoodTypes type : WoodTypes.values()) + { + if (type.getWorldType() == WorldType.NETHER) + { + addShapedRecipe(new ItemStack(buttons[type.ordinal()], 1), "#", '#', new ItemStack(NaturaNether.netherPlanks, 1, type.getPlankMeta())); + addShapedRecipe(new ItemStack(pressurePlates[type.ordinal()], 1), "##", '#', new ItemStack(NaturaNether.netherPlanks, 1, type.getPlankMeta())); + addShapedRecipe(new ItemStack(trapDoors[type.ordinal()], 2), "###", "###", '#', new ItemStack(NaturaNether.netherPlanks, 1, type.getPlankMeta())); + addShapedRecipe(new ItemStack(fences[type.ordinal()], 2), "###", "###", '#', new ItemStack(NaturaCommons.sticks, 1, type.getStickMeta())); + addShapedRecipe(new ItemStack(fenceGates[type.ordinal()], 1), "s#s", "s#s", '#', new ItemStack(NaturaNether.netherPlanks, 1, type.getPlankMeta()), 's', new ItemStack(NaturaCommons.sticks, 1, type.getStickMeta())); + } + } + + for (BlockNetherPlanks.PlankType type : BlockNetherPlanks.PlankType.values()) + { + addShapedRecipe(new ItemStack(netherWorkbenches, 1, type.getMeta()), "##", "##", '#', new ItemStack(NaturaNether.netherPlanks, 1, type.getMeta())); + addShapedRecipe(new ItemStack(netherBookshelves, 1, type.getMeta()), "###", "bbb", "###", '#', new ItemStack(NaturaNether.netherPlanks, 1, type.getMeta()), 'b', Items.BOOK); + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockNetherBookshelves.java b/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockNetherBookshelves.java new file mode 100644 index 00000000..b38532bf --- /dev/null +++ b/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockNetherBookshelves.java @@ -0,0 +1,64 @@ +package com.progwml6.natura.decorative.block.bookshelves; + +import java.util.Random; + +import javax.annotation.Nullable; + +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.nether.block.planks.BlockNetherPlanks; + +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import slimeknights.mantle.block.EnumBlock; + +public class BlockNetherBookshelves extends EnumBlock +{ + public static PropertyEnum TYPE = PropertyEnum.create("type", BlockNetherPlanks.PlankType.class); + + public BlockNetherBookshelves() + { + super(Material.WOOD, TYPE, BlockNetherPlanks.PlankType.class); + + this.setSoundType(SoundType.WOOD); + this.setHardness(1.5F); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } + + /** + * Returns the quantity of items to drop on block destruction. + */ + @Override + public int quantityDropped(Random random) + { + return 3; + } + + /** + * Get the Item that this Block should drop when harvested. + */ + @Override + @Nullable + public Item getItemDropped(IBlockState state, Random rand, int fortune) + { + return Items.BOOK; + } + + @Override + public float getEnchantPowerBonus(World world, BlockPos pos) + { + return 1; + } + + @Override + @Deprecated + public boolean isFullCube(IBlockState state) + { + return false; + } +} diff --git a/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockOverworldBookshelves.java b/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockOverworldBookshelves.java new file mode 100644 index 00000000..0a3d8c09 --- /dev/null +++ b/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockOverworldBookshelves.java @@ -0,0 +1,64 @@ +package com.progwml6.natura.decorative.block.bookshelves; + +import java.util.Random; + +import javax.annotation.Nullable; + +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.overworld.block.planks.BlockOverworldPlanks; + +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import slimeknights.mantle.block.EnumBlock; + +public class BlockOverworldBookshelves extends EnumBlock +{ + public static PropertyEnum TYPE = PropertyEnum.create("type", BlockOverworldPlanks.PlankType.class); + + public BlockOverworldBookshelves() + { + super(Material.WOOD, TYPE, BlockOverworldPlanks.PlankType.class); + + this.setSoundType(SoundType.WOOD); + this.setHardness(1.5F); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } + + /** + * Returns the quantity of items to drop on block destruction. + */ + @Override + public int quantityDropped(Random random) + { + return 3; + } + + /** + * Get the Item that this Block should drop when harvested. + */ + @Override + @Nullable + public Item getItemDropped(IBlockState state, Random rand, int fortune) + { + return Items.BOOK; + } + + @Override + public float getEnchantPowerBonus(World world, BlockPos pos) + { + return 1; + } + + @Override + @Deprecated + public boolean isFullCube(IBlockState state) + { + return false; + } +} diff --git a/src/main/java/com/progwml6/natura/decorative/block/workbenches/BlockNetherWorkbenches.java b/src/main/java/com/progwml6/natura/decorative/block/workbenches/BlockNetherWorkbenches.java new file mode 100644 index 00000000..3d3a2a85 --- /dev/null +++ b/src/main/java/com/progwml6/natura/decorative/block/workbenches/BlockNetherWorkbenches.java @@ -0,0 +1,52 @@ +package com.progwml6.natura.decorative.block.workbenches; + +import com.progwml6.natura.Natura; +import com.progwml6.natura.common.GuiIDs; +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.nether.block.planks.BlockNetherPlanks; + +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import slimeknights.mantle.block.EnumBlock; + +public class BlockNetherWorkbenches extends EnumBlock +{ + public static PropertyEnum TYPE = PropertyEnum.create("type", BlockNetherPlanks.PlankType.class); + + public BlockNetherWorkbenches() + { + super(Material.WOOD, TYPE, BlockNetherPlanks.PlankType.class); + + this.setSoundType(SoundType.WOOD); + this.setHardness(2.5F); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } + + @Override + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if (worldIn.isRemote) + { + return true; + } + else + { + playerIn.openGui(Natura.instance, GuiIDs.CRAFTING_TABLE, worldIn, pos.getX(), pos.getY(), pos.getZ()); + return true; + } + } + + @Override + @Deprecated + public boolean isFullCube(IBlockState state) + { + return false; + } +} diff --git a/src/main/java/com/progwml6/natura/decorative/block/workbenches/BlockOverworldWorkbenches.java b/src/main/java/com/progwml6/natura/decorative/block/workbenches/BlockOverworldWorkbenches.java new file mode 100644 index 00000000..4299687d --- /dev/null +++ b/src/main/java/com/progwml6/natura/decorative/block/workbenches/BlockOverworldWorkbenches.java @@ -0,0 +1,52 @@ +package com.progwml6.natura.decorative.block.workbenches; + +import com.progwml6.natura.Natura; +import com.progwml6.natura.common.GuiIDs; +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.overworld.block.planks.BlockOverworldPlanks; + +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import slimeknights.mantle.block.EnumBlock; + +public class BlockOverworldWorkbenches extends EnumBlock +{ + public static PropertyEnum TYPE = PropertyEnum.create("type", BlockOverworldPlanks.PlankType.class); + + public BlockOverworldWorkbenches() + { + super(Material.WOOD, TYPE, BlockOverworldPlanks.PlankType.class); + + this.setSoundType(SoundType.WOOD); + this.setHardness(2.5F); + this.setCreativeTab(NaturaRegistry.tabDecorative); + } + + @Override + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if (worldIn.isRemote) + { + return true; + } + else + { + playerIn.openGui(Natura.instance, GuiIDs.CRAFTING_TABLE, worldIn, pos.getX(), pos.getY(), pos.getZ()); + return true; + } + } + + @Override + @Deprecated + public boolean isFullCube(IBlockState state) + { + return false; + } +} diff --git a/src/main/java/com/progwml6/natura/entities/EntitiesClientProxy.java b/src/main/java/com/progwml6/natura/entities/EntitiesClientProxy.java index da38a162..cc96bf65 100644 --- a/src/main/java/com/progwml6/natura/entities/EntitiesClientProxy.java +++ b/src/main/java/com/progwml6/natura/entities/EntitiesClientProxy.java @@ -25,7 +25,7 @@ public void preInit() RenderingRegistry.registerEntityRenderingHandler(EntityHeatscarSpider.class, RenderNautraHeatscarSpider.FACTORY_heatscarSpider); RenderingRegistry.registerEntityRenderingHandler(EntityBabyHeatscarSpider.class, RenderNautraBabyHeatscarSpider.FACTORY_babyHeatscarSpider); } - RenderingRegistry.registerEntityRenderingHandler(EntityNitroCreeper.class, RenderNaturaNitroCreeper.FACTORY_nitrocreeper); + RenderingRegistry.registerEntityRenderingHandler(EntityNitroCreeper.class, RenderNaturaNitroCreeper.FACTORY_nitroCreeper); super.preInit(); } diff --git a/src/main/java/com/progwml6/natura/entities/NaturaEntities.java b/src/main/java/com/progwml6/natura/entities/NaturaEntities.java index 5ffdcf09..462cf9bf 100644 --- a/src/main/java/com/progwml6/natura/entities/NaturaEntities.java +++ b/src/main/java/com/progwml6/natura/entities/NaturaEntities.java @@ -1,5 +1,7 @@ package com.progwml6.natura.entities; +import java.util.Set; + import org.apache.logging.log4j.Logger; import com.google.common.eventbus.Subscribe; @@ -13,8 +15,10 @@ import com.progwml6.natura.entities.entity.monster.EntityNitroCreeper; import com.progwml6.natura.entities.entity.passive.EntityImp; import com.progwml6.natura.library.Util; +import com.progwml6.natura.shared.NaturaCommons; import net.minecraft.entity.EnumCreatureType; +import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.util.ResourceLocation; import net.minecraft.world.biome.Biome; import net.minecraft.world.storage.loot.LootTableList; @@ -39,17 +43,17 @@ public class NaturaEntities extends NaturaPulse @Subscribe public void preInit(FMLPreInitializationEvent event) { - EntityRegistry.registerModEntity(new ResourceLocation(Natura.modID, "imp"), EntityImp.class, "imp", EntityIDs.IMP, Natura.instance, 32, 5, true, 0xF29735, 0x2E1F10); + EntityRegistry.registerModEntity(new ResourceLocation("natura", "imp"), EntityImp.class, "imp", EntityIDs.IMP, Natura.instance, 32, 5, true, 0xF29735, 0x2E1F10); LootTableList.register(EntityImp.LOOT_TABLE); if (Config.enableHeatscarSpider) { - EntityRegistry.registerModEntity(new ResourceLocation(Natura.modID, "heatscarspider"), EntityHeatscarSpider.class, "heatscarspider", EntityIDs.HEATSCARSPIDER, Natura.instance, 32, 5, true, 0xE64D10, 0x57B1BD); - EntityRegistry.registerModEntity(new ResourceLocation(Natura.modID, "babyheatscarspider"), EntityBabyHeatscarSpider.class, "babyheatscarspider", EntityIDs.BABYHEATSCARSPIDER, Natura.instance, 32, 5, true, 0xE64D10, 0x57B1BD); + EntityRegistry.registerModEntity(new ResourceLocation("natura", "heatscarspider"), EntityHeatscarSpider.class, "heatscarspider", EntityIDs.HEATSCARSPIDER, Natura.instance, 32, 5, true, 0xE64D10, 0x57B1BD); + EntityRegistry.registerModEntity(new ResourceLocation("natura", "babyheatscarspider"), EntityBabyHeatscarSpider.class, "babyheatscarspider", EntityIDs.BABYHEATSCARSPIDER, Natura.instance, 32, 5, true, 0xE64D10, 0x57B1BD); LootTableList.register(EntityHeatscarSpider.LOOT_TABLE); } - EntityRegistry.registerModEntity(new ResourceLocation(Natura.modID, "nitrocreeper"), EntityNitroCreeper.class, "nitrocreeper", EntityIDs.NITROCREEPER, Natura.instance, 64, 5, true, 0xF73E6C, 0x9B5004); + EntityRegistry.registerModEntity(new ResourceLocation("natura", "nitrocreeper"), EntityNitroCreeper.class, "nitrocreeper", EntityIDs.NITROCREEPER, Natura.instance, 64, 5, true, 0xF73E6C, 0x9B5004); proxy.preInit(); } @@ -58,22 +62,44 @@ public void preInit(FMLPreInitializationEvent event) public void init(FMLInitializationEvent event) { proxy.init(); + + this.registerRecipes(); + this.registerSmelting(); } @Subscribe public void postInit(FMLPostInitializationEvent event) { //TODO add way to exclude some of these - Biome[] nether = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.NETHER); + Set biomeList = BiomeDictionary.getBiomes(BiomeDictionary.Type.NETHER); + + Biome[] biomes = biomeList.toArray(new Biome[biomeList.size()]); + + EntityRegistry.addSpawn(EntityImp.class, 10, 8, 12, EnumCreatureType.CREATURE, biomes); - EntityRegistry.addSpawn(EntityImp.class, 10, 8, 12, EnumCreatureType.CREATURE, nether); if (Config.enableHeatscarSpider) { - EntityRegistry.addSpawn(EntityHeatscarSpider.class, 10, 4, 4, EnumCreatureType.MONSTER, nether); - EntityRegistry.addSpawn(EntityBabyHeatscarSpider.class, 10, 4, 4, EnumCreatureType.MONSTER, nether); + EntityRegistry.addSpawn(EntityHeatscarSpider.class, 10, 4, 4, EnumCreatureType.MONSTER, biomes); + EntityRegistry.addSpawn(EntityBabyHeatscarSpider.class, 10, 4, 4, EnumCreatureType.MONSTER, biomes); } - EntityRegistry.addSpawn(EntityNitroCreeper.class, 8, 4, 6, EnumCreatureType.MONSTER, nether); + + EntityRegistry.addSpawn(EntityNitroCreeper.class, 8, 4, 6, EnumCreatureType.MONSTER, biomes); proxy.postInit(); } + + private void registerRecipes() + { + + } + + private void registerSmelting() + { + FurnaceRecipes furnaceRecipes = FurnaceRecipes.instance(); + + if (isEntitiesLoaded()) + { + furnaceRecipes.addSmeltingRecipe(NaturaCommons.impmeatRaw.copy(), NaturaCommons.impmeatCooked.copy(), 0.2F); + } + } } diff --git a/src/main/java/com/progwml6/natura/entities/entity/monster/EntityBabyHeatscarSpider.java b/src/main/java/com/progwml6/natura/entities/entity/monster/EntityBabyHeatscarSpider.java index 27379d7d..02ccf59b 100644 --- a/src/main/java/com/progwml6/natura/entities/entity/monster/EntityBabyHeatscarSpider.java +++ b/src/main/java/com/progwml6/natura/entities/entity/monster/EntityBabyHeatscarSpider.java @@ -94,7 +94,7 @@ public void fall(float distance, float damageMultiplier) this.playSound(SoundEvents.ENTITY_GENERIC_SMALL_FALL, 1.0F, 1.0F); } - this.attackEntityFrom(DamageSource.fall, i); + this.attackEntityFrom(DamageSource.FALL, i); BlockPos pos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.posY - 0.20000000298023224D), MathHelper.floor(this.posZ)); IBlockState state = this.world.getBlockState(pos); diff --git a/src/main/java/com/progwml6/natura/entities/entity/monster/EntityHeatscarSpider.java b/src/main/java/com/progwml6/natura/entities/entity/monster/EntityHeatscarSpider.java index fb94b8eb..d546a022 100644 --- a/src/main/java/com/progwml6/natura/entities/entity/monster/EntityHeatscarSpider.java +++ b/src/main/java/com/progwml6/natura/entities/entity/monster/EntityHeatscarSpider.java @@ -110,7 +110,7 @@ public void fall(float distance, float damageMultiplier) this.playSound(SoundEvents.ENTITY_GENERIC_SMALL_FALL, 1.0F, 1.0F); } - this.attackEntityFrom(DamageSource.fall, i); + this.attackEntityFrom(DamageSource.FALL, i); BlockPos pos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.posY - 0.20000000298023224D), MathHelper.floor(this.posZ)); IBlockState state = this.world.getBlockState(pos); diff --git a/src/main/java/com/progwml6/natura/entities/entity/monster/EntityNitroCreeper.java b/src/main/java/com/progwml6/natura/entities/entity/monster/EntityNitroCreeper.java index d0349040..25dd33ef 100644 --- a/src/main/java/com/progwml6/natura/entities/entity/monster/EntityNitroCreeper.java +++ b/src/main/java/com/progwml6/natura/entities/entity/monster/EntityNitroCreeper.java @@ -5,6 +5,7 @@ import net.minecraft.entity.ai.EntityAIAttackMelee; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.init.Items; import net.minecraft.init.SoundEvents; import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; @@ -176,7 +177,7 @@ protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier) { Item dropItem = this.getDropItem(); - if (dropItem != null) + if (dropItem != Items.AIR) { int numberOfTimes = this.rand.nextInt(4) + 2; @@ -193,7 +194,7 @@ protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier) if (this.getPowered()) { - if (dropItem != null) + if (dropItem != Items.AIR) { int numberOfTimes = this.rand.nextInt(40) + 20; diff --git a/src/main/java/com/progwml6/natura/entities/entity/passive/EntityImp.java b/src/main/java/com/progwml6/natura/entities/entity/passive/EntityImp.java index 1748dc35..fa394014 100644 --- a/src/main/java/com/progwml6/natura/entities/entity/passive/EntityImp.java +++ b/src/main/java/com/progwml6/natura/entities/entity/passive/EntityImp.java @@ -126,7 +126,7 @@ protected ResourceLocation getLootTable() @Override public boolean isBreedingItem(ItemStack par1ItemStack) { - return par1ItemStack != ItemStack.EMPTY && par1ItemStack.getItem() == soups && par1ItemStack.getItemDamage() >= 4; + return !par1ItemStack.isEmpty() && par1ItemStack.getItem() == soups && par1ItemStack.getItemDamage() >= 4; } @Override diff --git a/src/main/java/com/progwml6/natura/library/NaturaRegistry.java b/src/main/java/com/progwml6/natura/library/NaturaRegistry.java index 94068eb8..752d8c62 100644 --- a/src/main/java/com/progwml6/natura/library/NaturaRegistry.java +++ b/src/main/java/com/progwml6/natura/library/NaturaRegistry.java @@ -22,6 +22,8 @@ private NaturaRegistry() public static CreativeTab tabWorld = new CreativeTab("NaturaWorld", new ItemStack(Item.getItemFromBlock(Blocks.SLIME_BLOCK))); + public static CreativeTab tabDecorative = new CreativeTab("NaturaDecorative", new ItemStack(Item.getItemFromBlock(Blocks.SLIME_BLOCK))); + /*--------------------------------------------------------------------------- | MATERIALS | ---------------------------------------------------------------------------*/ diff --git a/src/main/java/com/progwml6/natura/library/client/renderer/monster/RenderNaturaNitroCreeper.java b/src/main/java/com/progwml6/natura/library/client/renderer/monster/RenderNaturaNitroCreeper.java index cf2fea16..d43a88bb 100644 --- a/src/main/java/com/progwml6/natura/library/client/renderer/monster/RenderNaturaNitroCreeper.java +++ b/src/main/java/com/progwml6/natura/library/client/renderer/monster/RenderNaturaNitroCreeper.java @@ -12,7 +12,7 @@ public class RenderNaturaNitroCreeper extends RenderCreeper { - public static final Factory FACTORY_nitrocreeper = new Factory(); + public static final Factory FACTORY_nitroCreeper = new Factory(); public static final ResourceLocation impTexture = Util.getResource("textures/entity/nitrocreeper.png"); diff --git a/src/main/java/com/progwml6/natura/library/client/state/CustomStateMap.java b/src/main/java/com/progwml6/natura/library/client/state/CustomStateMap.java new file mode 100644 index 00000000..7b15cf3a --- /dev/null +++ b/src/main/java/com/progwml6/natura/library/client/state/CustomStateMap.java @@ -0,0 +1,37 @@ +package com.progwml6.natura.library.client.state; + +import java.util.LinkedHashMap; + +import javax.annotation.Nonnull; + +import com.google.common.collect.Maps; + +import net.minecraft.block.Block; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.client.renderer.block.statemap.StateMapperBase; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class CustomStateMap extends StateMapperBase +{ + private final String customName; + + public CustomStateMap(String customName) + { + this.customName = customName; + } + + @Nonnull + @Override + protected ModelResourceLocation getModelResourceLocation(@Nonnull IBlockState state) + { + LinkedHashMap, Comparable> linkedhashmap = Maps.newLinkedHashMap(state.getProperties()); + ResourceLocation res = new ResourceLocation(Block.REGISTRY.getNameForObject(state.getBlock()).getResourceDomain(), this.customName); + + return new ModelResourceLocation(res, this.getPropertyString(linkedhashmap)); + } +} diff --git a/src/main/java/com/progwml6/natura/library/enums/WoodTypes.java b/src/main/java/com/progwml6/natura/library/enums/WoodTypes.java new file mode 100644 index 00000000..923c5a22 --- /dev/null +++ b/src/main/java/com/progwml6/natura/library/enums/WoodTypes.java @@ -0,0 +1,69 @@ +package com.progwml6.natura.library.enums; + +import java.util.Locale; + +import javax.annotation.Nonnull; + +import net.minecraft.util.IStringSerializable; + +public enum WoodTypes implements IStringSerializable +{ + MAPLE(WorldType.OVERWORLD, 0, 0), + SILVERBELL(WorldType.OVERWORLD, 1, 1), + AMARANTH(WorldType.OVERWORLD, 2, 2), + TIGER(WorldType.OVERWORLD, 3, 3), + WILLOW(WorldType.OVERWORLD, 4, 4), + EUCALYPTUS(WorldType.OVERWORLD, 5, 5), + HOPSEED(WorldType.OVERWORLD, 6, 6), + SAKURA(WorldType.OVERWORLD, 7, 7), + REDWOOD(WorldType.OVERWORLD, 8, 8), + GHOSTWOOD(WorldType.NETHER, 0, 9), + BLOODWOOD(WorldType.NETHER, 1, 12), + FUSEWOOD(WorldType.NETHER, 2, 11), + DARKWOOD(WorldType.NETHER, 3, 10); + + @Nonnull + private final WorldType worldType; + + @Nonnull + private final int plankMeta; + + @Nonnull + private final int stickMeta; + + private WoodTypes(@Nonnull WorldType worldType, @Nonnull int plankMeta, @Nonnull int stickMeta) + { + this.worldType = worldType; + this.plankMeta = plankMeta; + this.stickMeta = stickMeta; + } + + @Override + public String getName() + { + return this.toString().toLowerCase(Locale.US); + } + + @Nonnull + public WorldType getWorldType() + { + return worldType; + } + + @Nonnull + public int getPlankMeta() + { + return plankMeta; + } + + @Nonnull + public int getStickMeta() + { + return stickMeta; + } + + public enum WorldType + { + OVERWORLD, NETHER; + } +} diff --git a/src/main/java/com/progwml6/natura/library/worldgen/WorldGenHelper.java b/src/main/java/com/progwml6/natura/library/worldgen/WorldGenHelper.java new file mode 100644 index 00000000..cb8b0082 --- /dev/null +++ b/src/main/java/com/progwml6/natura/library/worldgen/WorldGenHelper.java @@ -0,0 +1,61 @@ +package com.progwml6.natura.library.worldgen; + +import javax.annotation.Nullable; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +/** + * WorldGenHelper to help find the y coordinate/blockPos + * Credit goes to mezz. + */ +public class WorldGenHelper +{ + /** + * Gets the position just above the top solid or liquid ground block in the world. + * Returns null if there is no solid or liquid ground at the given x,z coordinates. + */ + @Nullable + public static BlockPos getGroundPos(World world, int x, int z) + { + final BlockPos topPos = world.getHeight(new BlockPos(x, 0, z)); + + if (topPos.getY() == 0) + { + return null; + } + + final BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos(topPos); + + IBlockState blockState = world.getBlockState(pos); + + while (isTreeBlock(blockState, world, pos) || canReplace(blockState, world, pos)) + { + pos.move(EnumFacing.DOWN); + + if (pos.getY() <= 0) + { + return null; + } + + blockState = world.getBlockState(pos); + } + + return pos.up(); + } + + public static boolean isTreeBlock(IBlockState blockState, World world, BlockPos pos) + { + Block block = blockState.getBlock(); + return block.isLeaves(blockState, world, pos) || block.isWood(world, pos); + } + + public static boolean canReplace(IBlockState blockState, World world, BlockPos pos) + { + Block block = blockState.getBlock(); + return block.isReplaceable(world, pos) && !blockState.getMaterial().isLiquid(); + } +} diff --git a/src/main/java/com/progwml6/natura/nether/NaturaNether.java b/src/main/java/com/progwml6/natura/nether/NaturaNether.java index 689079eb..987c7330 100644 --- a/src/main/java/com/progwml6/natura/nether/NaturaNether.java +++ b/src/main/java/com/progwml6/natura/nether/NaturaNether.java @@ -5,23 +5,41 @@ import com.google.common.eventbus.Subscribe; import com.progwml6.natura.common.CommonProxy; import com.progwml6.natura.common.NaturaPulse; +import com.progwml6.natura.common.block.BlockNaturaDoor; import com.progwml6.natura.common.item.ItemBlockLeaves; +import com.progwml6.natura.common.item.ItemNaturaDoor; +import com.progwml6.natura.library.NaturaRegistry; import com.progwml6.natura.library.Util; import com.progwml6.natura.nether.block.bush.BlockNetherBerryBush; +import com.progwml6.natura.nether.block.button.BlockNetherButton; +import com.progwml6.natura.nether.block.furnace.BlockNetherrackFurnace; +import com.progwml6.natura.nether.block.furnace.tile.TileEntityNetherrackFurnace; import com.progwml6.natura.nether.block.glass.BlockNetherGlass; +import com.progwml6.natura.nether.block.hopper.BlockBlazeHopper; import com.progwml6.natura.nether.block.leaves.BlockNetherLeaves; import com.progwml6.natura.nether.block.leaves.BlockNetherLeaves2; +import com.progwml6.natura.nether.block.lever.BlockNetherLever; import com.progwml6.natura.nether.block.logs.BlockNetherLog; +import com.progwml6.natura.nether.block.logs.BlockNetherLog2; import com.progwml6.natura.nether.block.obelisk.BlockRespawnObelisk; import com.progwml6.natura.nether.block.planks.BlockNetherPlanks; +import com.progwml6.natura.nether.block.pressureplate.BlockNetherPressurePlate; +import com.progwml6.natura.nether.block.rail.BlockBlazeRail; +import com.progwml6.natura.nether.block.rail.BlockBlazeRailDetector; +import com.progwml6.natura.nether.block.rail.BlockBlazeRailPowered; import com.progwml6.natura.nether.block.sand.BlockHeatSand; import com.progwml6.natura.nether.block.saplings.BlockNetherSapling; +import com.progwml6.natura.nether.block.saplings.BlockNetherSapling2; +import com.progwml6.natura.nether.block.shrooms.BlockNetherGlowshroom; +import com.progwml6.natura.nether.block.shrooms.BlockNetherLargeGlowshroom; import com.progwml6.natura.nether.block.slabs.BlockNetherSlab; import com.progwml6.natura.nether.block.soil.BlockTaintedSoil; +import com.progwml6.natura.nether.block.vine.BlockNetherThornVines; import com.progwml6.natura.shared.NaturaCommons; import net.minecraft.block.Block; import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.fml.common.SidedProxy; @@ -29,6 +47,9 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; import slimeknights.mantle.item.ItemBlockMeta; import slimeknights.mantle.pulsar.pulse.Pulse; @@ -44,14 +65,17 @@ public class NaturaNether extends NaturaPulse //@formatter:off public static BlockNetherLog netherLog; + public static BlockNetherLog2 netherLog2; public static BlockNetherLeaves netherLeaves; public static BlockNetherLeaves2 netherLeaves2; public static BlockNetherSapling netherSapling; + public static BlockNetherSapling2 netherSapling2; public static BlockNetherPlanks netherPlanks; public static Block netherSlab; public static BlockHeatSand netherHeatSand; public static BlockTaintedSoil netherTaintedSoil; + public static BlockNetherThornVines netherThornVines; public static BlockNetherGlass netherGlass; @@ -65,13 +89,44 @@ public class NaturaNether extends NaturaPulse public static Block netherBerryBushSkyberry; public static Block netherBerryBushStingberry; + public static BlockNetherGlowshroom netherGlowshroom; + public static BlockNetherLargeGlowshroom netherLargeGreenGlowshroom; + public static BlockNetherLargeGlowshroom netherLargeBlueGlowshroom; + public static BlockNetherLargeGlowshroom netherLargePurpleGlowshroom; + public static BlockRespawnObelisk respawnObelisk; + + public static BlockNaturaDoor ghostwoodDoor; + public static BlockNaturaDoor bloodwoodDoor; + + public static BlockBlazeHopper blazeHopper; + + public static BlockNetherLever netherLever; + + public static BlockNetherButton netherButton; + + public static BlockNetherPressurePlate netherPressurePlate; + + public static BlockBlazeRail blazeRail; + public static BlockBlazeRailPowered blazeRailPowered; + public static BlockBlazeRailPowered blazeRailActivator; + public static BlockBlazeRailDetector blazeRailDetector; + + public static BlockNetherrackFurnace netherrackFurnace; + public static BlockNetherrackFurnace litNetherrackFurnace; + + // Items + public static ItemNaturaDoor netherDoors; + + public static ItemStack ghostwood_door; + public static ItemStack bloodwood_door; //@formatter:on @Subscribe public void preInit(FMLPreInitializationEvent event) { netherLog = registerEnumBlock(new BlockNetherLog(), "nether_logs"); + netherLog2 = registerBlock(new BlockNetherLog2(), "nether_logs2"); netherLeaves = registerBlock(new ItemBlockLeaves(new BlockNetherLeaves()), "nether_leaves"); ItemBlockMeta.setMappingProperty(netherLeaves, BlockNetherLeaves.TYPE); @@ -79,6 +134,7 @@ public void preInit(FMLPreInitializationEvent event) ItemBlockMeta.setMappingProperty(netherLeaves2, BlockNetherLeaves2.TYPE); netherSapling = registerBlock(new BlockNetherSapling(), "nether_sapling", BlockNetherSapling.FOLIAGE); + netherSapling2 = registerBlock(new BlockNetherSapling2(), "nether_sapling2", BlockNetherSapling2.FOLIAGE); netherPlanks = registerEnumBlock(new BlockNetherPlanks(), "nether_planks"); @@ -86,6 +142,7 @@ public void preInit(FMLPreInitializationEvent event) netherHeatSand = registerBlock(new BlockHeatSand(), "nether_heat_sand"); netherTaintedSoil = registerEnumBlock(new BlockTaintedSoil(), "nether_tainted_soil"); + netherThornVines = registerBlock(new BlockNetherThornVines(), "nether_thorn_vines"); netherGlass = registerEnumBlock(new BlockNetherGlass(), "nether_glass"); @@ -101,7 +158,49 @@ public void preInit(FMLPreInitializationEvent event) respawnObelisk = registerEnumBlock(new BlockRespawnObelisk(), "respawn_obelisk"); + netherGlowshroom = registerBlock(new BlockNetherGlowshroom(), "nether_glowshroom", BlockNetherGlowshroom.TYPE); + netherLargeGreenGlowshroom = registerBlock(new BlockNetherLargeGlowshroom(netherGlowshroom, BlockNetherGlowshroom.GlowshroomType.GREEN.getMeta()), "nether_green_large_glowshroom", BlockNetherLargeGlowshroom.VARIANT); + netherLargeBlueGlowshroom = registerBlock(new BlockNetherLargeGlowshroom(netherGlowshroom, BlockNetherGlowshroom.GlowshroomType.BLUE.getMeta()), "nether_blue_large_glowshroom", BlockNetherLargeGlowshroom.VARIANT); + netherLargePurpleGlowshroom = registerBlock(new BlockNetherLargeGlowshroom(netherGlowshroom, BlockNetherGlowshroom.GlowshroomType.PURPLE.getMeta()), "nether_purple_large_glowshroom", BlockNetherLargeGlowshroom.VARIANT); + + ghostwoodDoor = registerBlock(new BlockNaturaDoor(), "nether_door_ghostwood"); + bloodwoodDoor = registerBlock(new BlockNaturaDoor(), "nether_door_bloodwood"); + + blazeHopper = registerBlock(new BlockBlazeHopper(), "blaze_hopper"); + + netherLever = registerBlock(new BlockNetherLever(), "nether_lever"); + + netherButton = registerBlock(new BlockNetherButton(), "nether_button"); + + netherPressurePlate = registerBlock(new BlockNetherPressurePlate(), "nether_pressure_plate"); + + blazeRail = registerBlock(new BlockBlazeRail(), "blaze_rail"); + blazeRailPowered = registerBlock(new BlockBlazeRailPowered(false), "blaze_rail_golden"); + blazeRailActivator = registerBlock(new BlockBlazeRailPowered(true), "blaze_rail_activator"); + blazeRailDetector = registerBlock(new BlockBlazeRailDetector(), "blaze_rail_detector"); + + netherrackFurnace = registerBlock(new BlockNetherrackFurnace(false), "netherrack_furnace"); + litNetherrackFurnace = registerBlock(new BlockNetherrackFurnace(true), "lit_netherrack_furnace"); + + registerTE(TileEntityNetherrackFurnace.class, "netherrack_furnace"); + + // Items + netherDoors = registerItem(new ItemNaturaDoor(), "nether_doors"); + + netherDoors.setCreativeTab(NaturaRegistry.tabDecorative); + + ghostwood_door = netherDoors.addMeta(0, "ghostwood_door", NaturaNether.ghostwoodDoor.getDefaultState()); + bloodwood_door = netherDoors.addMeta(1, "bloodwood_door", NaturaNether.bloodwoodDoor.getDefaultState()); + + ghostwoodDoor.setDoor(NaturaNether.ghostwood_door); + bloodwoodDoor.setDoor(NaturaNether.bloodwood_door); + proxy.preInit(); + + if (!isOverworldLoaded()) + { + NaturaRegistry.tabDecorative.setDisplayIcon(ghostwood_door); + } } @Subscribe @@ -121,32 +220,89 @@ public void postInit(FMLPostInitializationEvent event) private void registerRecipes() { + // Arrows + GameRegistry.addRecipe(NaturaCommons.ghostwoodFletching.copy(), " s ", "#s#", "#s#", 's', NaturaCommons.ghostwood_stick.copy(), '#', new ItemStack(netherLeaves, 1, BlockNetherLeaves.LeavesType.GHOSTWOOD.getMeta())); + + // Planks GameRegistry.addRecipe(new ItemStack(netherPlanks, 4, BlockNetherPlanks.PlankType.DARKWOOD.getMeta()), "w", 'w', new ItemStack(netherLog, 1, BlockNetherLog.LogType.DARKWOOD.getMeta())); - //TODO enable this when fixed - //GameRegistry.addRecipe(new ItemStack(netherPlanks, 4, BlockNetherPlanks.PlankType.BLOODWOOD.getMeta()), "w", 'w', new ItemStack(netherLog, 1, BlockNetherLog.LogType.BLOODWOOD.getMeta())); + GameRegistry.addRecipe(new ItemStack(netherPlanks, 4, BlockNetherPlanks.PlankType.BLOODWOOD.getMeta()), "w", 'w', new ItemStack(netherLog2, 1, OreDictionary.WILDCARD_VALUE)); GameRegistry.addRecipe(new ItemStack(netherPlanks, 4, BlockNetherPlanks.PlankType.FUSEWOOD.getMeta()), "w", 'w', new ItemStack(netherLog, 1, BlockNetherLog.LogType.FUSEWOOD.getMeta())); GameRegistry.addRecipe(new ItemStack(netherPlanks, 4, BlockNetherPlanks.PlankType.GHOSTWOOD.getMeta()), "w", 'w', new ItemStack(netherLog, 1, BlockNetherLog.LogType.GHOSTWOOD.getMeta())); - //SLABS + // Doors + addShapedRecipe(ghostwood_door.copy(), "##", "##", "##", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.GHOSTWOOD.getMeta())); + addShapedRecipe(bloodwood_door.copy(), "##", "##", "##", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.BLOODWOOD.getMeta())); + + // Sticks + addShapedRecipe(NaturaCommons.ghostwood_stick.copy(), "#", "#", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.GHOSTWOOD.getMeta())); + addShapedRecipe(NaturaCommons.bloodwood_stick.copy(), "#", "#", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.BLOODWOOD.getMeta())); + addShapedRecipe(NaturaCommons.darkwood_stick.copy(), "#", "#", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.DARKWOOD.getMeta())); + addShapedRecipe(NaturaCommons.fusewood_stick.copy(), "#", "#", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.FUSEWOOD.getMeta())); + + // Empty Bowls + addShapedRecipe(new ItemStack(NaturaCommons.empty_bowls, 4, NaturaCommons.ghostwood_emptybowl.getItemDamage()), "# #", " # ", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.GHOSTWOOD.getMeta())); + addShapedRecipe(new ItemStack(NaturaCommons.empty_bowls, 4, NaturaCommons.bloodwood_emptybowl.getItemDamage()), "# #", " # ", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.BLOODWOOD.getMeta())); + addShapedRecipe(new ItemStack(NaturaCommons.empty_bowls, 4, NaturaCommons.darkwood_emptybowl.getItemDamage()), "# #", " # ", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.DARKWOOD.getMeta())); + addShapedRecipe(new ItemStack(NaturaCommons.empty_bowls, 4, NaturaCommons.fusewood_emptybowl.getItemDamage()), "# #", " # ", '#', new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.FUSEWOOD.getMeta())); + + // Mushroom Stew Bowls + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.ghostwood_mushroomstew.copy(), NaturaCommons.ghostwood_emptybowl.copy(), new ItemStack(Blocks.BROWN_MUSHROOM), new ItemStack(Blocks.RED_MUSHROOM))); + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.bloodwood_mushroomstew.copy(), NaturaCommons.ghostwood_emptybowl.copy(), new ItemStack(Blocks.BROWN_MUSHROOM), new ItemStack(Blocks.RED_MUSHROOM))); + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.darkwood_mushroomstew.copy(), NaturaCommons.ghostwood_emptybowl.copy(), new ItemStack(Blocks.BROWN_MUSHROOM), new ItemStack(Blocks.RED_MUSHROOM))); + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.fusewood_mushroomstew.copy(), NaturaCommons.ghostwood_emptybowl.copy(), new ItemStack(Blocks.BROWN_MUSHROOM), new ItemStack(Blocks.RED_MUSHROOM))); + + // Glowshroom Stew Bowls + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.vanilla_glowshroomstew.copy(), new ItemStack(Items.BOWL), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.GREEN.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.PURPLE.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.BLUE.getMeta()))); + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.ghostwood_glowshroomstew.copy(), NaturaCommons.ghostwood_emptybowl.copy(), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.GREEN.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.PURPLE.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.BLUE.getMeta()))); + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.bloodwood_glowshroomstew.copy(), NaturaCommons.ghostwood_emptybowl.copy(), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.GREEN.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.PURPLE.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.BLUE.getMeta()))); + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.darkwood_glowshroomstew.copy(), NaturaCommons.ghostwood_emptybowl.copy(), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.GREEN.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.PURPLE.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.BLUE.getMeta()))); + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.fusewood_glowshroomstew.copy(), NaturaCommons.ghostwood_emptybowl.copy(), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.GREEN.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.PURPLE.getMeta()), new ItemStack(netherGlowshroom, 1, BlockNetherGlowshroom.GlowshroomType.BLUE.getMeta()))); + + // Slabs addSlabRecipe(netherSlab, BlockNetherSlab.PlankType.BLOODWOOD.getMeta(), new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.BLOODWOOD.getMeta())); addSlabRecipe(netherSlab, BlockNetherSlab.PlankType.DARKWOOD.getMeta(), new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.DARKWOOD.getMeta())); addSlabRecipe(netherSlab, BlockNetherSlab.PlankType.FUSEWOOD.getMeta(), new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.FUSEWOOD.getMeta())); addSlabRecipe(netherSlab, BlockNetherSlab.PlankType.GHOSTWOOD.getMeta(), new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.GHOSTWOOD.getMeta())); - //STAIRS + // Stairs addStairRecipe(netherStairsBloodwood, new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.BLOODWOOD.getMeta())); addStairRecipe(netherStairsDarkwood, new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.DARKWOOD.getMeta())); addStairRecipe(netherStairsFusewood, new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.FUSEWOOD.getMeta())); addStairRecipe(netherStairsGhostwood, new ItemStack(netherPlanks, 1, BlockNetherPlanks.PlankType.GHOSTWOOD.getMeta())); + // Soul Sand GameRegistry.addShapelessRecipe(new ItemStack(Blocks.SOUL_SAND), netherHeatSand, netherTaintedSoil); + // Blaze Rails + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blazeRail, 16), "X X", "X#X", "X X", 'X', Items.BLAZE_ROD, '#', "stickWood")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blazeRailPowered, 6), "X X", "X#X", "XRX", 'X', Items.BLAZE_ROD, 'R', "dustRedstone", '#', new ItemStack(netherLog, 1, BlockNetherLog.LogType.FUSEWOOD.getMeta()))); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blazeRailActivator, 6), "XSX", "X#X", "XSX", 'X', Items.BLAZE_ROD, '#', Blocks.REDSTONE_TORCH, 'S', "stickWood")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blazeRailDetector, 6), "X X", "X#X", "XRX", 'X', Items.BLAZE_ROD, 'R', "dustRedstone", '#', netherPressurePlate)); + + // Netherrack Furnace + GameRegistry.addRecipe(new ItemStack(netherrackFurnace), "###", "# #", "###", '#', Blocks.NETHERRACK); + + // Respawn Obelisk + GameRegistry.addRecipe(new ItemStack(respawnObelisk), "###", "# #", "###", '#', new ItemStack(netherLog, 1, BlockNetherLog.LogType.GHOSTWOOD.getMeta())); + + // Blaze Hopper + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blazeHopper), "# #", "#C#", " # ", '#', new ItemStack(Items.BLAZE_ROD), 'C', "chestWood")); + + // Pressure Plate + GameRegistry.addRecipe(new ItemStack(netherPressurePlate), "##", '#', new ItemStack(Blocks.NETHERRACK)); + + // Button + GameRegistry.addRecipe(new ItemStack(netherButton), "#", '#', new ItemStack(Blocks.NETHERRACK)); + + // Lever + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(netherLever), "S", "#", '#', new ItemStack(Blocks.NETHERRACK), 'S', "stickWood")); } private void registerSmelting() { - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(Blocks.SOUL_SAND, 1, 0), new ItemStack(netherGlass, 1, 0), 0.3f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(netherHeatSand, 1, 0), new ItemStack(netherGlass, 1, 1), 0.3f); + FurnaceRecipes furnaceRecipes = FurnaceRecipes.instance(); + furnaceRecipes.addSmeltingRecipe(new ItemStack(Blocks.SOUL_SAND, 1, 0), new ItemStack(netherGlass, 1, 0), 0.3f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(netherHeatSand, 1, 0), new ItemStack(netherGlass, 1, 1), 0.3f); } } diff --git a/src/main/java/com/progwml6/natura/nether/NetherClientProxy.java b/src/main/java/com/progwml6/natura/nether/NetherClientProxy.java index 177e057a..87b8ac09 100644 --- a/src/main/java/com/progwml6/natura/nether/NetherClientProxy.java +++ b/src/main/java/com/progwml6/natura/nether/NetherClientProxy.java @@ -9,11 +9,18 @@ import com.progwml6.natura.common.block.BlockEnumBerryBush; import com.progwml6.natura.common.client.LeavesColorizer; import com.progwml6.natura.library.Util; +import com.progwml6.natura.library.client.state.CustomStateMap; import com.progwml6.natura.nether.block.leaves.BlockNetherLeaves; import com.progwml6.natura.nether.block.leaves.BlockNetherLeaves2; import com.progwml6.natura.nether.block.logs.BlockNetherLog; +import com.progwml6.natura.nether.block.logs.BlockNetherLog2; import com.progwml6.natura.nether.block.saplings.BlockNetherSapling; +import com.progwml6.natura.nether.block.saplings.BlockNetherSapling2; +import com.progwml6.natura.nether.block.shrooms.BlockNetherGlowshroom; +import com.progwml6.natura.nether.block.shrooms.BlockNetherLargeGlowshroom; +import net.minecraft.block.BlockDoor; +import net.minecraft.block.BlockHopper; import net.minecraft.block.BlockLeaves; import net.minecraft.block.BlockSapling; import net.minecraft.block.state.IBlockState; @@ -26,6 +33,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraftforge.client.model.ModelLoader; @@ -85,6 +93,12 @@ protected void registerModels() ModelLoader.setCustomStateMapper(NaturaNether.netherLeaves2, (new StateMap.Builder()).ignore(BlockLeaves.CHECK_DECAY, BlockLeaves.DECAYABLE).build()); ModelLoader.setCustomStateMapper(NaturaNether.netherSapling, (new StateMap.Builder()).ignore(BlockNetherSapling.STAGE, BlockSapling.TYPE).build()); + ModelLoader.setCustomStateMapper(NaturaNether.netherSapling2, (new StateMap.Builder()).ignore(BlockNetherSapling2.STAGE, BlockSapling.TYPE).build()); + + ModelLoader.setCustomStateMapper(NaturaNether.ghostwoodDoor, (new StateMap.Builder()).ignore(BlockDoor.POWERED).build()); + ModelLoader.setCustomStateMapper(NaturaNether.bloodwoodDoor, (new StateMap.Builder()).ignore(BlockDoor.POWERED).build()); + + ModelLoader.setCustomStateMapper(NaturaNether.blazeHopper, (new StateMap.Builder()).ignore(BlockHopper.ENABLED).build()); registerItemBlockMeta(NaturaNether.netherPlanks); registerItemBlockMeta(NaturaNether.netherTaintedSoil); @@ -103,6 +117,11 @@ protected void registerModels() Item heatSandItem = Item.getItemFromBlock(NaturaNether.netherHeatSand); ModelLoader.setCustomModelResourceLocation(heatSandItem, 0, new ModelResourceLocation(Util.resource("nether_heat_sand"), "normal")); + ModelLoader.setCustomStateMapper(NaturaNether.netherThornVines, new CustomStateMap("nether_thorn_vine")); + + this.registerItemModelNatura(new ItemStack(NaturaNether.netherThornVines), "nether_thorn_vine"); + + // logs Item nether_log = Item.getItemFromBlock(NaturaNether.netherLog); for (BlockNetherLog.LogType type : BlockNetherLog.LogType.values()) { @@ -112,6 +131,13 @@ protected void registerModels() ModelLoader.setCustomModelResourceLocation(nether_log, type.meta, new ModelResourceLocation(nether_log.getRegistryName(), variant)); } + Item nether_log2 = Item.getItemFromBlock(NaturaNether.netherLog2); + for (int meta = 0; meta <= 15; meta++) + { + String variant = String.format("%s=%s", BlockNetherLog2.META.getName(), Integer.valueOf(meta)); + ModelLoader.setCustomModelResourceLocation(nether_log2, meta, new ModelResourceLocation(nether_log2.getRegistryName(), variant)); + } + // leaves Item nether_leaves = Item.getItemFromBlock(NaturaNether.netherLeaves); for (BlockNetherLeaves.LeavesType type : BlockNetherLeaves.LeavesType.values()) @@ -130,13 +156,16 @@ protected void registerModels() // saplings ItemStack stack = new ItemStack(Item.getItemFromBlock(NaturaNether.netherSapling), 1, NaturaNether.netherSapling.getMetaFromState(NaturaNether.netherSapling.getDefaultState().withProperty(BlockNetherSapling.FOLIAGE, BlockNetherSapling.SaplingType.GHOSTWOOD))); this.registerItemModelNatura(stack, "nether_sapling_ghostwood"); - stack = new ItemStack(Item.getItemFromBlock(NaturaNether.netherSapling), 1, NaturaNether.netherSapling.getMetaFromState(NaturaNether.netherSapling.getDefaultState().withProperty(BlockNetherSapling.FOLIAGE, BlockNetherSapling.SaplingType.BLOODWOOD))); - this.registerItemModelNatura(stack, "nether_sapling_bloodwood"); + stack = new ItemStack(Item.getItemFromBlock(NaturaNether.netherSapling), 1, NaturaNether.netherSapling.getMetaFromState(NaturaNether.netherSapling.getDefaultState().withProperty(BlockNetherSapling.FOLIAGE, BlockNetherSapling.SaplingType.FUSEWOOD))); this.registerItemModelNatura(stack, "nether_sapling_fusewood"); + stack = new ItemStack(Item.getItemFromBlock(NaturaNether.netherSapling), 1, NaturaNether.netherSapling.getMetaFromState(NaturaNether.netherSapling.getDefaultState().withProperty(BlockNetherSapling.FOLIAGE, BlockNetherSapling.SaplingType.DARKWOOD))); this.registerItemModelNatura(stack, "nether_sapling_darkwood"); + stack = new ItemStack(Item.getItemFromBlock(NaturaNether.netherSapling2), 1, NaturaNether.netherSapling2.getMetaFromState(NaturaNether.netherSapling2.getDefaultState().withProperty(BlockNetherSapling2.FOLIAGE, BlockNetherSapling2.SaplingType.BLOODWOOD))); + this.registerItemModelNatura(stack, "nether_sapling_bloodwood"); + // Bushes Item blightberry_berrybush = Item.getItemFromBlock(NaturaNether.netherBerryBushBlightberry); for (int meta = 0; meta <= 3; meta++) @@ -165,5 +194,60 @@ protected void registerModels() String variant = String.format("%s=%s", BlockEnumBerryBush.AGE.getName(), Integer.valueOf(meta)); ModelLoader.setCustomModelResourceLocation(stingberry_berrybush, meta, new ModelResourceLocation(stingberry_berrybush.getRegistryName(), variant)); } + + // glowshrooms + ItemStack glowshroom = new ItemStack(Item.getItemFromBlock(NaturaNether.netherGlowshroom), 1, NaturaNether.netherGlowshroom.getMetaFromState(NaturaNether.netherGlowshroom.getDefaultState().withProperty(BlockNetherGlowshroom.TYPE, BlockNetherGlowshroom.GlowshroomType.GREEN))); + this.registerItemModelNatura(glowshroom, "nether_glowshroom_green"); + + glowshroom = new ItemStack(Item.getItemFromBlock(NaturaNether.netherGlowshroom), 1, NaturaNether.netherGlowshroom.getMetaFromState(NaturaNether.netherGlowshroom.getDefaultState().withProperty(BlockNetherGlowshroom.TYPE, BlockNetherGlowshroom.GlowshroomType.BLUE))); + this.registerItemModelNatura(glowshroom, "nether_glowshroom_blue"); + + glowshroom = new ItemStack(Item.getItemFromBlock(NaturaNether.netherGlowshroom), 1, NaturaNether.netherGlowshroom.getMetaFromState(NaturaNether.netherGlowshroom.getDefaultState().withProperty(BlockNetherGlowshroom.TYPE, BlockNetherGlowshroom.GlowshroomType.PURPLE))); + this.registerItemModelNatura(glowshroom, "nether_glowshroom_purple"); + + Item nether_large_green_glowshroom = Item.getItemFromBlock(NaturaNether.netherLargeGreenGlowshroom); + for (BlockNetherLargeGlowshroom.EnumType type : BlockNetherLargeGlowshroom.EnumType.values()) + { + String variant = String.format("%s=%s", BlockNetherLargeGlowshroom.VARIANT.getName(), BlockNetherLargeGlowshroom.VARIANT.getName(type)); + ModelLoader.setCustomModelResourceLocation(nether_large_green_glowshroom, type.getMeta(), new ModelResourceLocation(nether_large_green_glowshroom.getRegistryName(), variant)); + } + + Item nether_large_blue_glowshroom = Item.getItemFromBlock(NaturaNether.netherLargeBlueGlowshroom); + for (BlockNetherLargeGlowshroom.EnumType type : BlockNetherLargeGlowshroom.EnumType.values()) + { + String variant = String.format("%s=%s", BlockNetherLargeGlowshroom.VARIANT.getName(), BlockNetherLargeGlowshroom.VARIANT.getName(type)); + ModelLoader.setCustomModelResourceLocation(nether_large_blue_glowshroom, type.getMeta(), new ModelResourceLocation(nether_large_blue_glowshroom.getRegistryName(), variant)); + } + + Item nether_large_purple_glowshroom = Item.getItemFromBlock(NaturaNether.netherLargePurpleGlowshroom); + for (BlockNetherLargeGlowshroom.EnumType type : BlockNetherLargeGlowshroom.EnumType.values()) + { + String variant = String.format("%s=%s", BlockNetherLargeGlowshroom.VARIANT.getName(), BlockNetherLargeGlowshroom.VARIANT.getName(type)); + ModelLoader.setCustomModelResourceLocation(nether_large_purple_glowshroom, type.getMeta(), new ModelResourceLocation(nether_large_purple_glowshroom.getRegistryName(), variant)); + } + + stack = new ItemStack(Item.getItemFromBlock(NaturaNether.ghostwoodDoor), 1, NaturaNether.ghostwoodDoor.getMetaFromState(NaturaNether.ghostwoodDoor.getDefaultState().withProperty(BlockDoor.FACING, EnumFacing.EAST).withProperty(BlockDoor.OPEN, Boolean.valueOf(false)).withProperty(BlockDoor.HINGE, BlockDoor.EnumHingePosition.LEFT).withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER))); + this.registerItemModelNatura(stack, "nether_door_ghostwood"); + + stack = new ItemStack(Item.getItemFromBlock(NaturaNether.bloodwoodDoor), 1, NaturaNether.bloodwoodDoor.getMetaFromState(NaturaNether.bloodwoodDoor.getDefaultState().withProperty(BlockDoor.FACING, EnumFacing.EAST).withProperty(BlockDoor.OPEN, Boolean.valueOf(false)).withProperty(BlockDoor.HINGE, BlockDoor.EnumHingePosition.LEFT).withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER))); + this.registerItemModelNatura(stack, "nether_door_bloodwood"); + + registerItemModel(NaturaNether.blazeHopper); + + registerItemModel(NaturaNether.netherLever); + + registerItemModel(NaturaNether.netherButton); + + registerItemModel(NaturaNether.netherPressurePlate); + + registerItemModel(NaturaNether.blazeRail); + registerItemModel(NaturaNether.blazeRailPowered); + registerItemModel(NaturaNether.blazeRailActivator); + registerItemModel(NaturaNether.blazeRailDetector); + + registerItemModel(NaturaNether.netherrackFurnace); + registerItemModel(NaturaNether.litNetherrackFurnace); + + NaturaNether.netherDoors.registerItemModels(); } } diff --git a/src/main/java/com/progwml6/natura/nether/block/button/BlockNetherButton.java b/src/main/java/com/progwml6/natura/nether/block/button/BlockNetherButton.java new file mode 100644 index 00000000..eb559fe4 --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/button/BlockNetherButton.java @@ -0,0 +1,36 @@ +package com.progwml6.natura.nether.block.button; + +import javax.annotation.Nullable; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockButton; +import net.minecraft.block.SoundType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.SoundEvents; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockNetherButton extends BlockButton +{ + public BlockNetherButton() + { + super(false); + this.setHardness(0.5F); + this.setSoundType(SoundType.WOOD); + this.setCreativeTab(NaturaRegistry.tabWorld); + } + + @Override + protected void playClickSound(@Nullable EntityPlayer player, World worldIn, BlockPos pos) + { + worldIn.playSound(player, pos, SoundEvents.BLOCK_WOOD_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.3F, 0.6F); + } + + @Override + protected void playReleaseSound(World worldIn, BlockPos pos) + { + worldIn.playSound((EntityPlayer) null, pos, SoundEvents.BLOCK_WOOD_BUTTON_CLICK_OFF, SoundCategory.BLOCKS, 0.3F, 0.5F); + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/furnace/BlockNetherrackFurnace.java b/src/main/java/com/progwml6/natura/nether/block/furnace/BlockNetherrackFurnace.java new file mode 100644 index 00000000..a7fa06fa --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/furnace/BlockNetherrackFurnace.java @@ -0,0 +1,333 @@ +package com.progwml6.natura.nether.block.furnace; + +import java.util.Random; + +import javax.annotation.Nullable; + +import com.progwml6.natura.Natura; +import com.progwml6.natura.common.GuiIDs; +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.furnace.tile.TileEntityNetherrackFurnace; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.BlockHorizontal; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyDirection; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.SoundEvents; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumBlockRenderType; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class BlockNetherrackFurnace extends BlockContainer +{ + public static final PropertyDirection FACING = BlockHorizontal.FACING; + + private final boolean isBurning; + + private static boolean keepInventory; + + public BlockNetherrackFurnace(boolean isBurning) + { + super(Material.ROCK); + + this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); + this.isBurning = isBurning; + this.setHardness(3.5F); + + if (!this.isBurning) + { + this.setCreativeTab(NaturaRegistry.tabWorld); + } + } + + /** + * Get the Item that this Block should drop when harvested. + */ + @Override + @Nullable + public Item getItemDropped(IBlockState state, Random rand, int fortune) + { + return Item.getItemFromBlock(NaturaNether.netherrackFurnace); + } + + /** + * Called after the block is set in the Chunk data, but before the Tile Entity is set + */ + @Override + public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) + { + this.setDefaultFacing(worldIn, pos, state); + } + + private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state) + { + if (!worldIn.isRemote) + { + IBlockState iblockstate = worldIn.getBlockState(pos.north()); + IBlockState iblockstate1 = worldIn.getBlockState(pos.south()); + IBlockState iblockstate2 = worldIn.getBlockState(pos.west()); + IBlockState iblockstate3 = worldIn.getBlockState(pos.east()); + EnumFacing enumfacing = state.getValue(FACING); + + if (enumfacing == EnumFacing.NORTH && iblockstate.isFullBlock() && !iblockstate1.isFullBlock()) + { + enumfacing = EnumFacing.SOUTH; + } + else if (enumfacing == EnumFacing.SOUTH && iblockstate1.isFullBlock() && !iblockstate.isFullBlock()) + { + enumfacing = EnumFacing.NORTH; + } + else if (enumfacing == EnumFacing.WEST && iblockstate2.isFullBlock() && !iblockstate3.isFullBlock()) + { + enumfacing = EnumFacing.EAST; + } + else if (enumfacing == EnumFacing.EAST && iblockstate3.isFullBlock() && !iblockstate2.isFullBlock()) + { + enumfacing = EnumFacing.WEST; + } + + worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2); + } + } + + @Override + @SideOnly(Side.CLIENT) + @SuppressWarnings("incomplete-switch") + public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) + { + if (this.isBurning) + { + EnumFacing enumfacing = stateIn.getValue(FACING); + double d0 = pos.getX() + 0.5D; + double d1 = pos.getY() + rand.nextDouble() * 6.0D / 16.0D; + double d2 = pos.getZ() + 0.5D; + double d4 = rand.nextDouble() * 0.6D - 0.3D; + + if (rand.nextDouble() < 0.1D) + { + worldIn.playSound(pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false); + } + + switch (enumfacing) + { + case WEST: + worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]); + worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]); + break; + case EAST: + worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]); + worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]); + break; + case NORTH: + worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - 0.52D, 0.0D, 0.0D, 0.0D, new int[0]); + worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - 0.52D, 0.0D, 0.0D, 0.0D, new int[0]); + break; + case SOUTH: + worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + 0.52D, 0.0D, 0.0D, 0.0D, new int[0]); + worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + 0.52D, 0.0D, 0.0D, 0.0D, new int[0]); + } + } + } + + @Override + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) + { + if (worldIn.isRemote) + { + return true; + } + else + { + TileEntity tileentity = worldIn.getTileEntity(pos); + + if (tileentity instanceof TileEntityNetherrackFurnace) + { + playerIn.openGui(Natura.instance, GuiIDs.FURNACE, worldIn, pos.getX(), pos.getY(), pos.getZ()); + } + + return true; + } + } + + public static void setState(boolean active, World worldIn, BlockPos pos) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + TileEntity tileentity = worldIn.getTileEntity(pos); + keepInventory = true; + + if (active) + { + worldIn.setBlockState(pos, NaturaNether.litNetherrackFurnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); + worldIn.setBlockState(pos, NaturaNether.litNetherrackFurnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); + } + else + { + worldIn.setBlockState(pos, NaturaNether.netherrackFurnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); + worldIn.setBlockState(pos, NaturaNether.netherrackFurnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); + } + + keepInventory = false; + + if (tileentity != null) + { + tileentity.validate(); + worldIn.setTileEntity(pos, tileentity); + } + } + + /** + * Returns a new instance of a block's tile entity class. Called on placing the block. + */ + @Override + public TileEntity createNewTileEntity(World worldIn, int meta) + { + return new TileEntityNetherrackFurnace(); + } + + /** + * Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the + * IBlockstate + */ + @Override + public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) + { + return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); + } + + /** + * Called by ItemBlocks after a block is set in the world, to allow post-place logic + */ + @Override + public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) + { + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2); + + if (stack.hasDisplayName()) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + + if (tileentity instanceof TileEntityNetherrackFurnace) + { + ((TileEntityNetherrackFurnace) tileentity).setCustomInventoryName(stack.getDisplayName()); + } + } + } + + /** + * Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated + */ + @Override + public void breakBlock(World worldIn, BlockPos pos, IBlockState state) + { + if (!keepInventory) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + + if (tileentity instanceof TileEntityNetherrackFurnace) + { + InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityNetherrackFurnace) tileentity); + worldIn.updateComparatorOutputLevel(pos, this); + } + } + + super.breakBlock(worldIn, pos, state); + } + + @Override + public boolean hasComparatorInputOverride(IBlockState state) + { + return true; + } + + @Override + public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos) + { + return Container.calcRedstone(worldIn.getTileEntity(pos)); + } + + @Override + public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) + { + return new ItemStack(NaturaNether.netherrackFurnace); + } + + /** + * The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only, + * LIQUID for vanilla liquids, INVISIBLE to skip all rendering + */ + @Override + public EnumBlockRenderType getRenderType(IBlockState state) + { + return EnumBlockRenderType.MODEL; + } + + /** + * Convert the given metadata into a BlockState for this Block + */ + @Override + public IBlockState getStateFromMeta(int meta) + { + EnumFacing enumfacing = EnumFacing.getFront(meta); + + if (enumfacing.getAxis() == EnumFacing.Axis.Y) + { + enumfacing = EnumFacing.NORTH; + } + + return this.getDefaultState().withProperty(FACING, enumfacing); + } + + /** + * Convert the BlockState into the correct metadata value + */ + @Override + public int getMetaFromState(IBlockState state) + { + return state.getValue(FACING).getIndex(); + } + + /** + * Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed + * blockstate. + */ + @Override + public IBlockState withRotation(IBlockState state, Rotation rot) + { + return state.withProperty(FACING, rot.rotate(state.getValue(FACING))); + } + + /** + * Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed + * blockstate. + */ + @Override + public IBlockState withMirror(IBlockState state, Mirror mirrorIn) + { + return state.withRotation(mirrorIn.toRotation(state.getValue(FACING))); + } + + @Override + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, new IProperty[] { FACING }); + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/furnace/tile/TileEntityNetherrackFurnace.java b/src/main/java/com/progwml6/natura/nether/block/furnace/tile/TileEntityNetherrackFurnace.java new file mode 100644 index 00000000..d16e5697 --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/furnace/tile/TileEntityNetherrackFurnace.java @@ -0,0 +1,535 @@ +package com.progwml6.natura.nether.block.furnace.tile; + +import com.progwml6.natura.common.gui.common.FurnaceContainer; +import com.progwml6.natura.nether.block.furnace.BlockNetherrackFurnace; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.inventory.ItemStackHelper; +import net.minecraft.inventory.SlotFurnaceFuel; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBoat; +import net.minecraft.item.ItemDoor; +import net.minecraft.item.ItemHoe; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.item.ItemTool; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntityLockable; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.ITickable; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.MathHelper; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class TileEntityNetherrackFurnace extends TileEntityLockable implements ITickable, ISidedInventory +{ + private static final int[] SLOTS_TOP = new int[] { 0 }; + + private static final int[] SLOTS_BOTTOM = new int[] { 2, 1 }; + + private static final int[] SLOTS_SIDES = new int[] { 1 }; + + /** The ItemStacks that hold the items currently being used in the furnace */ + private NonNullList furnaceItemStacks = NonNullList. withSize(3, ItemStack.EMPTY); + + /** The number of ticks that the furnace will keep burning */ + private int furnaceBurnTime; + + /** The number of ticks that a fresh copy of the currently-burning item would keep the furnace burning for */ + private int currentItemBurnTime; + + private int cookTime; + + private int totalCookTime; + + private String furnaceCustomName; + + /** + * Returns the number of slots in the inventory. + */ + @Override + public int getSizeInventory() + { + return this.furnaceItemStacks.size(); + } + + @Override + public boolean isEmpty() + { + for (ItemStack itemstack : this.furnaceItemStacks) + { + if (!itemstack.isEmpty()) + { + return false; + } + } + + return true; + } + + /** + * Returns the stack in the given slot. + */ + @Override + public ItemStack getStackInSlot(int index) + { + return this.furnaceItemStacks.get(index); + } + + /** + * Removes up to a specified number of items from an inventory slot and returns them in a new stack. + */ + @Override + public ItemStack decrStackSize(int index, int count) + { + return ItemStackHelper.getAndSplit(this.furnaceItemStacks, index, count); + } + + /** + * Removes a stack from the given slot and returns it. + */ + @Override + public ItemStack removeStackFromSlot(int index) + { + return ItemStackHelper.getAndRemove(this.furnaceItemStacks, index); + } + + /** + * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). + */ + @Override + public void setInventorySlotContents(int index, ItemStack stack) + { + ItemStack itemstack = this.furnaceItemStacks.get(index); + boolean flag = !stack.isEmpty() && stack.isItemEqual(itemstack) && ItemStack.areItemStackTagsEqual(stack, itemstack); + this.furnaceItemStacks.set(index, stack); + + if (stack.getCount() > this.getInventoryStackLimit()) + { + stack.setCount(this.getInventoryStackLimit()); + } + + if (index == 0 && !flag) + { + this.totalCookTime = this.getCookTime(stack); + this.cookTime = 0; + this.markDirty(); + } + } + + /** + * Get the name of this object. For players this returns their username + */ + @Override + public String getName() + { + return this.hasCustomName() ? this.furnaceCustomName : "container.furnace"; + } + + /** + * Returns true if this thing is named + */ + @Override + public boolean hasCustomName() + { + return this.furnaceCustomName != null && !this.furnaceCustomName.isEmpty(); + } + + public void setCustomInventoryName(String p_145951_1_) + { + this.furnaceCustomName = p_145951_1_; + } + + @Override + public void readFromNBT(NBTTagCompound compound) + { + super.readFromNBT(compound); + this.furnaceItemStacks = NonNullList. withSize(this.getSizeInventory(), ItemStack.EMPTY); + ItemStackHelper.loadAllItems(compound, this.furnaceItemStacks); + this.furnaceBurnTime = compound.getInteger("BurnTime"); + this.cookTime = compound.getInteger("CookTime"); + this.totalCookTime = compound.getInteger("CookTimeTotal"); + this.currentItemBurnTime = getItemBurnTime(this.furnaceItemStacks.get(1)); + + if (compound.hasKey("CustomName", 8)) + { + this.furnaceCustomName = compound.getString("CustomName"); + } + } + + @Override + public NBTTagCompound writeToNBT(NBTTagCompound compound) + { + super.writeToNBT(compound); + compound.setInteger("BurnTime", (short) this.furnaceBurnTime); + compound.setInteger("CookTime", (short) this.cookTime); + compound.setInteger("CookTimeTotal", (short) this.totalCookTime); + ItemStackHelper.saveAllItems(compound, this.furnaceItemStacks); + + if (this.hasCustomName()) + { + compound.setString("CustomName", this.furnaceCustomName); + } + + return compound; + } + + /** + * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. + */ + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * Furnace isBurning + */ + public boolean isBurning() + { + return this.furnaceBurnTime > 0; + } + + @SideOnly(Side.CLIENT) + public static boolean isBurning(IInventory inventory) + { + return inventory.getField(0) > 0; + } + + /** + * Like the old updateEntity(), except more generic. + */ + @Override + public void update() + { + boolean flag = this.isBurning(); + boolean flag1 = false; + + if (this.isBurning()) + { + --this.furnaceBurnTime; + } + + if (!this.world.isRemote) + { + ItemStack itemstack = this.furnaceItemStacks.get(1); + + if (this.isBurning() || !itemstack.isEmpty() && !this.furnaceItemStacks.get(0).isEmpty()) + { + if (!this.isBurning() && this.canSmelt()) + { + this.furnaceBurnTime = getItemBurnTime(itemstack); + this.currentItemBurnTime = this.furnaceBurnTime; + + if (this.isBurning()) + { + flag1 = true; + + if (!itemstack.isEmpty()) + { + Item item = itemstack.getItem(); + itemstack.shrink(1); + + if (itemstack.isEmpty()) + { + ItemStack item1 = item.getContainerItem(itemstack); + this.furnaceItemStacks.set(1, item1); + } + } + } + } + + if (this.isBurning() && this.canSmelt()) + { + ++this.cookTime; + + if (this.cookTime == this.totalCookTime) + { + this.cookTime = 0; + this.totalCookTime = this.getCookTime(this.furnaceItemStacks.get(0)); + this.smeltItem(); + flag1 = true; + } + } + else + { + this.cookTime = 0; + } + } + else if (!this.isBurning() && this.cookTime > 0) + { + this.cookTime = MathHelper.clamp(this.cookTime - 2, 0, this.totalCookTime); + } + + if (flag != this.isBurning()) + { + flag1 = true; + BlockNetherrackFurnace.setState(this.isBurning(), this.world, this.pos); + } + } + + if (flag1) + { + this.markDirty(); + } + } + + public int getCookTime(ItemStack stack) + { + return 200; + } + + /** + * Returns true if the furnace can smelt an item, i.e. has a source item, destination stack isn't full, etc. + */ + private boolean canSmelt() + { + if (this.furnaceItemStacks.get(0).isEmpty()) + { + return false; + } + else + { + ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.furnaceItemStacks.get(0)); + + if (itemstack.isEmpty()) + { + return false; + } + else + { + ItemStack itemstack1 = this.furnaceItemStacks.get(2); + if (itemstack1.isEmpty()) + return true; + if (!itemstack1.isItemEqual(itemstack)) + return false; + int result = itemstack1.getCount() + itemstack.getCount(); + return result <= getInventoryStackLimit() && result <= itemstack1.getMaxStackSize(); // Forge fix: make furnace respect stack sizes in furnace recipes + } + } + } + + /** + * Turn one item from the furnace source stack into the appropriate smelted item in the furnace result stack + */ + public void smeltItem() + { + if (this.canSmelt()) + { + ItemStack itemstack = this.furnaceItemStacks.get(0); + ItemStack itemstack1 = FurnaceRecipes.instance().getSmeltingResult(itemstack); + ItemStack itemstack2 = this.furnaceItemStacks.get(2); + + if (itemstack2.isEmpty()) + { + this.furnaceItemStacks.set(2, itemstack1.copy()); + } + else if (itemstack2.getItem() == itemstack1.getItem()) + { + itemstack2.grow(itemstack1.getCount()); + } + + if (itemstack.getItem() == Item.getItemFromBlock(Blocks.SPONGE) && itemstack.getMetadata() == 1 && !this.furnaceItemStacks.get(1).isEmpty() && this.furnaceItemStacks.get(1).getItem() == Items.BUCKET) + { + this.furnaceItemStacks.set(1, new ItemStack(Items.WATER_BUCKET)); + } + + itemstack.shrink(1); + } + } + + /** + * Returns the number of ticks that the supplied fuel item will keep the furnace burning, or 0 if the item isn't + * fuel + */ + public static int getItemBurnTime(ItemStack stack) + { + if (stack.isEmpty()) + { + return 0; + } + else + { + Item item = stack.getItem(); + if (!item.getRegistryName().getResourceDomain().equals("minecraft")) + { + int burnTime = net.minecraftforge.fml.common.registry.GameRegistry.getFuelValue(stack); + if (burnTime != 0) + return burnTime; + } + return item == Item.getItemFromBlock(Blocks.WOODEN_SLAB) ? 150 : (item == Item.getItemFromBlock(Blocks.WOOL) ? 100 : (item == Item.getItemFromBlock(Blocks.CARPET) ? 67 : (item == Item.getItemFromBlock(Blocks.LADDER) ? 300 : (item == Item.getItemFromBlock(Blocks.WOODEN_BUTTON) ? 100 : (Block.getBlockFromItem(item).getDefaultState().getMaterial() == Material.WOOD ? 300 : (item == Item.getItemFromBlock(Blocks.COAL_BLOCK) ? 16000 : (item instanceof ItemTool && "WOOD".equals(((ItemTool) item).getToolMaterialName()) ? 200 : (item instanceof ItemSword && "WOOD".equals(((ItemSword) item).getToolMaterialName()) ? 200 : (item instanceof ItemHoe && "WOOD".equals(((ItemHoe) item).getMaterialName()) ? 200 : (item == Items.STICK ? 100 : (item != Items.BOW && item != Items.FISHING_ROD ? (item == Items.SIGN ? 200 : (item == Items.COAL ? 1600 : (item == Items.LAVA_BUCKET ? 20000 : (item != Item.getItemFromBlock(Blocks.SAPLING) && item != Items.BOWL ? (item == Items.BLAZE_ROD ? 2400 : (item instanceof ItemDoor && item != Items.IRON_DOOR ? 200 : (item instanceof ItemBoat ? 400 : 0))) : 100)))) : 300))))))))))); + } + } + + public static boolean isItemFuel(ItemStack stack) + { + return getItemBurnTime(stack) > 0; + } + + /** + * Don't rename this method to canInteractWith due to conflicts with Container + */ + @Override + public boolean isUsableByPlayer(EntityPlayer player) + { + return this.world.getTileEntity(this.pos) != this ? false : player.getDistanceSq(this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D) <= 64.0D; + } + + @Override + public void openInventory(EntityPlayer player) + { + } + + @Override + public void closeInventory(EntityPlayer player) + { + } + + /** + * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. For + * guis use Slot.isItemValid + */ + @Override + public boolean isItemValidForSlot(int index, ItemStack stack) + { + if (index == 2) + { + return false; + } + else if (index != 1) + { + return true; + } + else + { + ItemStack itemstack = this.furnaceItemStacks.get(1); + return isItemFuel(stack) || SlotFurnaceFuel.isBucket(stack) && itemstack.getItem() != Items.BUCKET; + } + } + + @Override + public int[] getSlotsForFace(EnumFacing side) + { + return side == EnumFacing.DOWN ? SLOTS_BOTTOM : (side == EnumFacing.UP ? SLOTS_TOP : SLOTS_SIDES); + } + + /** + * Returns true if automation can insert the given item in the given slot from the given side. + */ + @Override + public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) + { + return this.isItemValidForSlot(index, itemStackIn); + } + + /** + * Returns true if automation can extract the given item in the given slot from the given side. + */ + @Override + public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) + { + if (direction == EnumFacing.DOWN && index == 1) + { + Item item = stack.getItem(); + + if (item != Items.WATER_BUCKET && item != Items.BUCKET) + { + return false; + } + } + + return true; + } + + @Override + public String getGuiID() + { + return "natura:netherrack_furnace"; + } + + @Override + public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) + { + return new FurnaceContainer(playerInventory, this); + } + + @Override + public int getField(int id) + { + switch (id) + { + case 0: + return this.furnaceBurnTime; + case 1: + return this.currentItemBurnTime; + case 2: + return this.cookTime; + case 3: + return this.totalCookTime; + default: + return 0; + } + } + + @Override + public void setField(int id, int value) + { + switch (id) + { + case 0: + this.furnaceBurnTime = value; + break; + case 1: + this.currentItemBurnTime = value; + break; + case 2: + this.cookTime = value; + break; + case 3: + this.totalCookTime = value; + } + } + + @Override + public int getFieldCount() + { + return 4; + } + + @Override + public void clear() + { + this.furnaceItemStacks.clear(); + } + + net.minecraftforge.items.IItemHandler handlerTop = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.UP); + + net.minecraftforge.items.IItemHandler handlerBottom = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.DOWN); + + net.minecraftforge.items.IItemHandler handlerSide = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.WEST); + + @SuppressWarnings("unchecked") + @Override + public T getCapability(net.minecraftforge.common.capabilities.Capability capability, @javax.annotation.Nullable net.minecraft.util.EnumFacing facing) + { + if (facing != null && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) + if (facing == EnumFacing.DOWN) + return (T) handlerBottom; + else if (facing == EnumFacing.UP) + return (T) handlerTop; + else + return (T) handlerSide; + return super.getCapability(capability, facing); + } +} diff --git a/src/main/java/com/progwml6/natura/shared/block/hopper/BlockBlazeHopper.java b/src/main/java/com/progwml6/natura/nether/block/hopper/BlockBlazeHopper.java similarity index 77% rename from src/main/java/com/progwml6/natura/shared/block/hopper/BlockBlazeHopper.java rename to src/main/java/com/progwml6/natura/nether/block/hopper/BlockBlazeHopper.java index 7839a71a..051cd0c9 100644 --- a/src/main/java/com/progwml6/natura/shared/block/hopper/BlockBlazeHopper.java +++ b/src/main/java/com/progwml6/natura/nether/block/hopper/BlockBlazeHopper.java @@ -1,4 +1,4 @@ -package com.progwml6.natura.shared.block.hopper; +package com.progwml6.natura.nether.block.hopper; import com.progwml6.natura.library.NaturaRegistry; @@ -10,7 +10,7 @@ public class BlockBlazeHopper extends BlockHopper public BlockBlazeHopper() { super(); - this.setCreativeTab(NaturaRegistry.tabGeneral); + this.setCreativeTab(NaturaRegistry.tabWorld); this.setHardness(3.0F); this.setResistance(8.0F); this.setSoundType(SoundType.METAL); diff --git a/src/main/java/com/progwml6/natura/nether/block/leaves/BlockNetherLeaves2.java b/src/main/java/com/progwml6/natura/nether/block/leaves/BlockNetherLeaves2.java index 64f67a3e..e254ec66 100644 --- a/src/main/java/com/progwml6/natura/nether/block/leaves/BlockNetherLeaves2.java +++ b/src/main/java/com/progwml6/natura/nether/block/leaves/BlockNetherLeaves2.java @@ -16,6 +16,7 @@ import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -24,6 +25,7 @@ import net.minecraft.util.IStringSerializable; import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -102,6 +104,12 @@ public int damageDropped(IBlockState state) return 3; } + @Override + public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) + { + return new ItemStack(Item.getItemFromBlock(this), 1, (state.getValue(TYPE)).ordinal() & 3); + } + // item dropped on silktouching @Override protected ItemStack getSilkTouchDrop(@Nonnull IBlockState state) diff --git a/src/main/java/com/progwml6/natura/nether/block/lever/BlockNetherLever.java b/src/main/java/com/progwml6/natura/nether/block/lever/BlockNetherLever.java new file mode 100644 index 00000000..0eff3c6e --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/lever/BlockNetherLever.java @@ -0,0 +1,17 @@ +package com.progwml6.natura.nether.block.lever; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockLever; +import net.minecraft.block.SoundType; + +public class BlockNetherLever extends BlockLever +{ + public BlockNetherLever() + { + super(); + this.setHardness(0.5F); + this.setSoundType(SoundType.WOOD); + this.setCreativeTab(NaturaRegistry.tabWorld); + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/logs/BlockNetherLog2.java b/src/main/java/com/progwml6/natura/nether/block/logs/BlockNetherLog2.java new file mode 100644 index 00000000..b2baf0e6 --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/logs/BlockNetherLog2.java @@ -0,0 +1,178 @@ +package com.progwml6.natura.nether.block.logs; + +import javax.annotation.Nonnull; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +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.EnumHand; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockNetherLog2 extends Block +{ + public static final PropertyInteger META = PropertyInteger.create("meta", 0, 15); + + public BlockNetherLog2() + { + super(Material.WOOD); + + this.setHardness(8.0F); + this.setSoundType(SoundType.METAL); + this.setCreativeTab(NaturaRegistry.tabWorld); + + this.setDefaultState(this.blockState.getBaseState().withProperty(META, Integer.valueOf(0))); + } + + @Override + public boolean isReplaceable(IBlockAccess worldIn, BlockPos pos) + { + return false; + } + + @Override + public void breakBlock(World worldIn, BlockPos pos, IBlockState state) + { + if (worldIn.isAreaLoaded(pos.add(-5, -5, -5), pos.add(5, 5, 5))) + { + for (BlockPos blockpos : BlockPos.getAllInBox(pos.add(-4, -4, -4), pos.add(4, 4, 4))) + { + IBlockState iblockstate = worldIn.getBlockState(blockpos); + + if (iblockstate.getBlock().isLeaves(iblockstate, worldIn, blockpos)) + { + iblockstate.getBlock().beginLeavesDecay(iblockstate, worldIn, blockpos); + } + } + } + } + + /** + * Convert the given metadata into a BlockState for this Block + */ + @Override + public IBlockState getStateFromMeta(int meta) + { + return this.getDefaultState().withProperty(META, Integer.valueOf(meta)); + } + + /** + * Convert the BlockState into the correct metadata value + */ + @Override + public int getMetaFromState(IBlockState state) + { + return state.getValue(META).intValue(); + } + + @Override + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, new IProperty[] { META }); + } + + @Override + protected ItemStack getSilkTouchDrop(IBlockState state) + { + return new ItemStack(Item.getItemFromBlock(this), 1, state.getValue(META).intValue() & 3); + } + + /** + * Gets the metadata of the item this Block can drop. This method is called when the block gets destroyed. It returns the metadata of the dropped item based on the old metadata + * of the block. + */ + @Override + public int damageDropped(IBlockState state) + { + int meta = state.getValue(META).intValue(); + + if (meta < 12) + { + return 0; + } + else if (meta == 15) + { + return 15; + } + + return 12; + } + + @Override + public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) + { + if (meta >= 12) + { + return this.getStateFromMeta(meta); + } + + int metadata = meta & 3; + byte add = 0; + + switch (facing) + { + case DOWN: + case UP: + add = 0; + if (hitX > 0.5f) + { + add += 1; + } + if (hitZ > 0.5f) + { + add += 2; + } + break; + case NORTH: + case SOUTH: + add = 8; + if (hitX > 0.5f) + { + add += 1; + } + if (hitZ < 0.5f) + { + add += 2; + } + break; + case WEST: + case EAST: + add = 4; + if (hitX < 0.5f) + { + add += 1; + } + if (hitZ < 0.5f) + { + add += 2; + } + } + + return this.getStateFromMeta(metadata | add); + } + + @Override + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) + { + list.add(new ItemStack(this, 1, 0)); + list.add(new ItemStack(this, 1, 15)); + } + + //@formatter:off + @Override public boolean canSustainLeaves(IBlockState state, net.minecraft.world.IBlockAccess world, BlockPos pos){ return true; } + @Override public boolean isWood(net.minecraft.world.IBlockAccess world, BlockPos pos){ return true; } + //@formatter:on +} diff --git a/src/main/java/com/progwml6/natura/nether/block/pressureplate/BlockNetherPressurePlate.java b/src/main/java/com/progwml6/natura/nether/block/pressureplate/BlockNetherPressurePlate.java new file mode 100644 index 00000000..7aa3505f --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/pressureplate/BlockNetherPressurePlate.java @@ -0,0 +1,18 @@ +package com.progwml6.natura.nether.block.pressureplate; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockPressurePlate; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; + +public class BlockNetherPressurePlate extends BlockPressurePlate +{ + public BlockNetherPressurePlate() + { + super(Material.ROCK, Sensitivity.MOBS); + this.setHardness(0.5F); + this.setSoundType(SoundType.STONE); + this.setCreativeTab(NaturaRegistry.tabWorld); + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/rail/BlockBlazeRail.java b/src/main/java/com/progwml6/natura/nether/block/rail/BlockBlazeRail.java new file mode 100644 index 00000000..e6e9e4a6 --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/rail/BlockBlazeRail.java @@ -0,0 +1,26 @@ +package com.progwml6.natura.nether.block.rail; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockRail; +import net.minecraft.block.SoundType; +import net.minecraft.entity.item.EntityMinecart; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockBlazeRail extends BlockRail +{ + public BlockBlazeRail() + { + super(); + this.setHardness(0.7F); + this.setSoundType(SoundType.METAL); + this.setCreativeTab(NaturaRegistry.tabWorld); + } + + @Override + public float getRailMaxSpeed(World world, EntityMinecart cart, BlockPos pos) + { + return 0.65F; + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/rail/BlockBlazeRailDetector.java b/src/main/java/com/progwml6/natura/nether/block/rail/BlockBlazeRailDetector.java new file mode 100644 index 00000000..08f4e656 --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/rail/BlockBlazeRailDetector.java @@ -0,0 +1,26 @@ +package com.progwml6.natura.nether.block.rail; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockRailDetector; +import net.minecraft.block.SoundType; +import net.minecraft.entity.item.EntityMinecart; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockBlazeRailDetector extends BlockRailDetector +{ + public BlockBlazeRailDetector() + { + super(); + this.setHardness(0.7F); + this.setSoundType(SoundType.METAL); + this.setCreativeTab(NaturaRegistry.tabWorld); + } + + @Override + public float getRailMaxSpeed(World world, EntityMinecart cart, BlockPos pos) + { + return 0.65F; + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/rail/BlockBlazeRailPowered.java b/src/main/java/com/progwml6/natura/nether/block/rail/BlockBlazeRailPowered.java new file mode 100644 index 00000000..558e95ae --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/rail/BlockBlazeRailPowered.java @@ -0,0 +1,107 @@ +package com.progwml6.natura.nether.block.rail; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockRailBase; +import net.minecraft.block.BlockRailPowered; +import net.minecraft.block.SoundType; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.item.EntityMinecart; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockBlazeRailPowered extends BlockRailPowered +{ + final boolean isActivatorRail; + + public BlockBlazeRailPowered(boolean isActivatorRail) + { + super(); + this.isActivatorRail = isActivatorRail; + this.setHardness(0.7F); + this.setSoundType(SoundType.METAL); + this.setCreativeTab(NaturaRegistry.tabWorld); + } + + @Override + public float getRailMaxSpeed(World world, EntityMinecart cart, BlockPos pos) + { + return 0.65F; + } + + @Override + public void onMinecartPass(World world, EntityMinecart cart, BlockPos pos) + { + IBlockState state = world.getBlockState(pos); + + BlockRailBase blockrailbase = (BlockRailBase) state.getBlock(); + + EnumRailDirection enumraildirection = blockrailbase.getRailDirection(world, pos, state, cart); + + if (state.getValue(BlockRailPowered.POWERED)) + { + if (this.isActivatorRail) + { + + } + else + { + // Start the cart rolling + if (enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST) + { + double speed = 0f; + + if (world.getBlockState(pos.west()).isNormalCube()) + { + speed -= 0.2f; + } + else if (world.getBlockState(pos.east()).isNormalCube()) + { + speed += 0.2f; + } + + cart.motionZ += speed; + } + else if (enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH) + { + double speed = 0f; + + if (world.getBlockState(pos.north()).isNormalCube()) + { + speed += 0.2f; + } + else if (world.getBlockState(pos.south()).isNormalCube()) + { + speed -= 0.2f; + } + + cart.motionX += speed; + } + + // Then push it along + if (Math.abs(cart.motionX) < 0.2) + { + cart.motionX *= 1.2; + } + else + { + cart.motionX *= 1.05; + } + + if (Math.abs(cart.motionZ) < 0.2) + { + cart.motionZ *= 1.2; + } + else + { + cart.motionZ *= 1.05; + } + } + } + else if (!this.isActivatorRail) + { + cart.motionX *= 0.5; + cart.motionZ *= 0.5; + } + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/sand/BlockHeatSand.java b/src/main/java/com/progwml6/natura/nether/block/sand/BlockHeatSand.java index e3eb0061..36f7fbbd 100644 --- a/src/main/java/com/progwml6/natura/nether/block/sand/BlockHeatSand.java +++ b/src/main/java/com/progwml6/natura/nether/block/sand/BlockHeatSand.java @@ -46,14 +46,14 @@ public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState s { ItemStack stack = ((EntityPlayer) entityIn).inventory.getStackInSlot(36); - if (stack == ItemStack.EMPTY) + if (stack.isEmpty()) { - entityIn.attackEntityFrom(DamageSource.inFire, 1); + entityIn.attackEntityFrom(DamageSource.IN_FIRE, 1); } } else if (entityIn instanceof EntityLiving && !entityIn.isImmuneToFire()) { - entityIn.attackEntityFrom(DamageSource.inFire, 1); + entityIn.attackEntityFrom(DamageSource.IN_FIRE, 1); } } } diff --git a/src/main/java/com/progwml6/natura/nether/block/saplings/BlockNetherSapling.java b/src/main/java/com/progwml6/natura/nether/block/saplings/BlockNetherSapling.java index e703ecf6..4e63ef99 100644 --- a/src/main/java/com/progwml6/natura/nether/block/saplings/BlockNetherSapling.java +++ b/src/main/java/com/progwml6/natura/nether/block/saplings/BlockNetherSapling.java @@ -50,7 +50,7 @@ public BlockNetherSapling() } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, @Nonnull NonNullList list) + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { for (SaplingType type : SaplingType.values()) { @@ -115,17 +115,6 @@ public boolean canPlaceBlockAt(World worldIn, BlockPos pos) return true; } } - - IBlockState ceilingBlockState = worldIn.getBlockState(pos.up()); - Block netherCeiling = ceilingBlockState.getBlock(); - - if (netherCeiling != null) - { - if (this.canGrowOnBlock(netherCeiling) || netherCeiling.canSustainPlant(ceilingBlockState, worldIn, pos.up(), EnumFacing.DOWN, this)) - { - return true; - } - } } return false; } @@ -135,16 +124,6 @@ public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state) { switch (state.getValue(FOLIAGE)) { - case BLOODWOOD: - IBlockState ceilingBlockState = worldIn.getBlockState(pos.up()); - Block netherCeiling = ceilingBlockState.getBlock(); - - if (netherCeiling == null) - { - return false; - } - - return this.canGrowOnBlock(netherCeiling) || netherCeiling.canSustainPlant(ceilingBlockState, worldIn, pos.up(), EnumFacing.DOWN, this); case DARKWOOD: case FUSEWOOD: case GHOSTWOOD: @@ -207,13 +186,11 @@ public void generateTree(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull switch (state.getValue(FOLIAGE)) { - case BLOODWOOD: - break; case DARKWOOD: log = NaturaNether.netherLog.getDefaultState().withProperty(BlockNetherLog.TYPE, BlockNetherLog.LogType.DARKWOOD); - leaves = NaturaNether.netherLeaves2.getDefaultState().withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD); flowering = NaturaNether.netherLeaves2.getDefaultState().withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD_FLOWERING); fruiting = NaturaNether.netherLeaves2.getDefaultState().withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD_FRUIT); + leaves = NaturaNether.netherLeaves2.getDefaultState().withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD); gen = new DarkwoodTreeGenerator(3, log, leaves, flowering, fruiting); @@ -222,14 +199,14 @@ public void generateTree(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull log = NaturaNether.netherLog.getDefaultState().withProperty(BlockNetherLog.TYPE, BlockNetherLog.LogType.FUSEWOOD); leaves = NaturaNether.netherLeaves.getDefaultState().withProperty(BlockNetherLeaves.TYPE, BlockNetherLeaves.LeavesType.FUSEWOOD); - gen = new FusewoodTreeGenerator(3, log, leaves); + gen = new FusewoodTreeGenerator(3, log, leaves, false); break; case GHOSTWOOD: log = NaturaNether.netherLog.getDefaultState().withProperty(BlockNetherLog.TYPE, BlockNetherLog.LogType.GHOSTWOOD); leaves = NaturaNether.netherLeaves.getDefaultState().withProperty(BlockNetherLeaves.TYPE, BlockNetherLeaves.LeavesType.GHOSTWOOD); - gen = new GhostwoodTreeGenerator(log, leaves); + gen = new GhostwoodTreeGenerator(log, leaves, false); break; default: @@ -254,7 +231,7 @@ public void generateTree(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull public enum SaplingType implements IStringSerializable, EnumBlock.IEnumMeta { - GHOSTWOOD, BLOODWOOD, FUSEWOOD, DARKWOOD; + GHOSTWOOD, FUSEWOOD, DARKWOOD; public final int meta; diff --git a/src/main/java/com/progwml6/natura/nether/block/saplings/BlockNetherSapling2.java b/src/main/java/com/progwml6/natura/nether/block/saplings/BlockNetherSapling2.java new file mode 100644 index 00000000..eb751c74 --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/saplings/BlockNetherSapling2.java @@ -0,0 +1,238 @@ +package com.progwml6.natura.nether.block.saplings; + +import java.util.Locale; +import java.util.Random; + +import javax.annotation.Nonnull; + +import com.progwml6.natura.Natura; +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.leaves.BlockNetherLeaves; +import com.progwml6.natura.nether.block.logs.BlockNetherLog2; +import com.progwml6.natura.world.worldgen.trees.BaseTreeGenerator; +import com.progwml6.natura.world.worldgen.trees.nether.BloodwoodTreeGenerator; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockSapling; +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.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.EnumPlantType; +import slimeknights.mantle.block.EnumBlock; + +public class BlockNetherSapling2 extends BlockSapling +{ + public static PropertyEnum FOLIAGE = PropertyEnum.create("foliage", SaplingType.class); + + public BlockNetherSapling2() + { + this.setCreativeTab(NaturaRegistry.tabWorld); + this.setDefaultState(this.blockState.getBaseState()); + this.setSoundType(SoundType.PLANT); + this.setHardness(0.0F); + } + + @Override + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) + { + for (SaplingType type : SaplingType.values()) + { + list.add(new ItemStack(this, 1, this.getMetaFromState(this.getDefaultState().withProperty(FOLIAGE, type)))); + } + } + + @Nonnull + @Override + protected BlockStateContainer createBlockState() + { + // TYPE has to be included because of the BlockSapling constructor.. but it's never used. + return new BlockStateContainer(this, FOLIAGE, STAGE, TYPE); + } + + /** + * Convert the given metadata into a BlockState for this Block + */ + @Nonnull + @Override + public IBlockState getStateFromMeta(int meta) + { + if (meta < 0 || meta >= SaplingType.values().length) + { + meta = 0; + } + + SaplingType sapling = SaplingType.values()[meta]; + + return this.getDefaultState().withProperty(FOLIAGE, sapling); + } + + /** + * Convert the BlockState into the correct metadata value + */ + @Override + public int getMetaFromState(IBlockState state) + { + return state.getValue(FOLIAGE).ordinal(); + } + + @Override + public int damageDropped(IBlockState state) + { + return this.getMetaFromState(state); + } + + @Override + public boolean canPlaceBlockAt(World worldIn, BlockPos pos) + { + Block block = worldIn.getBlockState(pos).getBlock(); + + if (block == null || block.isReplaceable(worldIn, pos)) + { + IBlockState ceilingBlockState = worldIn.getBlockState(pos.up()); + Block netherCeiling = ceilingBlockState.getBlock(); + + if (netherCeiling != null) + { + if (this.canGrowOnBlock(netherCeiling) || netherCeiling.canSustainPlant(ceilingBlockState, worldIn, pos.up(), EnumFacing.DOWN, this)) + { + return true; + } + } + } + return false; + } + + @Override + public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state) + { + switch (state.getValue(FOLIAGE)) + { + case BLOODWOOD: + IBlockState ceilingBlockState = worldIn.getBlockState(pos.up()); + Block netherCeiling = ceilingBlockState.getBlock(); + + if (netherCeiling == null) + { + return false; + } + + return this.canGrowOnBlock(netherCeiling) || netherCeiling.canSustainPlant(ceilingBlockState, worldIn, pos.up(), EnumFacing.DOWN, this); + default: + return true; + } + } + + public boolean canGrowOnBlock(Block block) + { + return block == Blocks.SOUL_SAND || block == Blocks.NETHERRACK || block == NaturaNether.netherTaintedSoil; + } + + @Nonnull + @Override + public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos) + { + return EnumPlantType.Nether; + } + + @Override + public boolean isReplaceable(IBlockAccess worldIn, @Nonnull BlockPos pos) + { + return false; + } + + @Nonnull + @Override + public ItemStack getPickBlock(@Nonnull IBlockState state, RayTraceResult target, @Nonnull World world, @Nonnull BlockPos pos, EntityPlayer player) + { + IBlockState iblockstate = world.getBlockState(pos); + int meta = iblockstate.getBlock().getMetaFromState(iblockstate); + return new ItemStack(Item.getItemFromBlock(this), 1, meta); + } + + @Override + public void generateTree(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull Random rand) + { + if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(worldIn, rand, pos)) + { + return; + } + BaseTreeGenerator gen = new BaseTreeGenerator(); + + IBlockState log; + IBlockState log2; + IBlockState log3; + IBlockState log4; + IBlockState log5; + IBlockState leaves; + + switch (state.getValue(FOLIAGE)) + { + case BLOODWOOD: + log = NaturaNether.netherLog2.getDefaultState().withProperty(BlockNetherLog2.META, 15); + log2 = NaturaNether.netherLog2.getDefaultState().withProperty(BlockNetherLog2.META, 0); + log3 = NaturaNether.netherLog2.getDefaultState().withProperty(BlockNetherLog2.META, 1); + log4 = NaturaNether.netherLog2.getDefaultState().withProperty(BlockNetherLog2.META, 2); + log5 = NaturaNether.netherLog2.getDefaultState().withProperty(BlockNetherLog2.META, 3); + leaves = NaturaNether.netherLeaves.getDefaultState().withProperty(BlockNetherLeaves.TYPE, BlockNetherLeaves.LeavesType.BLOODWOOD); + + gen = new BloodwoodTreeGenerator(log, log2, log3, log4, log5, leaves); + + break; + default: + Natura.log.warn("BlockNetherSapling Warning: Invalid sapling meta/foliage, " + state.getValue(FOLIAGE) + ". Please report!"); + break; + + } + + // replace sapling with air + worldIn.setBlockToAir(pos); + + // try generating + gen.generateTree(rand, worldIn, pos); + + // check if it generated + if (worldIn.isAirBlock(pos)) + { + // nope, set sapling again + worldIn.setBlockState(pos, state, 4); + } + } + + public enum SaplingType implements IStringSerializable, EnumBlock.IEnumMeta + { + BLOODWOOD; + + public final int meta; + + SaplingType() + { + this.meta = this.ordinal(); + } + + @Override + public String getName() + { + return this.toString().toLowerCase(Locale.US); + } + + @Override + public int getMeta() + { + return this.meta; + } + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/shrooms/BlockNetherGlowshroom.java b/src/main/java/com/progwml6/natura/nether/block/shrooms/BlockNetherGlowshroom.java new file mode 100644 index 00000000..8e68ab26 --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/shrooms/BlockNetherGlowshroom.java @@ -0,0 +1,218 @@ +package com.progwml6.natura.nether.block.shrooms; + +import java.util.Locale; +import java.util.Random; + +import javax.annotation.Nonnull; + +import com.progwml6.natura.Natura; +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.world.worldgen.glowshroom.BaseGlowshroomGenerator; +import com.progwml6.natura.world.worldgen.glowshroom.nether.BlueGlowshroomGenerator; +import com.progwml6.natura.world.worldgen.glowshroom.nether.GreenGlowshroomGenerator; +import com.progwml6.natura.world.worldgen.glowshroom.nether.PurpleGlowshroomGenerator; + +import net.minecraft.block.BlockMushroom; +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.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import slimeknights.mantle.block.EnumBlock; + +public class BlockNetherGlowshroom extends BlockMushroom +{ + public static PropertyEnum TYPE = PropertyEnum.create("type", GlowshroomType.class); + + public BlockNetherGlowshroom() + { + super(); + this.setCreativeTab(NaturaRegistry.tabWorld); + this.setSoundType(SoundType.PLANT); + } + + @Override + public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) + { + if (rand.nextInt(25) == 0) + { + int i = 5; + + for (BlockPos blockpos : BlockPos.getAllInBoxMutable(pos.add(-4, -1, -4), pos.add(4, 1, 4))) + { + if (worldIn.getBlockState(blockpos).getBlock() == this) + { + --i; + + if (i <= 0) + { + return; + } + } + } + + BlockPos blockpos1 = pos.add(rand.nextInt(3) - 1, rand.nextInt(2) - rand.nextInt(2), rand.nextInt(3) - 1); + + IBlockState currentState = worldIn.getBlockState(pos); + + for (int k = 0; k < 4; ++k) + { + if (worldIn.isAirBlock(blockpos1) && this.canBlockStay(worldIn, blockpos1, currentState)) + { + pos = blockpos1; + } + + blockpos1 = pos.add(rand.nextInt(3) - 1, rand.nextInt(2) - rand.nextInt(2), rand.nextInt(3) - 1); + } + + currentState = worldIn.getBlockState(pos); + if (worldIn.isAirBlock(blockpos1) && this.canBlockStay(worldIn, blockpos1, currentState)) + { + worldIn.setBlockState(blockpos1, currentState, 3); + } + } + } + + @Override + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) + { + for (GlowshroomType type : GlowshroomType.values()) + { + list.add(new ItemStack(this, 1, this.getMetaFromState(this.getDefaultState().withProperty(TYPE, type)))); + } + } + + @Override + public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state) + { + if (pos.getY() >= 0 && pos.getY() < 256) + { + IBlockState iblockstate = worldIn.getBlockState(pos.down()); + return (iblockstate.getBlock() == Blocks.MYCELIUM || iblockstate.getBlock() == Blocks.NETHERRACK || iblockstate.getBlock() == Blocks.SOUL_SAND || iblockstate.getBlock() == NaturaNether.netherTaintedSoil) ? true : (worldIn.getLight(pos) < 13 && iblockstate.getBlock().canSustainPlant(iblockstate, worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this)); + } + else + { + return false; + } + } + + @Nonnull + @Override + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, TYPE); + } + + /** + * Convert the given metadata into a BlockState for this Block + */ + @Nonnull + @Override + public IBlockState getStateFromMeta(int meta) + { + if (meta < 0 || meta >= GlowshroomType.values().length) + { + meta = 0; + } + + GlowshroomType type = GlowshroomType.values()[meta]; + + return this.getDefaultState().withProperty(TYPE, type); + } + + /** + * Convert the BlockState into the correct metadata value + */ + @Override + public int getMetaFromState(IBlockState state) + { + return state.getValue(TYPE).ordinal(); + } + + @Override + public int damageDropped(IBlockState state) + { + return this.getMetaFromState(state); + } + + @Override + public boolean generateBigMushroom(World worldIn, BlockPos pos, IBlockState state, Random rand) + { + BaseGlowshroomGenerator gen = new BaseGlowshroomGenerator(); + + IBlockState glowshroom; + + switch (state.getValue(TYPE)) + { + case GREEN: + glowshroom = NaturaNether.netherLargeGreenGlowshroom.getDefaultState(); + + gen = new GreenGlowshroomGenerator(glowshroom); + + break; + case BLUE: + glowshroom = NaturaNether.netherLargeBlueGlowshroom.getDefaultState(); + + gen = new BlueGlowshroomGenerator(glowshroom); + + break; + case PURPLE: + glowshroom = NaturaNether.netherLargePurpleGlowshroom.getDefaultState(); + + gen = new PurpleGlowshroomGenerator(glowshroom); + + break; + default: + Natura.log.warn("BlockNetherGlowshroom Warning: Invalid meta, " + state.getValue(TYPE) + ". Please report!"); + + break; + } + + worldIn.setBlockToAir(pos); + + gen.generateShroom(rand, worldIn, pos); + + // check if it generated + if (worldIn.isAirBlock(pos)) + { + worldIn.setBlockState(pos, state, 4); + return false; + } + else + { + return true; + } + } + + public enum GlowshroomType implements IStringSerializable, EnumBlock.IEnumMeta + { + GREEN, BLUE, PURPLE; + + public final int meta; + + GlowshroomType() + { + this.meta = this.ordinal(); + } + + @Override + public String getName() + { + return this.toString().toLowerCase(Locale.US); + } + + @Override + public int getMeta() + { + return this.meta; + } + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/shrooms/BlockNetherLargeGlowshroom.java b/src/main/java/com/progwml6/natura/nether/block/shrooms/BlockNetherLargeGlowshroom.java new file mode 100644 index 00000000..571987dc --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/shrooms/BlockNetherLargeGlowshroom.java @@ -0,0 +1,226 @@ +package com.progwml6.natura.nether.block.shrooms; + +import java.util.Random; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.progwml6.natura.nether.NaturaNether; + +import net.minecraft.block.Block; +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.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.MobEffects; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class BlockNetherLargeGlowshroom extends Block +{ + public static final PropertyEnum VARIANT = PropertyEnum. create("variant", EnumType.class); + + private final Block smallState; + + private final int glowshroomMeta; + + public BlockNetherLargeGlowshroom(Block smallStateIn, int glowshroomMetaIn) + { + super(Material.WOOD); + this.smallState = smallStateIn; + this.glowshroomMeta = glowshroomMetaIn; + } + + /** + * Returns the quantity of items to drop on block destruction. + */ + @Override + public int quantityDropped(Random random) + { + return Math.max(0, random.nextInt(10) - 7); + } + + @Override + public int damageDropped(IBlockState state) + { + return this.glowshroomMeta; + } + + /** + * Get the Item that this Block should drop when harvested. + */ + @Override + @Nullable + public Item getItemDropped(IBlockState state, Random rand, int fortune) + { + return Item.getItemFromBlock(this.smallState); + } + + @Nonnull + @Override + public ItemStack getPickBlock(@Nonnull IBlockState state, RayTraceResult target, @Nonnull World world, @Nonnull BlockPos pos, EntityPlayer player) + { + return new ItemStack(Item.getItemFromBlock(this.smallState), 1, this.glowshroomMeta); + } + + /** + * Convert the given metadata into a BlockState for this Block + */ + @Override + public IBlockState getStateFromMeta(int meta) + { + return this.getDefaultState().withProperty(VARIANT, EnumType.byMetadata(meta)); + } + + /** + * Convert the BlockState into the correct metadata value + */ + @Override + public int getMetaFromState(IBlockState state) + { + return state.getValue(VARIANT).getMeta(); + } + + @Override + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, VARIANT); + } + + @Override + @SideOnly(Side.CLIENT) + public BlockRenderLayer getBlockLayer() + { + return BlockRenderLayer.TRANSLUCENT; + } + + @Override + public boolean isFullCube(IBlockState state) + { + return false; + } + + @Override + public boolean isOpaqueCube(IBlockState state) + { + return false; + } + + @Override + @Deprecated + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) + { + Block block = blockAccess.getBlockState(pos.offset(side)).getBlock(); + if (block == NaturaNether.netherLargeBlueGlowshroom || block == NaturaNether.netherLargePurpleGlowshroom) + { + return false; + } + else + { + return super.shouldSideBeRendered(blockState, blockAccess, pos, side); + } + } + + @Override + public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos) + { + if (worldIn.getBlockState(pos.up()).getBlock() instanceof BlockNetherLargeGlowshroom) + { + return null; + } + else + { + return new AxisAlignedBB(pos.getX(), pos.getY() + 0.9375, pos.getZ(), pos.getX() + 1.0D, pos.getY() + 1.0D, pos.getZ() + 1.0D); + } + } + + @Override + public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) + { + if (entityIn.motionY < 0) + { + entityIn.motionY *= 0.25F; + } + entityIn.fallDistance -= 0.25f; + + if (entityIn.motionY == 0f) + { + entityIn.motionX *= 0.25f; + entityIn.motionZ *= 0.25f; + } + + if (entityIn instanceof EntityLiving) + { + EntityLiving living = (EntityLiving) entityIn; + living.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 100, 0)); + } + } + + public static enum EnumType implements IStringSerializable + { + NORTH_WEST(1, "north_west"), NORTH(2, "north"), NORTH_EAST(3, "north_east"), WEST(4, "west"), CENTER(5, "center"), EAST(6, "east"), SOUTH_WEST(7, "south_west"), SOUTH(8, "south"), SOUTH_EAST(9, "south_east"), STEM(10, "stem"), ALL_INSIDE(0, "all_inside"), ALL_OUTSIDE(14, "all_outside"), ALL_STEM(15, "all_stem"); + + private static final EnumType[] META_LOOKUP = new EnumType[16]; + + private final int meta; + + private final String name; + + private EnumType(int meta, String name) + { + this.meta = meta; + this.name = name; + } + + public int getMeta() + { + return this.meta; + } + + @Override + public String toString() + { + return this.name; + } + + public static EnumType byMetadata(int meta) + { + if (meta < 0 || meta >= META_LOOKUP.length) + { + meta = 0; + } + + EnumType enumtype = META_LOOKUP[meta]; + return enumtype == null ? META_LOOKUP[0] : enumtype; + } + + @Override + public String getName() + { + return this.name; + } + + static + { + for (EnumType enumtype : values()) + { + META_LOOKUP[enumtype.getMeta()] = enumtype; + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/nether/block/slabs/BlockNetherSlab.java b/src/main/java/com/progwml6/natura/nether/block/slabs/BlockNetherSlab.java index d30d7dc8..873e3e37 100644 --- a/src/main/java/com/progwml6/natura/nether/block/slabs/BlockNetherSlab.java +++ b/src/main/java/com/progwml6/natura/nether/block/slabs/BlockNetherSlab.java @@ -27,7 +27,7 @@ public BlockNetherSlab() this.setHardness(2.0F); this.setSoundType(SoundType.WOOD); - this.setCreativeTab(NaturaRegistry.tabWorld); + this.setCreativeTab(NaturaRegistry.tabDecorative); } @Override diff --git a/src/main/java/com/progwml6/natura/nether/block/vine/BlockNetherThornVines.java b/src/main/java/com/progwml6/natura/nether/block/vine/BlockNetherThornVines.java new file mode 100644 index 00000000..c5dc7b40 --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/vine/BlockNetherThornVines.java @@ -0,0 +1,39 @@ +package com.progwml6.natura.nether.block.vine; + +import java.util.Random; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockVine; +import net.minecraft.block.SoundType; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.util.DamageSource; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockNetherThornVines extends BlockVine +{ + public BlockNetherThornVines() + { + super(); + this.setCreativeTab(NaturaRegistry.tabWorld); + this.setHardness(1.0F); + this.setSoundType(SoundType.PLANT); + } + + @Override + public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) + { + Random random = new Random(); + random.setSeed(2 ^ 16 + 2 ^ 8 + (4 * 3 * 271)); + + if (!(entityIn instanceof EntityItem) && !(entityIn instanceof EntityGhast) && random.nextInt(30) == 0) + { + DamageSource source = random.nextBoolean() ? DamageSource.CACTUS : DamageSource.LAVA; + entityIn.attackEntityFrom(source, 1); + } + } +} diff --git a/src/main/java/com/progwml6/natura/oredict/NaturaOredict.java b/src/main/java/com/progwml6/natura/oredict/NaturaOredict.java new file mode 100644 index 00000000..d3df6614 --- /dev/null +++ b/src/main/java/com/progwml6/natura/oredict/NaturaOredict.java @@ -0,0 +1,230 @@ +package com.progwml6.natura.oredict; + +import org.apache.logging.log4j.Logger; + +import com.google.common.eventbus.Subscribe; +import com.progwml6.natura.common.NaturaPulse; +import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.decorative.NaturaDecorative; +import com.progwml6.natura.library.Util; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.glass.BlockNetherGlass; +import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.shared.NaturaCommons; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.oredict.OreDictionary; +import slimeknights.mantle.pulsar.pulse.Pulse; + +@Pulse(id = NaturaOredict.PulseId, description = "Everything that has to do with the ore dictionary", forced = true) +public class NaturaOredict extends NaturaPulse +{ + public static final String PulseId = "NaturaOredict"; + + static final Logger log = Util.getLogger(PulseId); + + @Subscribe + public void preInit(FMLPreInitializationEvent event) + { + ensureOredict(); + + registerCommons(); + registerOverworld(); + registerNether(); + registerDecorative(); + } + + private static void ensureOredict() + { + oredict(Items.BOWL, "bowlWood"); + oredict(Blocks.CHEST, "chestWood"); + oredict(Blocks.TRAPPED_CHEST, "chestWood"); + } + + private static void registerCommons() + { + oredict(NaturaCommons.bloodwood_emptybowl, "bowlWood"); + oredict(NaturaCommons.ghostwood_emptybowl, "bowlWood"); + oredict(NaturaCommons.darkwood_emptybowl, "bowlWood"); + oredict(NaturaCommons.fusewood_emptybowl, "bowlWood"); + + oredict(NaturaCommons.barley, "cropBarley"); + oredict(NaturaCommons.cotton, "cropCotton"); + + oredict(NaturaCommons.barleyFlour, "foodFlour"); + oredict(NaturaCommons.wheatFlour, "foodFlour"); + + oredict(NaturaCommons.barley, "listAllGrain"); + oredict(NaturaCommons.wheatFlour, "foodEqualswheat"); + + oredict(NaturaCommons.blueDye, "dyeBlue"); + + oredict(NaturaCommons.sulfurPowder, "dustSulphur"); + oredict(NaturaCommons.sulfurPowder, "dustSulfur"); + + oredict(NaturaCommons.sticks, "stickWood"); + } + + private static void registerOverworld() + { + if (isOverworldLoaded()) + { + if (Config.dropBarley) + { + MinecraftForge.addGrassSeed(NaturaOverworld.barley_seeds, 3); + } + if (Config.dropCotton) + { + MinecraftForge.addGrassSeed(NaturaOverworld.cotton_seeds, 3); + } + + // Food + oredict(NaturaCommons.raspberry, "cropRaspberry"); + oredict(NaturaCommons.blueberry, "cropBlueberry"); + oredict(NaturaCommons.blackberry, "cropBlackberry"); + oredict(NaturaCommons.maloberry, "cropMaloberry"); + + // Planks + oredict(NaturaOverworld.overworldPlanks, "plankWood"); + + // Logs + oredict(NaturaOverworld.overworldLog, "logWood"); + oredict(NaturaOverworld.overworldLog2, "logWood"); + oredict(NaturaOverworld.redwoodLog, "logWood"); + + // Slabs + oredict(NaturaOverworld.overworldSlab, "slabWood"); + oredict(NaturaOverworld.overworldSlab2, "slabWood"); + + // Saplings + oredict(NaturaOverworld.overworldSapling, "treeSapling"); + oredict(NaturaOverworld.overworldSapling2, "treeSapling"); + oredict(NaturaOverworld.redwoodSapling, "treeSapling"); + + // Leaves + oredict(NaturaOverworld.overworldLeaves, "treeLeaves"); + oredict(NaturaOverworld.overworldLeaves2, "treeLeaves"); + oredict(NaturaOverworld.redwoodLeaves, "treeLeaves"); + + // Stairs + oredict(NaturaOverworld.overworldStairsAmaranth, "stairWood"); + oredict(NaturaOverworld.overworldStairsEucalyptus, "stairWood"); + oredict(NaturaOverworld.overworldStairsHopseed, "stairWood"); + oredict(NaturaOverworld.overworldStairsMaple, "stairWood"); + oredict(NaturaOverworld.overworldStairsRedwood, "stairWood"); + oredict(NaturaOverworld.overworldStairsSakura, "stairWood"); + oredict(NaturaOverworld.overworldStairsSilverbell, "stairWood"); + oredict(NaturaOverworld.overworldStairsTiger, "stairWood"); + oredict(NaturaOverworld.overworldStairsWillow, "stairWood"); + + // Seeds + oredict(NaturaOverworld.barley_seeds, "seedBarley"); + oredict(NaturaOverworld.cotton_seeds, "seedCotton"); + oredict(NaturaOverworld.barley_seeds, "listAllseed"); + oredict(NaturaOverworld.cotton_seeds, "listAllseed"); + } + } + + private static void registerNether() + { + // Nether + if (isNetherLoaded()) + { + oredict(NaturaCommons.blightberry, "cropBlightberry"); + oredict(NaturaCommons.duskberry, "cropDuskberry"); + oredict(NaturaCommons.skyberry, "cropSkyberry"); + oredict(NaturaCommons.stingberry, "cropStingberry"); + + // Tained Soil + oredict(NaturaNether.netherTaintedSoil, "taintedSoil"); + + // Planks + oredict(NaturaNether.netherPlanks, "plankWood"); + + // Logs + oredict(NaturaNether.netherLog, "logWood"); + oredict(NaturaNether.netherLog2, "logWood"); + + // Slabs + oredict(NaturaNether.netherSlab, "slabWood"); + + // Saplings + oredict(NaturaNether.netherSapling, "treeSapling"); + + // Leaves + oredict(NaturaNether.netherLeaves, "treeLeaves"); + oredict(NaturaNether.netherLeaves2, "treeLeaves"); + + // Stairs + oredict(NaturaNether.netherStairsBloodwood, "stairWood"); + oredict(NaturaNether.netherStairsDarkwood, "stairWood"); + oredict(NaturaNether.netherStairsGhostwood, "stairWood"); + oredict(NaturaNether.netherStairsFusewood, "stairWood"); + + // Glass + oredict(NaturaNether.netherGlass, BlockNetherGlass.GlassType.SOUL.getMeta(), "glassSoul"); + oredict(NaturaNether.netherGlass, "glass"); + + // Vines + OreDictionary.registerOre("cropVine", new ItemStack(NaturaNether.netherThornVines)); + } + } + + private static void registerDecorative() + { + // Decorative + if (isDecorativeLoaded()) + { + // Overworld + if (isOverworldLoaded()) + { + oredict(NaturaDecorative.overworldWorkbenches, "crafterWood"); + oredict(NaturaDecorative.overworldWorkbenches, "craftingTableWood"); + } + + // Nether + if (isNetherLoaded()) + { + oredict(NaturaDecorative.netherWorkbenches, "crafterWood"); + oredict(NaturaDecorative.netherWorkbenches, "craftingTableWood"); + } + } + } + + public static void oredict(Item item, String... name) + { + oredict(item, OreDictionary.WILDCARD_VALUE, name); + } + + public static void oredict(Block block, String... name) + { + oredict(block, OreDictionary.WILDCARD_VALUE, name); + } + + public static void oredict(Item item, int meta, String... name) + { + oredict(new ItemStack(item, 1, meta), name); + } + + public static void oredict(Block block, int meta, String... name) + { + oredict(new ItemStack(block, 1, meta), name); + } + + public static void oredict(ItemStack stack, String... names) + { + if (!stack.isEmpty() && stack.getItem() != Items.AIR) + { + for (String name : names) + { + OreDictionary.registerOre(name, stack); + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/overworld/NaturaOverworld.java b/src/main/java/com/progwml6/natura/overworld/NaturaOverworld.java index d501505b..70f3152b 100644 --- a/src/main/java/com/progwml6/natura/overworld/NaturaOverworld.java +++ b/src/main/java/com/progwml6/natura/overworld/NaturaOverworld.java @@ -1,16 +1,19 @@ package com.progwml6.natura.overworld; -import java.util.List; - import org.apache.logging.log4j.Logger; import com.google.common.eventbus.Subscribe; import com.progwml6.natura.common.CommonProxy; import com.progwml6.natura.common.NaturaPulse; +import com.progwml6.natura.common.block.BlockNaturaDoor; import com.progwml6.natura.common.item.ItemBlockLeaves; +import com.progwml6.natura.common.item.ItemNaturaDoor; import com.progwml6.natura.library.NaturaRegistry; import com.progwml6.natura.library.Util; import com.progwml6.natura.overworld.block.bush.BlockOverworldBerryBush; +import com.progwml6.natura.overworld.block.crops.BlockNaturaBarley; +import com.progwml6.natura.overworld.block.crops.BlockNaturaCotton; +import com.progwml6.natura.overworld.block.flower.BlockBluebellsFlower; import com.progwml6.natura.overworld.block.grass.BlockColoredGrass; import com.progwml6.natura.overworld.block.leaves.BlockOverworldLeaves; import com.progwml6.natura.overworld.block.leaves.BlockOverworldLeaves2; @@ -19,26 +22,31 @@ import com.progwml6.natura.overworld.block.logs.BlockOverworldLog2; import com.progwml6.natura.overworld.block.logs.BlockRedwoodLog; import com.progwml6.natura.overworld.block.planks.BlockOverworldPlanks; +import com.progwml6.natura.overworld.block.saguaro.BlockSaguaro; +import com.progwml6.natura.overworld.block.saguaro.BlockSaguaroBaby; +import com.progwml6.natura.overworld.block.saguaro.BlockSaguaroFruit; import com.progwml6.natura.overworld.block.saplings.BlockOverworldSapling; import com.progwml6.natura.overworld.block.saplings.BlockOverworldSapling2; import com.progwml6.natura.overworld.block.saplings.BlockRedwoodSapling; import com.progwml6.natura.overworld.block.slabs.BlockColoredGrassSlab; import com.progwml6.natura.overworld.block.slabs.BlockOverworldSlab; import com.progwml6.natura.overworld.block.slabs.BlockOverworldSlab2; +import com.progwml6.natura.overworld.item.ItemSaguaroFruit; +import com.progwml6.natura.overworld.item.ItemSeeds; import com.progwml6.natura.shared.NaturaCommons; +import com.progwml6.natura.shared.item.bags.ItemSeedBag; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.item.crafting.IRecipe; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import slimeknights.mantle.item.ItemBlockMeta; import slimeknights.mantle.pulsar.pulse.Pulse; @@ -71,9 +79,11 @@ public class NaturaOverworld extends NaturaPulse public static BlockOverworldPlanks overworldPlanks; public static BlockRedwoodLog redwoodLog; - public static BlockRedwoodSapling redwoodSapling; //TODO: FIX REDWOOD + public static BlockRedwoodSapling redwoodSapling; public static BlockRedwoodLeaves redwoodLeaves; + public static BlockBluebellsFlower bluebellsFlower; + public static Block overworldSlab; public static Block overworldSlab2; @@ -91,6 +101,38 @@ public class NaturaOverworld extends NaturaPulse public static Block overworldBerryBushBlueberry; public static Block overworldBerryBushBlackberry; public static Block overworldBerryBushMaloberry; + + public static BlockNaturaBarley barleyCrop; + public static BlockNaturaCotton cottonCrop; + + public static BlockNaturaDoor eucalyptusDoor; + public static BlockNaturaDoor hopseedDoor; + public static BlockNaturaDoor sakuraDoor; + public static BlockNaturaDoor redwoodDoor; + public static BlockNaturaDoor redwoodBarkDoor; + + public static BlockSaguaro saguaro; + public static BlockSaguaroBaby saguaroBaby; + public static BlockSaguaroFruit saguaroFruit; + + // Items + public static ItemSeeds overworldSeeds; + public static ItemSeedBag overworldSeedBags; + public static ItemNaturaDoor overworldDoors; + + public static ItemSaguaroFruit saguaroFruitItem; + + public static ItemStack barley_seeds; + public static ItemStack cotton_seeds; + + public static ItemStack cotton_seed_bag; + public static ItemStack barley_seed_bag; + + public static ItemStack eucalyptus_door; + public static ItemStack hopseed_door; + public static ItemStack sakura_door; + public static ItemStack redwood_door; + public static ItemStack redwood_bark_door; //@formatter:on @Subscribe @@ -115,7 +157,9 @@ public void preInit(FMLPreInitializationEvent event) overworldSapling = registerBlock(new BlockOverworldSapling(), "overworld_sapling", BlockOverworldSapling.FOLIAGE); overworldSapling2 = registerBlock(new BlockOverworldSapling2(), "overworld_sapling2", BlockOverworldSapling2.FOLIAGE); - redwoodSapling = registerBlock(new BlockRedwoodSapling(), "redwood_sapling", BlockRedwoodSapling.FOLIAGE);// TODO: FIX REDWOOD + redwoodSapling = registerBlock(new BlockRedwoodSapling(), "redwood_sapling", BlockRedwoodSapling.FOLIAGE); + + bluebellsFlower = registerBlock(new BlockBluebellsFlower(), "bluebells_flower"); overworldPlanks = registerEnumBlock(new BlockOverworldPlanks(), "overworld_planks"); @@ -137,9 +181,55 @@ public void preInit(FMLPreInitializationEvent event) overworldBerryBushBlackberry = registerBlock(new BlockOverworldBerryBush(NaturaCommons.blackberry), "overworld_berrybush_blackberry"); overworldBerryBushMaloberry = registerBlock(new BlockOverworldBerryBush(NaturaCommons.maloberry), "overworld_berrybush_maloberry"); + barleyCrop = registerBlock(new BlockNaturaBarley(), "barley_crop"); + cottonCrop = registerBlock(new BlockNaturaCotton(), "cotton_crop"); + + eucalyptusDoor = registerBlock(new BlockNaturaDoor(), "overworld_door_eucalyptus"); + hopseedDoor = registerBlock(new BlockNaturaDoor(), "overworld_door_hopseed"); + sakuraDoor = registerBlock(new BlockNaturaDoor(), "overworld_door_sakura"); + redwoodDoor = registerBlock(new BlockNaturaDoor(), "overworld_door_redwood"); + redwoodBarkDoor = registerBlock(new BlockNaturaDoor(), "overworld_door_redwood_bark"); + + saguaro = registerBlock(new BlockSaguaro(), "saguaro"); + saguaroBaby = registerBlock(new BlockSaguaroBaby(), "saguaro_baby"); + saguaroFruit = registerBlock(new BlockSaguaroFruit(), "saguaro_fruit"); + + // Items + overworldSeeds = registerItem(new ItemSeeds(), "overworld_seeds"); + overworldSeedBags = registerItem(new ItemSeedBag(), "overworld_seed_bags"); + overworldDoors = registerItem(new ItemNaturaDoor(), "overworld_doors"); + + saguaroFruitItem = registerItem(new ItemSaguaroFruit(3, 0.3f, NaturaOverworld.saguaroBaby), "saguaro_fruit_item"); + + overworldSeeds.setCreativeTab(NaturaRegistry.tabGeneral); + overworldSeedBags.setCreativeTab(NaturaRegistry.tabGeneral); + overworldDoors.setCreativeTab(NaturaRegistry.tabDecorative); + + barley_seeds = overworldSeeds.addMeta(0, "barley_seeds", NaturaOverworld.barleyCrop.getDefaultState().withProperty(BlockNaturaBarley.AGE, 0)); + cotton_seeds = overworldSeeds.addMeta(1, "cotton_seeds", NaturaOverworld.cottonCrop.getDefaultState().withProperty(BlockNaturaCotton.AGE, 0)); + + if (isOverworldLoaded()) + { + barley_seed_bag = overworldSeedBags.addMeta(0, "barley_seed_bag", NaturaOverworld.barleyCrop.getDefaultState().withProperty(BlockNaturaBarley.AGE, Integer.valueOf(0))); + cotton_seed_bag = overworldSeedBags.addMeta(1, "cotton_seed_bag", NaturaOverworld.cottonCrop.getDefaultState().withProperty(BlockNaturaCotton.AGE, Integer.valueOf(0))); + } + + eucalyptus_door = overworldDoors.addMeta(0, "eucalyptus_door", NaturaOverworld.eucalyptusDoor.getDefaultState()); + hopseed_door = overworldDoors.addMeta(1, "hopseed_door", NaturaOverworld.hopseedDoor.getDefaultState()); + sakura_door = overworldDoors.addMeta(2, "sakura_door", NaturaOverworld.sakuraDoor.getDefaultState()); + redwood_door = overworldDoors.addMeta(3, "redwood_door", NaturaOverworld.redwoodDoor.getDefaultState()); + redwood_bark_door = overworldDoors.addMeta(4, "redwood_bark_door", NaturaOverworld.redwoodBarkDoor.getDefaultState()); + + eucalyptusDoor.setDoor(NaturaOverworld.eucalyptus_door); + hopseedDoor.setDoor(NaturaOverworld.hopseed_door); + sakuraDoor.setDoor(NaturaOverworld.sakura_door); + redwoodDoor.setDoor(NaturaOverworld.redwood_door); + redwoodBarkDoor.setDoor(NaturaOverworld.redwood_bark_door); + proxy.preInit(); NaturaRegistry.tabWorld.setDisplayIcon(new ItemStack(coloredGrass)); + NaturaRegistry.tabDecorative.setDisplayIcon(redwood_door); } @Subscribe @@ -159,9 +249,49 @@ public void postInit(FMLPostInitializationEvent event) private void registerRecipes() { - @SuppressWarnings("unused") - List recipes = CraftingManager.getInstance().getRecipeList(); - + // Seed Bags + GameRegistry.addRecipe(new ShapedOreRecipe(barley_seed_bag.copy(), "sss", "sss", "sss", 's', "seedBarley")); + GameRegistry.addRecipe(new ShapedOreRecipe(cotton_seed_bag.copy(), "sss", "sss", "sss", 's', "seedCotton")); + + // Seeds + GameRegistry.addRecipe(new ItemStack(overworldSeeds, 9, 0), "s", 's', barley_seed_bag.copy()); + GameRegistry.addRecipe(new ItemStack(overworldSeeds, 9, 1), "s", 's', cotton_seed_bag.copy()); + + // Blue Die + GameRegistry.addShapelessRecipe(NaturaCommons.blueDye, new ItemStack(bluebellsFlower)); + + // Berry Medley + String[] berryTypes = new String[] { "cropRaspberry", "cropBlueberry", "cropBlackberry", "cropMaloberry", "cropStrawberry", "cropCranberry" }; + + for (int iter1 = 0; iter1 < berryTypes.length - 2; iter1++) + { + for (int iter2 = iter1 + 1; iter2 < berryTypes.length - 1; iter2++) + { + for (int iter3 = iter2 + 1; iter3 < berryTypes.length; iter3++) + { + GameRegistry.addRecipe(new ShapelessOreRecipe(NaturaCommons.berryMedley.copy(), "bowlWood", berryTypes[iter1], berryTypes[iter2], berryTypes[iter3])); + } + } + } + + ItemStack berryMix = NaturaCommons.berryMedley.copy(); + berryMix.setCount(2); + + for (int iter1 = 0; iter1 < berryTypes.length - 3; iter1++) + { + for (int iter2 = iter1 + 1; iter2 < berryTypes.length - 2; iter2++) + { + for (int iter3 = iter2 + 1; iter3 < berryTypes.length - 1; iter3++) + { + for (int iter4 = iter3 + 1; iter4 < berryTypes.length; iter4++) + { + GameRegistry.addRecipe(new ShapelessOreRecipe(berryMix.copy(), "bowlWood", "bowlWood", berryTypes[iter1], berryTypes[iter2], berryTypes[iter3], berryTypes[iter4])); + } + } + } + } + + // Planks GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.MAPLE.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.MAPLE.getMeta())); GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.SILVERBELL.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.SILVERBELL.getMeta())); GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.AMARANTH.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.AMARANTH.getMeta())); @@ -171,20 +301,36 @@ private void registerRecipes() GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.HOPSEED.getMeta()), "w", 'w', new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.HOPSEED.getMeta())); GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.SAKURA.getMeta()), "w", 'w', new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.SAKURA.getMeta())); GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.REDWOOD.getMeta()), "w", 'w', new ItemStack(redwoodLog, 1, BlockRedwoodLog.RedwoodType.HEART.getMeta())); - //TODO test these - //SLABS - addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.AMARANTH.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.AMARANTH.getMeta())); - addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.MAPLE.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.MAPLE.getMeta())); - addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.SILVERBELL.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.SILVERBELL.getMeta())); - addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.TIGER.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.TIGER.getMeta())); - addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.WILLOW.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.WILLOW.getMeta())); - addSlabRecipe(overworldSlab2, BlockOverworldSlab2.PlankType.EUCALYPTUS.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.EUCALYPTUS.getMeta())); - addSlabRecipe(overworldSlab2, BlockOverworldSlab2.PlankType.HOPSEED.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.HOPSEED.getMeta())); - addSlabRecipe(overworldSlab2, BlockOverworldSlab2.PlankType.REDWOOD.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.REDWOOD.getMeta())); - addSlabRecipe(overworldSlab2, BlockOverworldSlab2.PlankType.SAKURA.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.SAKURA.getMeta())); + // Doors + addShapedRecipe(redwood_door.copy(), "##", "##", "##", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.REDWOOD.getMeta())); + addShapedRecipe(eucalyptus_door.copy(), "##", "##", "##", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.EUCALYPTUS.getMeta())); + addShapedRecipe(hopseed_door.copy(), "##", "##", "##", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.HOPSEED.getMeta())); + addShapedRecipe(sakura_door.copy(), "##", "##", "##", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.SAKURA.getMeta())); + addShapedRecipe(redwood_bark_door.copy(), "##", "##", "##", '#', new ItemStack(redwoodLog, 1, BlockRedwoodLog.RedwoodType.BARK.getMeta())); + + // Sticks + addShapedRecipe(NaturaCommons.maple_stick.copy(), "#", "#", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.MAPLE.getMeta())); + addShapedRecipe(NaturaCommons.silverbell_stick.copy(), "#", "#", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.SILVERBELL.getMeta())); + addShapedRecipe(NaturaCommons.amaranth_stick.copy(), "#", "#", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.AMARANTH.getMeta())); + addShapedRecipe(NaturaCommons.tiger_stick.copy(), "#", "#", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.TIGER.getMeta())); + addShapedRecipe(NaturaCommons.willow_stick.copy(), "#", "#", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.WILLOW.getMeta())); + addShapedRecipe(NaturaCommons.eucalyptus_stick.copy(), "#", "#", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.EUCALYPTUS.getMeta())); + addShapedRecipe(NaturaCommons.hopseed_stick.copy(), "#", "#", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.HOPSEED.getMeta())); + addShapedRecipe(NaturaCommons.sakura_stick.copy(), "#", "#", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.SAKURA.getMeta())); + addShapedRecipe(NaturaCommons.redwood_stick.copy(), "#", "#", '#', new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.REDWOOD.getMeta())); + + // Grass + GameRegistry.addRecipe(new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.TOPIARY.getMeta()), " s ", "s#s", " s ", 's', new ItemStack(Items.WHEAT_SEEDS), '#', new ItemStack(Blocks.DIRT)); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.BLUEGRASS.getMeta()), new ItemStack(coloredGrass, 1, 0), "dyeBlue")); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.AUTUMNAL.getMeta()), new ItemStack(coloredGrass, 1, 0), "dyeRed")); + + // Grass Slabs + addSlabRecipe(coloredGrassSlab, BlockColoredGrass.GrassType.TOPIARY.getMeta(), new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.TOPIARY.getMeta())); + addSlabRecipe(coloredGrassSlab, BlockColoredGrass.GrassType.BLUEGRASS.getMeta(), new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.BLUEGRASS.getMeta())); + addSlabRecipe(coloredGrassSlab, BlockColoredGrass.GrassType.AUTUMNAL.getMeta(), new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.AUTUMNAL.getMeta())); - //STAIRS + // Stairs addStairRecipe(overworldStairsAmaranth, new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.AMARANTH.getMeta())); addStairRecipe(overworldStairsMaple, new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.MAPLE.getMeta())); addStairRecipe(overworldStairsSilverbell, new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.SILVERBELL.getMeta())); @@ -195,29 +341,34 @@ private void registerRecipes() addStairRecipe(overworldStairsRedwood, new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.REDWOOD.getMeta())); addStairRecipe(overworldStairsSakura, new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.SAKURA.getMeta())); - //GRASS STUFF - GameRegistry.addRecipe(new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.TOPIARY.getMeta()), " s ", "s#s", " s ", 's', new ItemStack(Items.WHEAT_SEEDS), '#', new ItemStack(Blocks.DIRT)); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.BLUEGRASS.getMeta()), new ItemStack(coloredGrass, 1, 0), "dyeBlue")); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.AUTUMNAL.getMeta()), new ItemStack(coloredGrass, 1, 0), "dyeRed")); - - addSlabRecipe(coloredGrassSlab, BlockColoredGrass.GrassType.TOPIARY.getMeta(), new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.TOPIARY.getMeta())); - addSlabRecipe(coloredGrassSlab, BlockColoredGrass.GrassType.BLUEGRASS.getMeta(), new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.BLUEGRASS.getMeta())); - addSlabRecipe(coloredGrassSlab, BlockColoredGrass.GrassType.AUTUMNAL.getMeta(), new ItemStack(coloredGrass, 1, BlockColoredGrass.GrassType.AUTUMNAL.getMeta())); - + // Slabs + addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.AMARANTH.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.AMARANTH.getMeta())); + addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.MAPLE.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.MAPLE.getMeta())); + addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.SILVERBELL.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.SILVERBELL.getMeta())); + addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.TIGER.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.TIGER.getMeta())); + addSlabRecipe(overworldSlab, BlockOverworldSlab.PlankType.WILLOW.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.WILLOW.getMeta())); + addSlabRecipe(overworldSlab2, BlockOverworldSlab2.PlankType.EUCALYPTUS.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.EUCALYPTUS.getMeta())); + addSlabRecipe(overworldSlab2, BlockOverworldSlab2.PlankType.HOPSEED.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.HOPSEED.getMeta())); + addSlabRecipe(overworldSlab2, BlockOverworldSlab2.PlankType.REDWOOD.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.REDWOOD.getMeta())); + addSlabRecipe(overworldSlab2, BlockOverworldSlab2.PlankType.SAKURA.getMeta(), new ItemStack(overworldPlanks, 1, BlockOverworldPlanks.PlankType.SAKURA.getMeta())); } private void registerSmelting() { - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.MAPLE.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.AMARANTH.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.SILVERBELL.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.TIGER.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.EUCALYPTUS.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.HOPSEED.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.SAKURA.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.WILLOW.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(redwoodLog, 1, BlockRedwoodLog.RedwoodType.BARK.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(redwoodLog, 1, BlockRedwoodLog.RedwoodType.ROOT.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); - FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(redwoodLog, 1, BlockRedwoodLog.RedwoodType.HEART.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + FurnaceRecipes furnaceRecipes = FurnaceRecipes.instance(); + + furnaceRecipes.addSmeltingRecipe(new ItemStack(saguaro, 1, 0), new ItemStack(Items.DYE, 1, 2), 0.2F); + + furnaceRecipes.addSmeltingRecipe(new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.MAPLE.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.AMARANTH.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.SILVERBELL.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.TIGER.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.EUCALYPTUS.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.HOPSEED.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.SAKURA.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(overworldLog2, 1, BlockOverworldLog2.LogType.WILLOW.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(redwoodLog, 1, BlockRedwoodLog.RedwoodType.BARK.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(redwoodLog, 1, BlockRedwoodLog.RedwoodType.ROOT.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(redwoodLog, 1, BlockRedwoodLog.RedwoodType.HEART.getMeta()), new ItemStack(Items.COAL, 1, 1), 0.15f); } } diff --git a/src/main/java/com/progwml6/natura/overworld/OverworldClientProxy.java b/src/main/java/com/progwml6/natura/overworld/OverworldClientProxy.java index d9db603a..1baba473 100644 --- a/src/main/java/com/progwml6/natura/overworld/OverworldClientProxy.java +++ b/src/main/java/com/progwml6/natura/overworld/OverworldClientProxy.java @@ -10,14 +10,18 @@ import com.progwml6.natura.common.block.BlockGrassStairs; import com.progwml6.natura.common.client.GrassColorizer; import com.progwml6.natura.common.client.LeavesColorizer; +import com.progwml6.natura.overworld.block.crops.BlockNaturaBarley; +import com.progwml6.natura.overworld.block.crops.BlockNaturaCotton; import com.progwml6.natura.overworld.block.grass.BlockColoredGrass; import com.progwml6.natura.overworld.block.leaves.BlockRedwoodLeaves; import com.progwml6.natura.overworld.block.logs.BlockOverworldLog; import com.progwml6.natura.overworld.block.logs.BlockOverworldLog2; +import com.progwml6.natura.overworld.block.saguaro.BlockSaguaroBaby; import com.progwml6.natura.overworld.block.saplings.BlockOverworldSapling; import com.progwml6.natura.overworld.block.saplings.BlockOverworldSapling2; import com.progwml6.natura.overworld.block.saplings.BlockRedwoodSapling; +import net.minecraft.block.BlockDoor; import net.minecraft.block.BlockLeaves; import net.minecraft.block.BlockSapling; import net.minecraft.block.state.IBlockState; @@ -31,6 +35,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraftforge.client.model.ModelLoader; @@ -158,6 +163,12 @@ protected void registerModels() ModelLoader.setCustomStateMapper(NaturaOverworld.overworldSapling2, (new StateMap.Builder()).ignore(BlockOverworldSapling2.STAGE, BlockSapling.TYPE).build()); ModelLoader.setCustomStateMapper(NaturaOverworld.redwoodSapling, (new StateMap.Builder()).ignore(BlockRedwoodSapling.STAGE, BlockSapling.TYPE).build()); + ModelLoader.setCustomStateMapper(NaturaOverworld.eucalyptusDoor, (new StateMap.Builder()).ignore(BlockDoor.POWERED).build()); + ModelLoader.setCustomStateMapper(NaturaOverworld.hopseedDoor, (new StateMap.Builder()).ignore(BlockDoor.POWERED).build()); + ModelLoader.setCustomStateMapper(NaturaOverworld.sakuraDoor, (new StateMap.Builder()).ignore(BlockDoor.POWERED).build()); + ModelLoader.setCustomStateMapper(NaturaOverworld.redwoodDoor, (new StateMap.Builder()).ignore(BlockDoor.POWERED).build()); + ModelLoader.setCustomStateMapper(NaturaOverworld.redwoodBarkDoor, (new StateMap.Builder()).ignore(BlockDoor.POWERED).build()); + registerItemBlockMeta(NaturaOverworld.redwoodLog); registerItemBlockMeta(NaturaOverworld.overworldPlanks); registerItemBlockMeta(NaturaOverworld.coloredGrass); @@ -166,6 +177,9 @@ protected void registerModels() registerItemModel(NaturaOverworld.coloredGrassStairsBlueGrass); registerItemModel(NaturaOverworld.coloredGrassStairsAutumnal); + ItemStack stack = new ItemStack(Item.getItemFromBlock(NaturaOverworld.bluebellsFlower), 1, 0); + this.registerItemModelNatura(stack, "bluebells_flower"); + // slabs registerItemBlockMeta(NaturaOverworld.overworldSlab); registerItemBlockMeta(NaturaOverworld.overworldSlab2); @@ -221,7 +235,7 @@ protected void registerModels() } // saplings - ItemStack stack = new ItemStack(Item.getItemFromBlock(NaturaOverworld.overworldSapling), 1, NaturaOverworld.overworldSapling.getMetaFromState(NaturaOverworld.overworldSapling.getDefaultState().withProperty(BlockOverworldSapling.FOLIAGE, BlockOverworldSapling.SaplingType.MAPLE))); + stack = new ItemStack(Item.getItemFromBlock(NaturaOverworld.overworldSapling), 1, NaturaOverworld.overworldSapling.getMetaFromState(NaturaOverworld.overworldSapling.getDefaultState().withProperty(BlockOverworldSapling.FOLIAGE, BlockOverworldSapling.SaplingType.MAPLE))); this.registerItemModelNatura(stack, "overworld_sapling_maple"); stack = new ItemStack(Item.getItemFromBlock(NaturaOverworld.overworldSapling), 1, NaturaOverworld.overworldSapling.getMetaFromState(NaturaOverworld.overworldSapling.getDefaultState().withProperty(BlockOverworldSapling.FOLIAGE, BlockOverworldSapling.SaplingType.SILVERBELL))); this.registerItemModelNatura(stack, "overworld_sapling_silverbell"); @@ -269,5 +283,47 @@ protected void registerModels() String variant = String.format("%s=%s", BlockEnumBerryBush.AGE.getName(), Integer.valueOf(meta)); ModelLoader.setCustomModelResourceLocation(maloberry_berrybush, meta, new ModelResourceLocation(maloberry_berrybush.getRegistryName(), variant)); } + + Item barley_crop = Item.getItemFromBlock(NaturaOverworld.barleyCrop); + for (int meta = 0; meta <= 3; meta++) + { + String variant = String.format("%s=%s", BlockNaturaBarley.AGE.getName(), Integer.valueOf(meta)); + ModelLoader.setCustomModelResourceLocation(barley_crop, meta, new ModelResourceLocation(barley_crop.getRegistryName(), variant)); + } + + Item cotton_crop = Item.getItemFromBlock(NaturaOverworld.cottonCrop); + for (int meta = 0; meta <= 4; meta++) + { + String variant = String.format("%s=%s", BlockNaturaCotton.AGE.getName(), Integer.valueOf(meta)); + ModelLoader.setCustomModelResourceLocation(cotton_crop, meta, new ModelResourceLocation(cotton_crop.getRegistryName(), variant)); + } + + stack = new ItemStack(Item.getItemFromBlock(NaturaOverworld.eucalyptusDoor), 1, NaturaOverworld.eucalyptusDoor.getMetaFromState(NaturaOverworld.eucalyptusDoor.getDefaultState().withProperty(BlockDoor.FACING, EnumFacing.EAST).withProperty(BlockDoor.OPEN, Boolean.valueOf(false)).withProperty(BlockDoor.HINGE, BlockDoor.EnumHingePosition.LEFT).withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER))); + this.registerItemModelNatura(stack, "overworld_door_eucalyptus"); + stack = new ItemStack(Item.getItemFromBlock(NaturaOverworld.hopseedDoor), 1, NaturaOverworld.hopseedDoor.getMetaFromState(NaturaOverworld.hopseedDoor.getDefaultState().withProperty(BlockDoor.FACING, EnumFacing.EAST).withProperty(BlockDoor.OPEN, Boolean.valueOf(false)).withProperty(BlockDoor.HINGE, BlockDoor.EnumHingePosition.LEFT).withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER))); + this.registerItemModelNatura(stack, "overworld_door_hopseed"); + stack = new ItemStack(Item.getItemFromBlock(NaturaOverworld.sakuraDoor), 1, NaturaOverworld.sakuraDoor.getMetaFromState(NaturaOverworld.sakuraDoor.getDefaultState().withProperty(BlockDoor.FACING, EnumFacing.EAST).withProperty(BlockDoor.OPEN, Boolean.valueOf(false)).withProperty(BlockDoor.HINGE, BlockDoor.EnumHingePosition.LEFT).withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER))); + this.registerItemModelNatura(stack, "overworld_door_sakura"); + stack = new ItemStack(Item.getItemFromBlock(NaturaOverworld.redwoodDoor), 1, NaturaOverworld.redwoodDoor.getMetaFromState(NaturaOverworld.redwoodDoor.getDefaultState().withProperty(BlockDoor.FACING, EnumFacing.EAST).withProperty(BlockDoor.OPEN, Boolean.valueOf(false)).withProperty(BlockDoor.HINGE, BlockDoor.EnumHingePosition.LEFT).withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER))); + this.registerItemModelNatura(stack, "overworld_door_redwood"); + stack = new ItemStack(Item.getItemFromBlock(NaturaOverworld.redwoodBarkDoor), 1, NaturaOverworld.redwoodBarkDoor.getMetaFromState(NaturaOverworld.redwoodBarkDoor.getDefaultState().withProperty(BlockDoor.FACING, EnumFacing.EAST).withProperty(BlockDoor.OPEN, Boolean.valueOf(false)).withProperty(BlockDoor.HINGE, BlockDoor.EnumHingePosition.LEFT).withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER))); + this.registerItemModelNatura(stack, "overworld_door_redwood_bark"); + + registerItemModel(NaturaOverworld.saguaro); + + Item saguaro_baby = Item.getItemFromBlock(NaturaOverworld.saguaroBaby); + for (int meta = 0; meta <= 1; meta++) + { + String variant = String.format("%s=%s", BlockSaguaroBaby.AGE.getName(), Integer.valueOf(meta)); + ModelLoader.setCustomModelResourceLocation(saguaro_baby, meta, new ModelResourceLocation(saguaro_baby.getRegistryName(), variant)); + } + + registerItemModel(NaturaOverworld.saguaroFruit); + + registerItemModel(NaturaOverworld.saguaroFruitItem); + + NaturaOverworld.overworldSeeds.registerItemModels(); + NaturaOverworld.overworldSeedBags.registerItemModels(); + NaturaOverworld.overworldDoors.registerItemModels(); } } diff --git a/src/main/java/com/progwml6/natura/overworld/block/crops/BlockNaturaBarley.java b/src/main/java/com/progwml6/natura/overworld/block/crops/BlockNaturaBarley.java new file mode 100644 index 00000000..5566329e --- /dev/null +++ b/src/main/java/com/progwml6/natura/overworld/block/crops/BlockNaturaBarley.java @@ -0,0 +1,50 @@ +package com.progwml6.natura.overworld.block.crops; + +import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.shared.NaturaCommons; + +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.item.ItemStack; + +public class BlockNaturaBarley extends BlockOverworldCrops +{ + public final static PropertyInteger AGE = PropertyInteger.create("age", 0, 3); + + public BlockNaturaBarley() + { + super(); + } + + @Override + protected PropertyInteger getAgeProperty() + { + return AGE; + } + + @Override + public int getMaxAge() + { + return 3; + } + + @Override + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, new IProperty[] { AGE }); + } + + @Override + protected ItemStack getSeed() + { + return NaturaOverworld.barley_seeds.copy(); + } + + @Override + protected ItemStack getCrop() + { + return NaturaCommons.barley.copy(); + } + +} diff --git a/src/main/java/com/progwml6/natura/overworld/block/crops/BlockNaturaCotton.java b/src/main/java/com/progwml6/natura/overworld/block/crops/BlockNaturaCotton.java new file mode 100644 index 00000000..66903244 --- /dev/null +++ b/src/main/java/com/progwml6/natura/overworld/block/crops/BlockNaturaCotton.java @@ -0,0 +1,50 @@ +package com.progwml6.natura.overworld.block.crops; + +import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.shared.NaturaCommons; + +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.item.ItemStack; + +public class BlockNaturaCotton extends BlockOverworldCrops +{ + public final static PropertyInteger AGE = PropertyInteger.create("age", 0, 4); + + public BlockNaturaCotton() + { + super(); + } + + @Override + protected PropertyInteger getAgeProperty() + { + return AGE; + } + + @Override + public int getMaxAge() + { + return 4; + } + + @Override + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, new IProperty[] { AGE }); + } + + @Override + protected ItemStack getSeed() + { + return NaturaOverworld.cotton_seeds.copy(); + } + + @Override + protected ItemStack getCrop() + { + return NaturaCommons.cotton.copy(); + } + +} diff --git a/src/main/java/com/progwml6/natura/overworld/block/crops/BlockOverworldCrops.java b/src/main/java/com/progwml6/natura/overworld/block/crops/BlockOverworldCrops.java index 3720e6ae..e9c8cd02 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/crops/BlockOverworldCrops.java +++ b/src/main/java/com/progwml6/natura/overworld/block/crops/BlockOverworldCrops.java @@ -8,13 +8,10 @@ import net.minecraft.block.BlockBush; import net.minecraft.block.IGrowable; import net.minecraft.block.SoundType; -import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyInteger; -import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.math.AxisAlignedBB; @@ -23,12 +20,8 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -public class BlockOverworldCrops extends BlockBush implements IGrowable +public abstract class BlockOverworldCrops extends BlockBush implements IGrowable { - public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 7); - - private static final AxisAlignedBB[] CROPS_AABB = new AxisAlignedBB[] { new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.125D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.25D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.375D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.75D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.875D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D) }; - protected BlockOverworldCrops() { this.setDefaultState(this.blockState.getBaseState().withProperty(this.getAgeProperty(), Integer.valueOf(0))); @@ -42,7 +35,7 @@ protected BlockOverworldCrops() @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { - return CROPS_AABB[state.getValue(this.getAgeProperty()).intValue()]; + return new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.25D, 1.0D); } /** @@ -54,15 +47,9 @@ protected boolean canSustainBush(IBlockState state) return state.getBlock() == Blocks.FARMLAND; } - protected PropertyInteger getAgeProperty() - { - return AGE; - } + protected abstract PropertyInteger getAgeProperty(); - public int getMaxAge() - { - return 7; - } + public abstract int getMaxAge(); protected int getAge(IBlockState state) { @@ -180,15 +167,9 @@ public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state) return (worldIn.getLight(pos) >= 8 || worldIn.canSeeSky(pos)) && soil.getBlock().canSustainPlant(soil, worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this); } - protected Item getSeed() - { - return Items.WHEAT_SEEDS; - } + protected abstract ItemStack getSeed(); - protected Item getCrop() - { - return Items.WHEAT; - } + protected abstract ItemStack getCrop(); @Override public java.util.List getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune) @@ -203,7 +184,7 @@ public java.util.List getDrops(net.minecraft.world.IBlockAccess world { if (rand.nextInt(2 * this.getMaxAge()) <= age) { - ret.add(new ItemStack(this.getSeed(), 1, 0)); + ret.add(this.getSeed()); } } } @@ -226,13 +207,19 @@ public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState s @Nullable public Item getItemDropped(IBlockState state, Random rand, int fortune) { - return this.isMaxAge(state) ? this.getCrop() : this.getSeed(); + return this.isMaxAge(state) ? this.getCrop().getItem() : this.getSeed().getItem(); } @Override public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) { - return new ItemStack(this.getSeed()); + return this.getSeed(); + } + + @Override + public int damageDropped(IBlockState state) + { + return this.isMaxAge(state) ? this.getCrop().getMetadata() : this.getSeed().getMetadata(); } /** @@ -273,10 +260,4 @@ public int getMetaFromState(IBlockState state) { return this.getAge(state); } - - @Override - protected BlockStateContainer createBlockState() - { - return new BlockStateContainer(this, new IProperty[] { AGE }); - } } diff --git a/src/main/java/com/progwml6/natura/overworld/block/flower/BlockBluebellsFlower.java b/src/main/java/com/progwml6/natura/overworld/block/flower/BlockBluebellsFlower.java new file mode 100644 index 00000000..42a5795f --- /dev/null +++ b/src/main/java/com/progwml6/natura/overworld/block/flower/BlockBluebellsFlower.java @@ -0,0 +1,16 @@ +package com.progwml6.natura.overworld.block.flower; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.BlockBush; +import net.minecraft.block.SoundType; + +public class BlockBluebellsFlower extends BlockBush +{ + public BlockBluebellsFlower() + { + super(); + this.setSoundType(SoundType.PLANT); + this.setCreativeTab(NaturaRegistry.tabWorld); + } +} diff --git a/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockOverworldLeaves.java b/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockOverworldLeaves.java index 2ccc9eee..1b2c0fbc 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockOverworldLeaves.java +++ b/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockOverworldLeaves.java @@ -94,30 +94,6 @@ public Item getItemDropped(IBlockState state, Random rand, int fortune) @Override protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance) { - /**if (worldIn.rand.nextInt(chance) == 0) - { - ItemStack stack = null; - if (state.getValue(BlockOverworldLog.TYPE) == FoliageType.PURPLE) - { - stack = TinkerCommons.matSlimeBallPurple.copy(); - } - else if (state.getValue(BlockOverworldLog.TYPE) == FoliageType.BLUE) - { - if (worldIn.rand.nextInt(3) == 0) - { - stack = TinkerCommons.matSlimeBallBlue.copy(); - } - else - { - stack = new ItemStack(Items.SLIME_BALL); - } - } - - if (stack != null) - { - spawnAsEntity(worldIn, pos, stack); - } - }*/ } // sapling meta diff --git a/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockOverworldLeaves2.java b/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockOverworldLeaves2.java index c4570e42..8fd71272 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockOverworldLeaves2.java +++ b/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockOverworldLeaves2.java @@ -94,30 +94,6 @@ public Item getItemDropped(IBlockState state, Random rand, int fortune) @Override protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance) { - /**if (worldIn.rand.nextInt(chance) == 0) - { - ItemStack stack = null; - if (state.getValue(BlockOverworldLog.TYPE) == FoliageType.PURPLE) - { - stack = TinkerCommons.matSlimeBallPurple.copy(); - } - else if (state.getValue(BlockOverworldLog.TYPE) == FoliageType.BLUE) - { - if (worldIn.rand.nextInt(3) == 0) - { - stack = TinkerCommons.matSlimeBallBlue.copy(); - } - else - { - stack = new ItemStack(Items.SLIME_BALL); - } - } - - if (stack != null) - { - spawnAsEntity(worldIn, pos, stack); - } - }*/ } // sapling meta diff --git a/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockRedwoodLeaves.java b/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockRedwoodLeaves.java index b01df376..a544a38c 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockRedwoodLeaves.java +++ b/src/main/java/com/progwml6/natura/overworld/block/leaves/BlockRedwoodLeaves.java @@ -137,30 +137,6 @@ public Item getItemDropped(IBlockState state, Random rand, int fortune) @Override protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance) { - /**if (worldIn.rand.nextInt(chance) == 0) - { - ItemStack stack = null; - if (state.getValue(BlockOverworldLog.TYPE) == FoliageType.PURPLE) - { - stack = TinkerCommons.matSlimeBallPurple.copy(); - } - else if (state.getValue(BlockOverworldLog.TYPE) == FoliageType.BLUE) - { - if (worldIn.rand.nextInt(3) == 0) - { - stack = TinkerCommons.matSlimeBallBlue.copy(); - } - else - { - stack = new ItemStack(Items.SLIME_BALL); - } - } - - if (stack != null) - { - spawnAsEntity(worldIn, pos, stack); - } - }*/ } // sapling meta diff --git a/src/main/java/com/progwml6/natura/overworld/block/saguaro/BlockSaguaro.java b/src/main/java/com/progwml6/natura/overworld/block/saguaro/BlockSaguaro.java new file mode 100644 index 00000000..a91b2547 --- /dev/null +++ b/src/main/java/com/progwml6/natura/overworld/block/saguaro/BlockSaguaro.java @@ -0,0 +1,356 @@ +package com.progwml6.natura.overworld.block.saguaro; + +import java.util.List; +import java.util.Random; + +import javax.annotation.Nullable; + +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.overworld.NaturaOverworld; + +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyBool; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.init.Blocks; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +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.common.EnumPlantType; +import net.minecraftforge.common.IPlantable; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class BlockSaguaro extends Block implements IPlantable +{ + //@formatter:off + /** Whether this cactus connects in the northern direction */ + public static final PropertyBool NORTH = PropertyBool.create("north"); + /** Whether this cactus connects in the eastern direction */ + public static final PropertyBool EAST = PropertyBool.create("east"); + /** Whether this cactus connects in the southern direction */ + public static final PropertyBool SOUTH = PropertyBool.create("south"); + /** Whether this cactus connects in the western direction */ + public static final PropertyBool WEST = PropertyBool.create("west"); + /** Whether this cactus connects in the upper direction */ + public static final PropertyBool UP = PropertyBool.create("up"); + /** Whether this cactus connects in the lower direction */ + public static final PropertyBool DOWN = PropertyBool.create("down"); + + public static final AxisAlignedBB BASE_AABB = new AxisAlignedBB(0.125D, 0.0D, 0.125D, 0.875D, 0.875D, 0.875D); + public static final AxisAlignedBB NORMAL_BOUNDING_BOX = new AxisAlignedBB(0.125D, 0.0D, 0.125D, 0.875D, 0.875D, 0.875D); + public static final AxisAlignedBB UP_BOUNDING_BOX = new AxisAlignedBB(0.125D, 0.0D, 0.125D, 0.875D, 1.0D, 0.875D); + + // TODO: Redo bounding boxes + /*protected static final AxisAlignedBB[] BOUNDING_BOXES = new AxisAlignedBB[] { + new AxisAlignedBB(0.125D, 0.0D, 0.125D, 0.875D, 0.875D, 0.875D), + new AxisAlignedBB(0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 1.0D), + new AxisAlignedBB(0.0D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D), + new AxisAlignedBB(0.0D, 0.0D, 0.375D, 0.625D, 1.0D, 1.0D), + new AxisAlignedBB(0.375D, 0.0D, 0.0D, 0.625D, 1.0D, 0.625D), + new AxisAlignedBB(0.375D, 0.0D, 0.0D, 0.625D, 1.0D, 1.0D), + new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.625D, 1.0D, 0.625D), + new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.625D, 1.0D, 1.0D), + new AxisAlignedBB(0.375D, 0.0D, 0.375D, 1.0D, 1.0D, 0.625D), + new AxisAlignedBB(0.375D, 0.0D, 0.375D, 1.0D, 1.0D, 1.0D), + new AxisAlignedBB(0.0D, 0.0D, 0.375D, 1.0D, 1.0D, 0.625D), + new AxisAlignedBB(0.0D, 0.0D, 0.375D, 1.0D, 1.0D, 1.0D), + new AxisAlignedBB(0.375D, 0.0D, 0.0D, 1.0D, 1.0D, 0.625D), + new AxisAlignedBB(0.375D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D), + new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.625D), + new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D) + }; + public static final AxisAlignedBB BASE_AABB = new AxisAlignedBB(0.125D, 0.0D, 0.125D, 0.875D, 0.875D, 0.875D); + public static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.375D, 0.0D, 0.625D, 0.625D, 1.5D, 1.0D); + public static final AxisAlignedBB WEST_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.375D, 0.375D, 1.5D, 0.625D); + public static final AxisAlignedBB NORTH_AABB = new AxisAlignedBB(0.375D, 0.0D, 0.0D, 0.625D, 1.5D, 0.375D); + public static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(0.625D, 0.0D, 0.375D, 1.0D, 1.5D, 0.625D); + public static final AxisAlignedBB UP_AABB = new AxisAlignedBB(0.625D, 0.0D, 0.375D, 1.0D, 1.5D, 0.625D); + public static final AxisAlignedBB DOWN_AABB = new AxisAlignedBB(0.625D, 0.0D, 0.375D, 1.0D, 1.5D, 0.625D);*/ + //@formatter:on + + public BlockSaguaro() + { + super(Material.CACTUS); + + this.setDefaultState(this.blockState.getBaseState().withProperty(NORTH, false).withProperty(EAST, false).withProperty(SOUTH, false).withProperty(WEST, false).withProperty(UP, false)); + + this.setSoundType(SoundType.CLOTH); + this.setHardness(0.3f); + this.setTickRandomly(true); + this.setCreativeTab(NaturaRegistry.tabWorld); + } + + @Override + public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_) + { + if (!p_185477_7_) + { + state = state.getActualState(worldIn, pos); + } + + addCollisionBoxToList(pos, entityBox, collidingBoxes, BASE_AABB); + + // TODO: Redo bounding boxes + /* + if (state.getValue(NORTH).booleanValue()) + { + addCollisionBoxToList(pos, entityBox, collidingBoxes, NORTH_AABB); + } + + if (state.getValue(EAST).booleanValue()) + { + addCollisionBoxToList(pos, entityBox, collidingBoxes, EAST_AABB); + } + + if (state.getValue(SOUTH).booleanValue()) + { + addCollisionBoxToList(pos, entityBox, collidingBoxes, SOUTH_AABB); + } + + if (state.getValue(WEST).booleanValue()) + { + addCollisionBoxToList(pos, entityBox, collidingBoxes, WEST_AABB); + } + + if (state.getValue(UP).booleanValue()) + { + addCollisionBoxToList(pos, entityBox, collidingBoxes, UP_AABB); + } + + if (state.getValue(DOWN).booleanValue()) + { + addCollisionBoxToList(pos, entityBox, collidingBoxes, DOWN_AABB); + }*/ + } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { + state = this.getActualState(state, source, pos); + + if (state.getValue(UP).booleanValue()) + { + return UP_BOUNDING_BOX; + } + else + { + return NORMAL_BOUNDING_BOX; + } + + // TODO: Redo bounding boxes + //state = this.getActualState(state, source, pos); + //return BOUNDING_BOXES[getBoundingBoxIdx(state)]; + } + + // TODO: Redo bounding boxes + /** + * Returns the correct index into boundingBoxes, based on what the cactus is connected to. + */ + /* + private static int getBoundingBoxIdx(IBlockState state) + { + int i = 0; + + if (state.getValue(NORTH).booleanValue()) + { + i |= 1 << EnumFacing.NORTH.getHorizontalIndex(); + } + + if (state.getValue(EAST).booleanValue()) + { + i |= 1 << EnumFacing.EAST.getHorizontalIndex(); + } + + if (state.getValue(SOUTH).booleanValue()) + { + i |= 1 << EnumFacing.SOUTH.getHorizontalIndex(); + } + + if (state.getValue(WEST).booleanValue()) + { + i |= 1 << EnumFacing.WEST.getHorizontalIndex(); + } + + if (state.getValue(UP).booleanValue()) + { + i |= 1 << 4; // TEMP FIX FOR UP + } + + return i; + }*/ + + /** + * Used to determine ambient occlusion and culling when rebuilding chunks for render + */ + @Override + public boolean isOpaqueCube(IBlockState state) + { + return false; + } + + @Override + public boolean isFullCube(IBlockState state) + { + return false; + } + + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + Block block = iblockstate.getBlock(); + + return block == Blocks.BARRIER ? false : ((!(block instanceof BlockSaguaro) || iblockstate.getMaterial() != this.blockMaterial) ? (iblockstate.getMaterial().isOpaque() && iblockstate.isFullCube() ? iblockstate.getMaterial() != Material.GOURD : false) : true); + } + + @Override + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) + { + return true; + } + + /** + * Convert the BlockState into the correct metadata value + */ + @Override + public int getMetaFromState(IBlockState state) + { + return 0; + } + + /** + * Get the actual Block state of this Block at the given position. This applies properties not visible in the + * metadata, such as cactus connections. + */ + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + return state.withProperty(NORTH, this.canConnectTo(worldIn, pos.north())).withProperty(EAST, this.canConnectTo(worldIn, pos.east())).withProperty(SOUTH, this.canConnectTo(worldIn, pos.south())).withProperty(WEST, this.canConnectTo(worldIn, pos.west())).withProperty(UP, this.canConnectTo(worldIn, pos.up())).withProperty(DOWN, this.canConnectTo(worldIn, pos.down())); + } + + /** + * Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed + * blockstate. + */ + @Override + public IBlockState withRotation(IBlockState state, Rotation rot) + { + switch (rot) + { + case CLOCKWISE_180: + return state.withProperty(NORTH, state.getValue(SOUTH)).withProperty(EAST, state.getValue(WEST)).withProperty(SOUTH, state.getValue(NORTH)).withProperty(WEST, state.getValue(EAST)).withProperty(UP, state.getValue(UP)).withProperty(DOWN, state.getValue(DOWN)); + case COUNTERCLOCKWISE_90: + return state.withProperty(NORTH, state.getValue(EAST)).withProperty(EAST, state.getValue(SOUTH)).withProperty(SOUTH, state.getValue(WEST)).withProperty(WEST, state.getValue(NORTH)).withProperty(UP, state.getValue(UP)).withProperty(DOWN, state.getValue(DOWN)); + case CLOCKWISE_90: + return state.withProperty(NORTH, state.getValue(WEST)).withProperty(EAST, state.getValue(NORTH)).withProperty(SOUTH, state.getValue(EAST)).withProperty(WEST, state.getValue(SOUTH)).withProperty(UP, state.getValue(UP)).withProperty(DOWN, state.getValue(DOWN)); + default: + return state; + } + } + + /** + * Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed + * blockstate. + */ + @SuppressWarnings("deprecation") + @Override + public IBlockState withMirror(IBlockState state, Mirror mirrorIn) + { + switch (mirrorIn) + { + case LEFT_RIGHT: + return state.withProperty(NORTH, state.getValue(SOUTH)).withProperty(SOUTH, state.getValue(NORTH)).withProperty(UP, state.getValue(UP)).withProperty(DOWN, state.getValue(DOWN)); + case FRONT_BACK: + return state.withProperty(EAST, state.getValue(WEST)).withProperty(WEST, state.getValue(EAST)).withProperty(UP, state.getValue(UP)).withProperty(DOWN, state.getValue(DOWN)); + default: + return super.withMirror(state, mirrorIn); + } + } + + @Override + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, new IProperty[] { NORTH, EAST, WEST, SOUTH, UP, DOWN }); + } + + @Override + public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) + { + if (worldIn.getWorldInfo().isRaining() && rand.nextInt(20) == 0 && worldIn.isAirBlock(pos.up())) + { + switch (rand.nextInt(4)) + { + case 0: + if (worldIn.isAirBlock(pos.north())) + { + worldIn.setBlockState(pos.north(), NaturaOverworld.saguaroFruit.getDefaultState().withProperty(BlockSaguaroFruit.FACING, EnumFacing.SOUTH), 3); + } + break; + case 1: + if (worldIn.isAirBlock(pos.east())) + { + worldIn.setBlockState(pos.east(), NaturaOverworld.saguaroFruit.getDefaultState().withProperty(BlockSaguaroFruit.FACING, EnumFacing.WEST), 3); + } + break; + case 2: + if (worldIn.isAirBlock(pos.south())) + { + worldIn.setBlockState(pos.south(), NaturaOverworld.saguaroFruit.getDefaultState().withProperty(BlockSaguaroFruit.FACING, EnumFacing.NORTH), 3); + } + break; + case 3: + if (worldIn.isAirBlock(pos.west())) + { + worldIn.setBlockState(pos.west(), NaturaOverworld.saguaroFruit.getDefaultState().withProperty(BlockSaguaroFruit.FACING, EnumFacing.EAST), 3); + } + break; + } + } + } + + @Override + public boolean canPlaceBlockAt(World worldIn, BlockPos pos) + { + return super.canPlaceBlockAt(worldIn, pos) ? this.canBlockStay(worldIn, pos) : false; + } + + public boolean canBlockStay(World worldIn, BlockPos pos) + { + IBlockState state = worldIn.getBlockState(pos.down()); + Block block = state.getBlock(); + + return block == this || block == Blocks.SAND || block == null; + } + + @Override + public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) + { + if (!(entityIn instanceof EntityItem)) + { + entityIn.attackEntityFrom(DamageSource.CACTUS, 1.0F); + } + } + + @Override + public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos) + { + return EnumPlantType.Desert; + } + + @Override + public IBlockState getPlant(IBlockAccess world, BlockPos pos) + { + return getDefaultState(); + } +} diff --git a/src/main/java/com/progwml6/natura/overworld/block/saguaro/BlockSaguaroBaby.java b/src/main/java/com/progwml6/natura/overworld/block/saguaro/BlockSaguaroBaby.java new file mode 100644 index 00000000..77294f00 --- /dev/null +++ b/src/main/java/com/progwml6/natura/overworld/block/saguaro/BlockSaguaroBaby.java @@ -0,0 +1,168 @@ +package com.progwml6.natura.overworld.block.saguaro; + +import java.util.Random; + +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.world.worldgen.saguaro.SaguaroGenerator; + +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.init.Blocks; +import net.minecraft.util.DamageSource; +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.common.EnumPlantType; +import net.minecraftforge.common.IPlantable; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class BlockSaguaroBaby extends Block implements IPlantable +{ + public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 1); + + protected static final AxisAlignedBB SAGUARO_COLLISION_AABB = new AxisAlignedBB(0.325D, 0.0D, 0.325D, 0.675D, 0.675D, 0.675D); + + protected static final AxisAlignedBB SAGUARO_BABY_AABB = new AxisAlignedBB(0.325D, 0.0D, 0.325D, 0.675D, 0.5D, 0.675D); + + public BlockSaguaroBaby() + { + super(Material.CACTUS); + + this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, 0)); + + this.setSoundType(SoundType.CLOTH); + this.setHardness(0.3f); + this.setTickRandomly(true); + this.setCreativeTab(NaturaRegistry.tabWorld); + } + + @Override + public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos) + { + return SAGUARO_COLLISION_AABB; + } + + /** + * Return an AABB (in world coords!) that should be highlighted when the player is targeting this Block + */ + @Override + @SideOnly(Side.CLIENT) + public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World worldIn, BlockPos pos) + { + return SAGUARO_BABY_AABB.offset(pos); + } + + @Override + public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) + { + int age = state.getValue(AGE).intValue(); + + if (age == 0 && rand.nextInt(200) == 0) + { + worldIn.setBlockState(pos, state.withProperty(AGE, age + 1), 3); + } + else if (age == 1 && rand.nextInt(200) == 0) + { + SaguaroGenerator gen = new SaguaroGenerator(NaturaOverworld.saguaro.getDefaultState(), true, true); + gen.generateSaguaro(rand, worldIn, pos); + } + } + + @Override + public boolean isFullCube(IBlockState state) + { + return false; + } + + /** + * Used to determine ambient occlusion and culling when rebuilding chunks for render + */ + @Override + public boolean isOpaqueCube(IBlockState state) + { + return false; + } + + @Override + public boolean canPlaceBlockAt(World worldIn, BlockPos pos) + { + return super.canPlaceBlockAt(worldIn, pos) ? this.canBlockStay(worldIn, pos) : false; + } + + /** + * Called when a neighboring block was changed and marks that this state should perform any checks during a neighbor + * change. Cases may include when redstone power is updated, cactus blocks popping off due to a neighboring solid + * block, etc. + */ + @Override + public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos) + { + if (!this.canBlockStay(worldIn, pos)) + { + worldIn.destroyBlock(pos, true); + } + } + + public boolean canBlockStay(World worldIn, BlockPos pos) + { + IBlockState state = worldIn.getBlockState(pos.down()); + Block block = state.getBlock(); + + return block == this || block == Blocks.SAND || block == null; + } + + @Override + public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) + { + if (!(entityIn instanceof EntityItem)) + { + entityIn.attackEntityFrom(DamageSource.CACTUS, 1.0F); + } + } + + /** + * Convert the given metadata into a BlockState for this Block + */ + @Override + public IBlockState getStateFromMeta(int meta) + { + return this.getDefaultState().withProperty(AGE, meta); + } + + /** + * Convert the BlockState into the correct metadata value + */ + @Override + public int getMetaFromState(IBlockState state) + { + return (state.getValue(AGE)).intValue(); + } + + @Override + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, new IProperty[] { AGE }); + } + + @Override + public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos) + { + return EnumPlantType.Desert; + } + + @Override + public IBlockState getPlant(IBlockAccess world, BlockPos pos) + { + return getDefaultState(); + } +} diff --git a/src/main/java/com/progwml6/natura/overworld/block/saguaro/BlockSaguaroFruit.java b/src/main/java/com/progwml6/natura/overworld/block/saguaro/BlockSaguaroFruit.java new file mode 100644 index 00000000..2f8dc88a --- /dev/null +++ b/src/main/java/com/progwml6/natura/overworld/block/saguaro/BlockSaguaroFruit.java @@ -0,0 +1,152 @@ +package com.progwml6.natura.overworld.block.saguaro; + +import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.overworld.NaturaOverworld; + +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyDirection; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockSaguaroFruit extends Block +{ + //@formatter:off + public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); + + protected static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(0.625D, 0.1875D, 0.25D, 1.125D, 0.75D, 0.75D); + protected static final AxisAlignedBB WEST_AABB = new AxisAlignedBB(-0.125D, 0.1875D, 0.25D, 0.375D, 0.75D, 0.75D); + + protected static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.25D, 0.1875D, 0.625D, 0.75D, 0.75D, 1.125D); + protected static final AxisAlignedBB NORTH_AABB = new AxisAlignedBB(0.25D, 0.1875D, -0.125D, 0.75D, 0.75D, 0.375D); + //@formatter:on + + public BlockSaguaroFruit() + { + super(Material.CACTUS); + this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); + this.setSoundType(SoundType.CLOTH); + this.setHardness(0.3f); + this.setCreativeTab(NaturaRegistry.tabWorld); + } + + /** + * Called by ItemBlocks after a block is set in the world, to allow post-place logic + */ + @Override + public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) + { + EnumFacing enumfacing = EnumFacing.fromAngle(placer.rotationYaw); + worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2); + } + + /** + * Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the + * IBlockstate + */ + @Override + public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) + { + if (!facing.getAxis().isHorizontal()) + { + facing = EnumFacing.NORTH; + } + + return this.getDefaultState().withProperty(FACING, facing.getOpposite()); + } + + @Override + public boolean isFullCube(IBlockState state) + { + return false; + } + + /** + * Used to determine ambient occlusion and culling when rebuilding chunks for render + */ + @Override + public boolean isOpaqueCube(IBlockState state) + { + return false; + } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { + switch (state.getValue(FACING)) + { + case SOUTH: + return SOUTH_AABB; + case NORTH: + default: + return NORTH_AABB; + case WEST: + return WEST_AABB; + case EAST: + return EAST_AABB; + } + } + + @Override + public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) + { + return new ItemStack(NaturaOverworld.saguaroFruitItem, 1); + } + + /** + * Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed + * blockstate. + */ + @Override + public IBlockState withRotation(IBlockState state, Rotation rot) + { + return state.withProperty(FACING, rot.rotate(state.getValue(FACING))); + } + + /** + * Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed + * blockstate. + */ + @Override + public IBlockState withMirror(IBlockState state, Mirror mirrorIn) + { + return state.withRotation(mirrorIn.toRotation(state.getValue(FACING))); + } + + /** + * Convert the given metadata into a BlockState for this Block + */ + @Override + public IBlockState getStateFromMeta(int meta) + { + return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta)); + } + + /** + * Convert the BlockState into the correct metadata value + */ + @Override + public int getMetaFromState(IBlockState state) + { + int i = 0; + i = i | state.getValue(FACING).getHorizontalIndex(); + return i; + } + + @Override + protected BlockStateContainer createBlockState() + { + return new BlockStateContainer(this, new IProperty[] { FACING }); + } +} diff --git a/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockOverworldSapling.java b/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockOverworldSapling.java index 3694722a..e0c64777 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockOverworldSapling.java +++ b/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockOverworldSapling.java @@ -43,7 +43,7 @@ public BlockOverworldSapling() } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, @Nonnull NonNullList list) + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { for (SaplingType type : SaplingType.values()) { @@ -130,28 +130,28 @@ public void generateTree(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull log = NaturaOverworld.overworldLog.getDefaultState().withProperty(BlockOverworldLog.TYPE, BlockOverworldLog.LogType.MAPLE); leaves = NaturaOverworld.overworldLeaves.getDefaultState().withProperty(BlockOverworldLog.TYPE, BlockOverworldLog.LogType.MAPLE); - gen = new OverworldTreeGenerator(4, 2, log, leaves); + gen = new OverworldTreeGenerator(4, 2, log, leaves, true, true); break; case SILVERBELL: log = NaturaOverworld.overworldLog.getDefaultState().withProperty(BlockOverworldLog.TYPE, BlockOverworldLog.LogType.SILVERBELL); leaves = NaturaOverworld.overworldLeaves.getDefaultState().withProperty(BlockOverworldLog.TYPE, BlockOverworldLog.LogType.SILVERBELL); - gen = new OverworldTreeGenerator(4, 2, log, leaves); + gen = new OverworldTreeGenerator(4, 2, log, leaves, true, true); break; case AMARANTH: log = NaturaOverworld.overworldLog.getDefaultState().withProperty(BlockOverworldLog.TYPE, BlockOverworldLog.LogType.AMARANTH); leaves = NaturaOverworld.overworldLeaves.getDefaultState().withProperty(BlockOverworldLog.TYPE, BlockOverworldLog.LogType.AMARANTH); - gen = new OverworldTreeGenerator(9, 8, log, leaves); + gen = new OverworldTreeGenerator(9, 8, log, leaves, true, true); break; case TIGER: log = NaturaOverworld.overworldLog.getDefaultState().withProperty(BlockOverworldLog.TYPE, BlockOverworldLog.LogType.TIGER); leaves = NaturaOverworld.overworldLeaves.getDefaultState().withProperty(BlockOverworldLog.TYPE, BlockOverworldLog.LogType.TIGER); - gen = new OverworldTreeGenerator(6, 4, log, leaves); + gen = new OverworldTreeGenerator(6, 4, log, leaves, true, true); break; default: diff --git a/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockOverworldSapling2.java b/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockOverworldSapling2.java index c6c84c0c..b60c6fe6 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockOverworldSapling2.java +++ b/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockOverworldSapling2.java @@ -46,7 +46,7 @@ public BlockOverworldSapling2() } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, @Nonnull NonNullList list) + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { for (SaplingType type : SaplingType.values()) { @@ -133,7 +133,7 @@ public void generateTree(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull log = NaturaOverworld.overworldLog2.getDefaultState().withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.WILLOW); leaves = NaturaOverworld.overworldLeaves2.getDefaultState().withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.WILLOW); - gen = new WillowTreeGenerator(4, 5, log, leaves); + gen = new WillowTreeGenerator(4, 5, log, leaves, true, true); break; case EUCALYPTUS: @@ -147,14 +147,14 @@ public void generateTree(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull log = NaturaOverworld.overworldLog2.getDefaultState().withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.HOPSEED); leaves = NaturaOverworld.overworldLeaves2.getDefaultState().withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.HOPSEED); - gen = new HopseedTreeGenerator(2, 3, log, leaves); + gen = new HopseedTreeGenerator(2, 3, log, leaves, true, true); break; case SAKURA: log = NaturaOverworld.overworldLog2.getDefaultState().withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.SAKURA); leaves = NaturaOverworld.overworldLeaves2.getDefaultState().withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.SAKURA); - gen = new SakuraTreeGenerator(log, leaves, false); + gen = new SakuraTreeGenerator(log, leaves, false, true); break; default: diff --git a/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockRedwoodSapling.java b/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockRedwoodSapling.java index 6403af80..9902d2c5 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockRedwoodSapling.java +++ b/src/main/java/com/progwml6/natura/overworld/block/saplings/BlockRedwoodSapling.java @@ -5,7 +5,13 @@ import javax.annotation.Nonnull; +import com.progwml6.natura.Natura; import com.progwml6.natura.library.NaturaRegistry; +import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.overworld.block.leaves.BlockRedwoodLeaves; +import com.progwml6.natura.overworld.block.logs.BlockRedwoodLog; +import com.progwml6.natura.world.worldgen.trees.BaseTreeGenerator; +import com.progwml6.natura.world.worldgen.trees.overworld.RedwoodTreeGenerator; import net.minecraft.block.BlockSapling; import net.minecraft.block.SoundType; @@ -38,7 +44,7 @@ public BlockRedwoodSapling() } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, @Nonnull NonNullList list) + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { for (SaplingType type : SaplingType.values()) { @@ -111,39 +117,31 @@ public ItemStack getPickBlock(@Nonnull IBlockState state, RayTraceResult target, @Override public void generateTree(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull Random rand) { - /* - TODO: FIX REDWOOD if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(worldIn, rand, pos)) { return; } - + BaseTreeGenerator gen = new BaseTreeGenerator(); - - IBlockState log; + + IBlockState bark; + IBlockState heart; + IBlockState root; IBlockState leaves; - - int x = 0; - int z = 0; - boolean correctNumber = false; - + switch (state.getValue(FOLIAGE)) { case REDWOOD: int numSaplings = this.checkRedwoodSaplings(worldIn, pos); - + + bark = NaturaOverworld.redwoodLog.getDefaultState().withProperty(BlockRedwoodLog.TYPE, BlockRedwoodLog.RedwoodType.BARK); + heart = NaturaOverworld.redwoodLog.getDefaultState().withProperty(BlockRedwoodLog.TYPE, BlockRedwoodLog.RedwoodType.HEART); + root = NaturaOverworld.redwoodLog.getDefaultState().withProperty(BlockRedwoodLog.TYPE, BlockRedwoodLog.RedwoodType.ROOT); + leaves = NaturaOverworld.redwoodLeaves.getDefaultState().withProperty(BlockRedwoodLeaves.TYPE, BlockRedwoodLeaves.RedwoodType.NORMAL); + if (numSaplings >= 40) { - for (x = -4; x <= 4; x++) - { - for (z = -4; z <= 4; z++) - { - if (this.isRedwoodComplete(worldIn, pos.add(x, 0, z), SaplingType.REDWOOD)) - { - worldIn.setBlockToAir(pos); - } - } - } + gen = new RedwoodTreeGenerator(bark, heart, root, leaves); break; } break; @@ -151,50 +149,17 @@ public void generateTree(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull Natura.log.warn("BlockRedwoodSapling Warning: Invalid sapling meta/foliage, " + state.getValue(FOLIAGE) + ". Please report!"); break; } - + // replace saplings with air - for (x = -4; x <= 4; x++) - { - for (z = -4; z <= 4; z++) - { - if (this.isRedwoodComplete(worldIn, pos.add(x, 0, z), SaplingType.REDWOOD)) - { - worldIn.setBlockToAir(pos.add(x, 0, z)); - } - System.out.println(pos.add(x, 0, z)); - } - } - + worldIn.setBlockToAir(pos); + // try generating gen.generateTree(rand, worldIn, pos); - - // check if it generated - for (x = -4; x <= 4; x++) + + if (worldIn.isAirBlock(pos)) { - for (z = -4; z <= 4; z++) - { - if (worldIn.isAirBlock(pos)) - { - worldIn.setBlockState(pos.add(x, 0, z), state, 4); - } - } + worldIn.setBlockState(pos, state, 4); } - - /*for (x = -4; x <= 4; x++) - { - for (z = -4; z <= 4; z++) - { - if (worldIn.isAirBlock(pos.add(x, 0, z))) - { - // nope, set sapling again - worldIn.setBlockState(pos.add(x, 0, z), state, 4); - } - } - }* - - System.out.println(state.getValue(FOLIAGE)); - System.out.println(state.getValue(STAGE));*/ - // TODO: FIX REDWOOD } /** diff --git a/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockColoredGrassSlab.java b/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockColoredGrassSlab.java index 85a86589..ee2986e4 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockColoredGrassSlab.java +++ b/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockColoredGrassSlab.java @@ -17,7 +17,7 @@ public BlockColoredGrassSlab() this.setHardness(0.6F); this.setSoundType(SoundType.PLANT); - this.setCreativeTab(NaturaRegistry.tabWorld); + this.setCreativeTab(NaturaRegistry.tabDecorative); } @Override diff --git a/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockOverworldSlab.java b/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockOverworldSlab.java index 883858bd..30547660 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockOverworldSlab.java +++ b/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockOverworldSlab.java @@ -27,7 +27,7 @@ public BlockOverworldSlab() this.setHardness(2.0F); this.setSoundType(SoundType.WOOD); - this.setCreativeTab(NaturaRegistry.tabWorld); + this.setCreativeTab(NaturaRegistry.tabDecorative); } @Override diff --git a/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockOverworldSlab2.java b/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockOverworldSlab2.java index 371f7c9b..3f9b1ec6 100644 --- a/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockOverworldSlab2.java +++ b/src/main/java/com/progwml6/natura/overworld/block/slabs/BlockOverworldSlab2.java @@ -27,7 +27,7 @@ public BlockOverworldSlab2() this.setHardness(2.0F); this.setSoundType(SoundType.WOOD); - this.setCreativeTab(NaturaRegistry.tabWorld); + this.setCreativeTab(NaturaRegistry.tabDecorative); } @Override diff --git a/src/main/java/com/progwml6/natura/overworld/item/ItemSaguaroFruit.java b/src/main/java/com/progwml6/natura/overworld/item/ItemSaguaroFruit.java new file mode 100644 index 00000000..acf870a1 --- /dev/null +++ b/src/main/java/com/progwml6/natura/overworld/item/ItemSaguaroFruit.java @@ -0,0 +1,92 @@ +package com.progwml6.natura.overworld.item; + +import java.util.List; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemSeedFood; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.translation.I18n; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import slimeknights.mantle.util.LocUtils; + +@SuppressWarnings("deprecation") +public class ItemSaguaroFruit extends ItemSeedFood +{ + public final Block crop; + + public ItemSaguaroFruit(int healAmount, float saturation, Block crop) + { + super(healAmount, saturation, crop, Blocks.FARMLAND); + + this.crop = crop; + this.setCreativeTab(NaturaRegistry.tabGeneral); + } + + @Override + public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if (facing != EnumFacing.UP) + { + return EnumActionResult.FAIL; + } + else + { + ItemStack itemstack = playerIn.getHeldItem(hand); + + if (playerIn.canPlayerEdit(pos, facing, itemstack) && playerIn.canPlayerEdit(pos.up(), facing, itemstack)) + { + IBlockState state = worldIn.getBlockState(pos); + Block block = state.getBlock(); + + if (block != null && block.canSustainPlant(state, worldIn, pos, EnumFacing.UP, (IPlantable) this.crop) && worldIn.isAirBlock(pos.up())) + { + worldIn.setBlockState(pos.up(), this.crop.getDefaultState()); + itemstack.shrink(1); + return EnumActionResult.SUCCESS; + } + } + else + { + return EnumActionResult.FAIL; + } + + return EnumActionResult.FAIL; + } + } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) + { + addOptionalTooltip(stack, tooltip); + super.addInformation(stack, playerIn, tooltip, advanced); + } + + public static void addOptionalTooltip(ItemStack stack, List tooltip) + { + if (I18n.canTranslate(stack.getUnlocalizedName() + ".tooltip")) + { + tooltip.addAll(LocUtils.getTooltips(TextFormatting.GRAY.toString() + + LocUtils.translateRecursive(stack.getUnlocalizedName() + ".tooltip"))); + } + else if (I18n.canTranslate(stack.getUnlocalizedName() + ".tooltip")) + { + tooltip.addAll(LocUtils.getTooltips( + TextFormatting.GRAY.toString() + LocUtils.translateRecursive(stack.getUnlocalizedName() + ".tooltip"))); + } + } + +} diff --git a/src/main/java/com/progwml6/natura/overworld/item/ItemSeeds.java b/src/main/java/com/progwml6/natura/overworld/item/ItemSeeds.java new file mode 100644 index 00000000..8a9b0adf --- /dev/null +++ b/src/main/java/com/progwml6/natura/overworld/item/ItemSeeds.java @@ -0,0 +1,94 @@ +package com.progwml6.natura.overworld.item; + +import gnu.trove.map.hash.TIntObjectHashMap; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.IPlantable; +import slimeknights.mantle.item.ItemMetaDynamic; + +public class ItemSeeds extends ItemMetaDynamic implements IPlantable +{ + protected TIntObjectHashMap states = new TIntObjectHashMap<>(); + + private static IBlockState crop; + + public ItemStack addMeta(int meta, String name, IBlockState state) + { + this.states.put(meta, state); + + crop = state; + + ItemStack ret = this.addMeta(meta, name); + + return ret; + } + + @Override + public ItemStack addMeta(int meta, String name) + { + if (!this.states.containsKey(meta)) + { + throw new RuntimeException("Usage of wrong function. Use the addMeta function that has an amount paired with it with this implementation"); + } + + return super.addMeta(meta, name); + } + + @Override + public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if (facing != EnumFacing.UP) + { + return EnumActionResult.FAIL; + } + else + { + ItemStack itemstack = playerIn.getHeldItem(hand); + + int meta = itemstack.getMetadata(); + + if (this.isValid(meta)) + { + if (playerIn.canPlayerEdit(pos, facing, itemstack) && playerIn.canPlayerEdit(pos.up(), facing, itemstack)) + { + IBlockState state = worldIn.getBlockState(pos); + Block block = state.getBlock(); + + if (block != null && block.canSustainPlant(state, worldIn, pos, EnumFacing.UP, this) && worldIn.isAirBlock(pos.up())) + { + worldIn.setBlockState(pos.up(), this.states.get(meta)); + itemstack.shrink(1); + return EnumActionResult.SUCCESS; + } + } + } + else + { + return EnumActionResult.FAIL; + } + + return EnumActionResult.FAIL; + } + } + + @Override + public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos) + { + return EnumPlantType.Crop; + } + + @Override + public IBlockState getPlant(IBlockAccess world, BlockPos pos) + { + return crop; + } +} diff --git a/src/main/java/com/progwml6/natura/plugin/JEIPlugin.java b/src/main/java/com/progwml6/natura/plugin/JEIPlugin.java deleted file mode 100644 index 20a07aa7..00000000 --- a/src/main/java/com/progwml6/natura/plugin/JEIPlugin.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.progwml6.natura.plugin; - -public class JEIPlugin -{ - -} diff --git a/src/main/java/com/progwml6/natura/plugin/PluginJEI.java b/src/main/java/com/progwml6/natura/plugin/PluginJEI.java new file mode 100644 index 00000000..97d4ebce --- /dev/null +++ b/src/main/java/com/progwml6/natura/plugin/PluginJEI.java @@ -0,0 +1,44 @@ +package com.progwml6.natura.plugin; + +import com.progwml6.natura.Natura; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.overworld.NaturaOverworld; + +import mezz.jei.api.BlankModPlugin; +import mezz.jei.api.IJeiHelpers; +import mezz.jei.api.IModRegistry; +import mezz.jei.api.JEIPlugin; +import mezz.jei.api.ingredients.IIngredientBlacklist; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +@JEIPlugin +public class PluginJEI extends BlankModPlugin +{ + @Override + public void register(IModRegistry registry) + { + IJeiHelpers jeiHelpers = registry.getJeiHelpers(); + IIngredientBlacklist ingredientBlacklist = jeiHelpers.getIngredientBlacklist(); + + if (Natura.pulseManager.isPulseLoaded(NaturaOverworld.PulseId)) + { + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaOverworld.eucalyptusDoor, 1, OreDictionary.WILDCARD_VALUE)); + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaOverworld.hopseedDoor, 1, OreDictionary.WILDCARD_VALUE)); + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaOverworld.sakuraDoor, 1, OreDictionary.WILDCARD_VALUE)); + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaOverworld.redwoodDoor, 1, OreDictionary.WILDCARD_VALUE)); + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaOverworld.redwoodBarkDoor, 1, OreDictionary.WILDCARD_VALUE)); + + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaOverworld.barleyCrop, 1, OreDictionary.WILDCARD_VALUE)); + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaOverworld.cottonCrop, 1, OreDictionary.WILDCARD_VALUE)); + } + + if (Natura.pulseManager.isPulseLoaded(NaturaNether.PulseId)) + { + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaNether.ghostwoodDoor, 1, OreDictionary.WILDCARD_VALUE)); + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaNether.bloodwoodDoor, 1, OreDictionary.WILDCARD_VALUE)); + + ingredientBlacklist.addIngredientToBlacklist(new ItemStack(NaturaNether.litNetherrackFurnace, 1, OreDictionary.WILDCARD_VALUE)); + } + } +} diff --git a/src/main/java/com/progwml6/natura/plugin/waila/HUDHandlerNatura.java b/src/main/java/com/progwml6/natura/plugin/waila/HUDHandlerNatura.java new file mode 100644 index 00000000..f3997b4f --- /dev/null +++ b/src/main/java/com/progwml6/natura/plugin/waila/HUDHandlerNatura.java @@ -0,0 +1,276 @@ +package com.progwml6.natura.plugin.waila; + +import java.lang.reflect.Method; +import java.util.List; + +import com.progwml6.natura.Natura; +import com.progwml6.natura.common.block.BlockNaturaDoor; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.logs.BlockNetherLog2; +import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.overworld.block.crops.BlockOverworldCrops; +import com.progwml6.natura.shared.NaturaCommons; + +import mcp.mobius.waila.addons.HUDHandlerBase; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; +import mcp.mobius.waila.api.IWailaDataProvider; +import mcp.mobius.waila.api.IWailaRegistrar; +import mcp.mobius.waila.cbcore.LangUtil; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.ReflectionHelper; + +public class HUDHandlerNatura extends HUDHandlerBase +{ + //@formatter:off + static Method getCrop; + static Method getDoor; + + //Overworld Blocks + static Block overworldLog = NaturaOverworld.overworldLog; + static Block overworldLog2 = NaturaOverworld.overworldLog2; + static Block redwoodLog = NaturaOverworld.redwoodLog; + static Block overworldLeaves = NaturaOverworld.overworldLeaves; + static Block overworldLeaves2 = NaturaOverworld.overworldLeaves2; + static Block redwoodLeaves = NaturaOverworld.redwoodLeaves; + static Block overworldSapling = NaturaOverworld.overworldSapling; + static Block overworldSapling2 = NaturaOverworld.overworldSapling2; + static Block redwoodSapling = NaturaOverworld.redwoodSapling; + static Block barley = NaturaOverworld.barleyCrop; + static Block cotton = NaturaOverworld.cottonCrop; + static Block eucalyptusDoor = NaturaOverworld.eucalyptusDoor; + static Block hopseedDoor = NaturaOverworld.hopseedDoor; + static Block sakuraDoor = NaturaOverworld.sakuraDoor; + static Block redwoodDoor = NaturaOverworld.redwoodDoor; + static Block redwoodBarkDoor = NaturaOverworld.redwoodBarkDoor; + + //Nether Blocks + static Block netherLog = NaturaNether.netherLog; + static Block netherLog2 = NaturaNether.netherLog2; + static Block netherLeaves = NaturaNether.netherLeaves; + static Block netherLeaves2 = NaturaNether.netherLeaves2; + static Block netherSapling = NaturaNether.netherSapling; + static Block netherSapling2 = NaturaNether.netherSapling2; + static Block ghostwoodDoor = NaturaNether.ghostwoodDoor; + static Block bloodwoodDoor = NaturaNether.bloodwoodDoor; + //@formatter:on + + @Override + public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) + { + Block block = accessor.getBlock(); + + if (Natura.pulseManager.isPulseLoaded(NaturaOverworld.PulseId)) + { + if (block == overworldLog || block == overworldLog2 || block == redwoodLog) + { + return new ItemStack(block, 1, accessor.getMetadata() % 4); + } + + if (block == overworldLeaves || block == overworldLeaves2 || block == redwoodLeaves) + { + return new ItemStack(block, 1, accessor.getMetadata() % 4); + } + + if (block == overworldSapling || block == overworldSapling2 || block == redwoodSapling) + { + return new ItemStack(block, 1, accessor.getMetadata() % 8); + } + + if (config.getConfig("natura.alternatecropitem")) + { + if (block instanceof BlockOverworldCrops) + { + if (getCrop == null) + getCrop = ReflectionHelper.findMethod(BlockOverworldCrops.class, "getCrop", "getCrop"); + + try + { + return new ItemStack((Item) getCrop.invoke(block)); + } + catch (Exception e) + { + return null; + } + } + } + else + { + // Barley crop should display Barley item + if (block == barley) + return NaturaCommons.barley.copy(); + + // Cotton crop should display Cotton item + if (block == cotton) + return NaturaCommons.cotton.copy(); + } + + if (config.getConfig("natura.alternatedooritem")) + { + if (block instanceof BlockNaturaDoor) + { + if (getDoor == null) + getDoor = ReflectionHelper.findMethod(BlockNaturaDoor.class, "getDoor", "getDoor"); + + try + { + return new ItemStack((Item) getDoor.invoke(block)); + } + catch (Exception e) + { + return null; + } + } + } + else + { + // Eucalyptus Door should display Eucalyptus Door item + if (block == eucalyptusDoor) + return NaturaOverworld.eucalyptus_door.copy(); + + // Hopseed Door should display Hopseed Door item + if (block == hopseedDoor) + return NaturaOverworld.hopseed_door.copy(); + + // Sakura Door should display Sakura Door item + if (block == sakuraDoor) + return NaturaOverworld.sakura_door.copy(); + + // Redwood Door should display Redwood Door item + if (block == redwoodDoor) + return NaturaOverworld.redwood_door.copy(); + + // Redwood Bark Door should display Redwood Bark Door item + if (block == redwoodBarkDoor) + return NaturaOverworld.redwood_bark_door.copy(); + } + } + + if (Natura.pulseManager.isPulseLoaded(NaturaNether.PulseId)) + { + if (block == netherLog) + { + return new ItemStack(block, 1, accessor.getMetadata() % 4); + } + + if (block == netherLog2) + { + return new ItemStack(block, 1, accessor.getBlockState().getValue(BlockNetherLog2.META)); + } + + if (block == netherLeaves || block == netherLeaves2) + { + return new ItemStack(block, 1, accessor.getMetadata() % 4); + } + + if (block == netherSapling || block == netherSapling2) + { + return new ItemStack(block, 1, accessor.getMetadata() % 8); + } + + if (config.getConfig("natura.alternatedooritem")) + { + if (block instanceof BlockNaturaDoor) + { + if (getDoor == null) + getDoor = ReflectionHelper.findMethod(BlockNaturaDoor.class, "getDoor", "getDoor"); + + try + { + return new ItemStack((Item) getDoor.invoke(block)); + } + catch (Exception e) + { + return null; + } + } + } + else + { + // Ghostwood Door should display Ghostwood Door item + if (block == ghostwoodDoor) + return NaturaNether.ghostwood_door.copy(); + + // Bloodwood Bark Door should display Bloodwood Bark Door item + if (block == bloodwoodDoor) + return NaturaNether.bloodwood_door.copy(); + } + } + + return null; + } + + @Override + public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) + { + Block block = accessor.getBlock(); + + // Displays maturity percentage + if (config.getConfig("general.showcrop") && BlockOverworldCrops.class.isInstance(block)) + { + float growthValue = (accessor.getMetadata() / (float) ((BlockOverworldCrops) block).getMaxAge()) * 100.0F; + if (growthValue < 100.0) + { + currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue)); + } + else + { + currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature"))); + } + + return currenttip; + } + + return currenttip; + } + + @Override + public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) + { + if (te != null) + te.writeToNBT(tag); + return tag; + } + + public static void register(IWailaRegistrar registrar) + { + registrar.addConfig("Natura", "natura.alternatecropitem"); + registrar.addConfig("Natura", "natura.alternatedooritem"); + + IWailaDataProvider provider = new HUDHandlerNatura(); + + //Overworld + registrar.registerStackProvider(provider, overworldLog.getClass()); + registrar.registerStackProvider(provider, overworldLog2.getClass()); + registrar.registerStackProvider(provider, redwoodLog.getClass()); + registrar.registerStackProvider(provider, overworldLeaves.getClass()); + registrar.registerStackProvider(provider, overworldLeaves2.getClass()); + registrar.registerStackProvider(provider, redwoodLeaves.getClass()); + registrar.registerStackProvider(provider, overworldSapling.getClass()); + registrar.registerStackProvider(provider, overworldSapling2.getClass()); + registrar.registerStackProvider(provider, redwoodSapling.getClass()); + registrar.registerStackProvider(provider, barley.getClass()); + registrar.registerStackProvider(provider, cotton.getClass()); + registrar.registerStackProvider(provider, eucalyptusDoor.getClass()); + registrar.registerBodyProvider(provider, BlockOverworldCrops.class); + registrar.registerBodyProvider(provider, BlockNaturaDoor.class); + registrar.registerNBTProvider(provider, cotton.getClass()); + registrar.registerNBTProvider(provider, barley.getClass()); + registrar.registerNBTProvider(provider, eucalyptusDoor.getClass()); + + //Nether + registrar.registerStackProvider(provider, netherLog.getClass()); + registrar.registerStackProvider(provider, netherLog2.getClass()); + registrar.registerStackProvider(provider, netherLeaves.getClass()); + registrar.registerStackProvider(provider, netherLeaves2.getClass()); + registrar.registerStackProvider(provider, netherSapling.getClass()); + registrar.registerStackProvider(provider, netherSapling2.getClass()); + } +} diff --git a/src/main/java/com/progwml6/natura/plugin/waila/PluginWaila.java b/src/main/java/com/progwml6/natura/plugin/waila/PluginWaila.java new file mode 100644 index 00000000..0f61da6c --- /dev/null +++ b/src/main/java/com/progwml6/natura/plugin/waila/PluginWaila.java @@ -0,0 +1,15 @@ +package com.progwml6.natura.plugin.waila; + +import mcp.mobius.waila.api.IWailaPlugin; +import mcp.mobius.waila.api.IWailaRegistrar; +import mcp.mobius.waila.api.WailaPlugin; + +@WailaPlugin +public class PluginWaila implements IWailaPlugin +{ + @Override + public void register(IWailaRegistrar registrar) + { + HUDHandlerNatura.register(registrar); + } +} diff --git a/src/main/java/com/progwml6/natura/shared/CommonsClientProxy.java b/src/main/java/com/progwml6/natura/shared/CommonsClientProxy.java index 6878c6a0..9434c368 100644 --- a/src/main/java/com/progwml6/natura/shared/CommonsClientProxy.java +++ b/src/main/java/com/progwml6/natura/shared/CommonsClientProxy.java @@ -2,17 +2,17 @@ import static com.progwml6.natura.common.ModelRegisterUtil.registerItemBlockMeta; import static com.progwml6.natura.common.ModelRegisterUtil.registerItemModel; +import static com.progwml6.natura.shared.NaturaCommons.boneMealBag; +import static com.progwml6.natura.shared.NaturaCommons.clouds; import static com.progwml6.natura.shared.NaturaCommons.edibles; import static com.progwml6.natura.shared.NaturaCommons.empty_bowls; import static com.progwml6.natura.shared.NaturaCommons.materials; +import static com.progwml6.natura.shared.NaturaCommons.seed_bags; import static com.progwml6.natura.shared.NaturaCommons.soups; +import static com.progwml6.natura.shared.NaturaCommons.sticks; import com.progwml6.natura.common.ClientProxy; -import net.minecraft.block.BlockHopper; -import net.minecraft.client.renderer.block.statemap.StateMap; -import net.minecraftforge.client.model.ModelLoader; - public class CommonsClientProxy extends ClientProxy { @Override @@ -24,14 +24,15 @@ public void preInit() @Override protected void registerModels() { - ModelLoader.setCustomStateMapper(NaturaCommons.blaze_hopper, (new StateMap.Builder()).ignore(BlockHopper.ENABLED).build()); - - registerItemModel(NaturaCommons.blaze_hopper); - registerItemBlockMeta(NaturaCommons.clouds); + registerItemBlockMeta(clouds); materials.registerItemModels(); empty_bowls.registerItemModels(); soups.registerItemModels(); edibles.registerItemModels(); + seed_bags.registerItemModels(); + sticks.registerItemModels(); + + registerItemModel(boneMealBag); } } diff --git a/src/main/java/com/progwml6/natura/shared/NaturaCommons.java b/src/main/java/com/progwml6/natura/shared/NaturaCommons.java index 8ff2ba95..e15dda03 100644 --- a/src/main/java/com/progwml6/natura/shared/NaturaCommons.java +++ b/src/main/java/com/progwml6/natura/shared/NaturaCommons.java @@ -5,13 +5,17 @@ import com.google.common.eventbus.Subscribe; import com.progwml6.natura.common.CommonProxy; import com.progwml6.natura.common.NaturaPulse; +import com.progwml6.natura.common.config.Config; import com.progwml6.natura.library.NaturaRegistry; import com.progwml6.natura.library.Util; import com.progwml6.natura.shared.block.clouds.BlockCloud; -import com.progwml6.natura.shared.block.hopper.BlockBlazeHopper; -import com.progwml6.natura.shared.item.ItemEdibleSoup; -import com.progwml6.natura.shared.item.ItemNaturaEdible; +import com.progwml6.natura.shared.item.bags.ItemBoneBag; +import com.progwml6.natura.shared.item.bags.ItemSeedBag; +import com.progwml6.natura.shared.item.food.ItemNaturaEdible; +import com.progwml6.natura.shared.item.food.ItemNaturaEdibleSoup; +import net.minecraft.block.BlockCrops; +import net.minecraft.block.BlockNetherWart; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.init.MobEffects; @@ -22,8 +26,8 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; -import net.minecraftforge.oredict.ShapelessOreRecipe; import slimeknights.mantle.item.ItemMetaDynamic; import slimeknights.mantle.pulsar.pulse.Pulse; @@ -42,14 +46,16 @@ public class NaturaCommons extends NaturaPulse //@formatter:off // Blocks - public static BlockBlazeHopper blaze_hopper; public static BlockCloud clouds; // Items public static ItemMetaDynamic materials; public static ItemMetaDynamic empty_bowls; public static ItemNaturaEdible edibles; - public static ItemEdibleSoup soups; + public static ItemNaturaEdibleSoup soups; + public static ItemSeedBag seed_bags; + public static ItemBoneBag boneMealBag; + public static ItemMetaDynamic sticks; // Material Itemstacks public static ItemStack barley; @@ -96,26 +102,55 @@ public class NaturaCommons extends NaturaPulse public static ItemStack skyberry; public static ItemStack stingberry; + // Apples + public static ItemStack potashApple; + public static ItemStack berryMedley; + + public static ItemStack cactusJuice; + + //Seed Bags + public static ItemStack wheat_seed_bag; + public static ItemStack carrots_seed_bag; + public static ItemStack potatoes_seed_bag; + public static ItemStack nether_wart_seed_bag; + + //Wood Sticks + public static ItemStack maple_stick; + public static ItemStack silverbell_stick; + public static ItemStack amaranth_stick; + public static ItemStack tiger_stick; + public static ItemStack willow_stick; + public static ItemStack eucalyptus_stick; + public static ItemStack hopseed_stick; + public static ItemStack sakura_stick; + public static ItemStack redwood_stick; + public static ItemStack ghostwood_stick; + public static ItemStack darkwood_stick; + public static ItemStack fusewood_stick; + public static ItemStack bloodwood_stick; //@formatter:on @Subscribe public void preInit(FMLPreInitializationEvent event) { // Blocks - blaze_hopper = registerBlock(new BlockBlazeHopper(), "blaze_hopper"); clouds = registerEnumBlock(new BlockCloud(), "clouds"); // Items materials = registerItem(new ItemMetaDynamic(), "materials"); empty_bowls = registerItem(new ItemMetaDynamic(), "empty_bowls"); edibles = registerItem(new ItemNaturaEdible(), "edibles"); - soups = registerItem(new ItemEdibleSoup(), "soups"); + soups = registerItem(new ItemNaturaEdibleSoup(), "soups"); + seed_bags = registerItem(new ItemSeedBag(), "seed_bags"); + sticks = registerItem(new ItemMetaDynamic(), "sticks"); materials.setCreativeTab(NaturaRegistry.tabGeneral); empty_bowls.setCreativeTab(NaturaRegistry.tabGeneral); edibles.setCreativeTab(NaturaRegistry.tabGeneral); soups.setCreativeTab(NaturaRegistry.tabGeneral); + seed_bags.setCreativeTab(NaturaRegistry.tabGeneral); + sticks.setCreativeTab(NaturaRegistry.tabGeneral); barley = materials.addMeta(0, "barley"); barleyFlour = materials.addMeta(1, "barley_flour"); @@ -130,101 +165,152 @@ public void preInit(FMLPreInitializationEvent event) impLeather = materials.addMeta(6, "imp_leather"); flameString = materials.addMeta(7, "flame_string"); - impmeatRaw = edibles.addFood(0, 3, 0.2f, 32, "impmeat_raw", new PotionEffect(MobEffects.HUNGER, 8 * 20, 0), new PotionEffect(MobEffects.POISON, 5 * 20, 0)); - impmeatCooked = edibles.addFood(1, 8, 0.6f, 32, "impmeat_cooked", new PotionEffect(MobEffects.FIRE_RESISTANCE, 15 * 20, 0), new PotionEffect(MobEffects.POISON, 5 * 20, 0)); + impmeatRaw = edibles.addFood(0, 3, 0.2f, 32, "impmeat_raw", false, new PotionEffect(MobEffects.HUNGER, 8 * 20, 0), new PotionEffect(MobEffects.POISON, 5 * 20, 0)); + impmeatCooked = edibles.addFood(1, 8, 0.6f, 32, "impmeat_cooked", false, new PotionEffect(MobEffects.FIRE_RESISTANCE, 15 * 20, 0), new PotionEffect(MobEffects.POISON, 5 * 20, 0)); } if (isOverworldLoaded()) { - raspberry = edibles.addFood(2, 1, 0.4F, 16, "raspberry", true); - blueberry = edibles.addFood(3, 1, 0.4F, 16, "blueberry", true); - blackberry = edibles.addFood(4, 1, 0.4F, 16, "blackberry", true); - maloberry = edibles.addFood(5, 1, 0.4F, 16, "maloberry", true); - berryMedley = soups.addFood(9, 5, 1.4F, 32, "berry_medley", new ItemStack(Items.BOWL)); + raspberry = edibles.addFood(2, 1, 0.4F, 16, "raspberry", false); + blueberry = edibles.addFood(3, 1, 0.4F, 16, "blueberry", false); + blackberry = edibles.addFood(4, 1, 0.4F, 16, "blackberry", false); + maloberry = edibles.addFood(5, 1, 0.4F, 16, "maloberry", false); + berryMedley = soups.addFood(9, 5, 1.4F, 32, "berry_medley", new ItemStack(Items.BOWL), false); } if (isNetherLoaded()) { - blightberry = edibles.addFood(6, 1, 0.4F, 16, "blightberry", new PotionEffect(MobEffects.REGENERATION, 8 * 20, 0), new PotionEffect(MobEffects.POISON, 5 * 20, 0), new PotionEffect(MobEffects.WITHER, 5 * 20, 0)); - duskberry = edibles.addFood(7, 1, 0.4F, 16, "duskberry", new PotionEffect(MobEffects.NIGHT_VISION, 15 * 20, 0), new PotionEffect(MobEffects.BLINDNESS, 3 * 20, 0)); - skyberry = edibles.addFood(8, 1, 0.4F, 16, "skyberry", new PotionEffect(MobEffects.JUMP_BOOST, 8 * 20, 0), new PotionEffect(MobEffects.SLOWNESS, 3 * 20, 0)); - stingberry = edibles.addFood(9, 1, 0.4F, 16, "stingberry", new PotionEffect(MobEffects.STRENGTH, 10 * 20, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 10 * 20, 0)); + blightberry = edibles.addFood(6, 1, 0.4F, 16, "blightberry", false, new PotionEffect(MobEffects.REGENERATION, 8 * 20, 0), new PotionEffect(MobEffects.POISON, 5 * 20, 0), new PotionEffect(MobEffects.WITHER, 5 * 20, 0)); + duskberry = edibles.addFood(7, 1, 0.4F, 16, "duskberry", false, new PotionEffect(MobEffects.NIGHT_VISION, 15 * 20, 0), new PotionEffect(MobEffects.BLINDNESS, 3 * 20, 0)); + skyberry = edibles.addFood(8, 1, 0.4F, 16, "skyberry", false, new PotionEffect(MobEffects.JUMP_BOOST, 8 * 20, 0), new PotionEffect(MobEffects.SLOWNESS, 3 * 20, 0)); + stingberry = edibles.addFood(9, 1, 0.4F, 16, "stingberry", false, new PotionEffect(MobEffects.STRENGTH, 10 * 20, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 10 * 20, 0)); + + potashApple = edibles.addFood(10, 4, 0.4F, "potashapple", false, new PotionEffect(MobEffects.POISON, 2 * 25, 0)); } + cactusJuice = edibles.addFood(11, 1, 0.1f, 12, "cactusjuice", false); + ghostwood_emptybowl = empty_bowls.addMeta(0, "ghostwood_bowl"); bloodwood_emptybowl = empty_bowls.addMeta(1, "bloodwood_bowl"); darkwood_emptybowl = empty_bowls.addMeta(2, "darkwood_bowl"); fusewood_emptybowl = empty_bowls.addMeta(3, "fusewood_bowl"); - ghostwood_mushroomstew = soups.addFood(0, 6, 0.6f, 32, "ghostwood_mushroomstew", ghostwood_emptybowl); - bloodwood_mushroomstew = soups.addFood(1, 6, 0.6f, 32, "bloodwood_mushroomstew", bloodwood_emptybowl); - darkwood_mushroomstew = soups.addFood(2, 6, 0.6f, 32, "darkwood_mushroomstew", darkwood_emptybowl); - fusewood_mushroomstew = soups.addFood(3, 6, 0.6f, 32, "fusewood_mushroomstew", fusewood_emptybowl); + ghostwood_mushroomstew = soups.addFood(0, 6, 0.6f, 32, "ghostwood_mushroomstew", ghostwood_emptybowl, false); + bloodwood_mushroomstew = soups.addFood(1, 6, 0.6f, 32, "bloodwood_mushroomstew", bloodwood_emptybowl, false); + darkwood_mushroomstew = soups.addFood(2, 6, 0.6f, 32, "darkwood_mushroomstew", darkwood_emptybowl, false); + fusewood_mushroomstew = soups.addFood(3, 6, 0.6f, 32, "fusewood_mushroomstew", fusewood_emptybowl, false); + + vanilla_glowshroomstew = soups.addFood(4, 6, 0.6f, 32, "vanilla_glowshroomstew", new ItemStack(Items.BOWL), false, new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); + ghostwood_glowshroomstew = soups.addFood(5, 6, 0.6f, 32, "ghostwood_glowshroomstew", ghostwood_emptybowl, false, new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); + bloodwood_glowshroomstew = soups.addFood(6, 3, 0.2f, 32, "bloodwood_glowshroomstew", bloodwood_emptybowl, false, new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); + darkwood_glowshroomstew = soups.addFood(7, 3, 0.2f, 32, "darkwood_glowshroomstew", darkwood_emptybowl, false, new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); + fusewood_glowshroomstew = soups.addFood(8, 3, 0.2f, 32, "fusewood_glowshroomstew", fusewood_emptybowl, false, new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); - vanilla_glowshroomstew = soups.addFood(4, 6, 0.6f, 32, "vanilla_glowshroomstew", new ItemStack(Items.BOWL), new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); - ghostwood_glowshroomstew = soups.addFood(5, 6, 0.6f, 32, "ghostwood_glowshroomstew", ghostwood_emptybowl, new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); - bloodwood_glowshroomstew = soups.addFood(6, 3, 0.2f, 32, "bloodwood_glowshroomstew", bloodwood_emptybowl, new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); - darkwood_glowshroomstew = soups.addFood(7, 3, 0.2f, 32, "darkwood_glowshroomstew", darkwood_emptybowl, new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); - fusewood_glowshroomstew = soups.addFood(8, 3, 0.2f, 32, "fusewood_glowshroomstew", fusewood_emptybowl, new PotionEffect(MobEffects.NIGHT_VISION, 45 * 25, 0), new PotionEffect(MobEffects.POISON, 16 * 25, 0), new PotionEffect(MobEffects.MINING_FATIGUE, 8 * 25, 0)); + wheat_seed_bag = seed_bags.addMeta(0, "wheat_seed_bag", Blocks.WHEAT.getDefaultState().withProperty(BlockCrops.AGE, Integer.valueOf(0))); + carrots_seed_bag = seed_bags.addMeta(1, "carrots_seed_bag", Blocks.CARROTS.getDefaultState().withProperty(BlockCrops.AGE, Integer.valueOf(0))); + potatoes_seed_bag = seed_bags.addMeta(2, "potatoes_seed_bag", Blocks.POTATOES.getDefaultState().withProperty(BlockCrops.AGE, Integer.valueOf(0))); + nether_wart_seed_bag = seed_bags.addMeta(3, "nether_wart_seed_bag", Blocks.NETHER_WART.getDefaultState().withProperty(BlockNetherWart.AGE, Integer.valueOf(0))); + + boneMealBag = registerItem(new ItemBoneBag(), "bonemeal_bag"); + + if (isOverworldLoaded()) + { + maple_stick = sticks.addMeta(0, "maple_stick"); + silverbell_stick = sticks.addMeta(1, "silverbell_stick"); + amaranth_stick = sticks.addMeta(2, "amaranth_stick"); + tiger_stick = sticks.addMeta(3, "tiger_stick"); + willow_stick = sticks.addMeta(4, "willow_stick"); + eucalyptus_stick = sticks.addMeta(5, "eucalyptus_stick"); + hopseed_stick = sticks.addMeta(6, "hopseed_stick"); + sakura_stick = sticks.addMeta(7, "sakura_stick"); + redwood_stick = sticks.addMeta(8, "redwood_stick"); + } + + if (isNetherLoaded()) + { + ghostwood_stick = sticks.addMeta(9, "ghostwood_stick"); + darkwood_stick = sticks.addMeta(10, "darkwood_stick"); + fusewood_stick = sticks.addMeta(11, "fusewood_stick"); + bloodwood_stick = sticks.addMeta(12, "bloodwood_stick"); + } proxy.preInit(); NaturaRegistry.tabGeneral.setDisplayIcon(cotton); + + if (!isOverworldLoaded()) + { + NaturaRegistry.tabWorld.setDisplayIcon(new ItemStack(clouds)); + } } @Subscribe public void init(FMLInitializationEvent event) { proxy.init(); + this.registerRecipes(); this.registerSmelting(); } private void registerRecipes() { - String[] berryTypes = new String[] { "cropRaspberry", "cropBlueberry", "cropBlackberry", "cropMaloberry", "cropStrawberry", "cropCranberry" }; + // Crops + GameRegistry.addRecipe(wheat_seed_bag.copy(), "sss", "sss", "sss", 's', Items.WHEAT_SEEDS); + GameRegistry.addRecipe(new ShapedOreRecipe(potatoes_seed_bag.copy(), "sss", "sss", "sss", 's', "cropPotato")); + GameRegistry.addRecipe(new ShapedOreRecipe(carrots_seed_bag.copy(), "sss", "sss", "sss", 's', "cropCarrot")); + GameRegistry.addRecipe(nether_wart_seed_bag.copy(), "sss", "sss", "sss", 's', Items.NETHER_WART); + GameRegistry.addRecipe(new ItemStack(boneMealBag, 1, 0), "sss", "sss", "sss", 's', new ItemStack(Items.DYE, 1, 15)); + + GameRegistry.addRecipe(new ItemStack(Items.WHEAT_SEEDS, 9, 0), "s", 's', wheat_seed_bag.copy()); + GameRegistry.addRecipe(new ItemStack(Items.POTATO, 9, 0), "s", 's', potatoes_seed_bag.copy()); + GameRegistry.addRecipe(new ItemStack(Items.CARROT, 9, 0), "s", 's', potatoes_seed_bag.copy()); + GameRegistry.addRecipe(new ItemStack(Items.NETHER_WART, 9, 0), "s", 's', nether_wart_seed_bag.copy()); + GameRegistry.addRecipe(new ItemStack(Items.DYE, 9, 15), "s", 's', boneMealBag); - for (int iter1 = 0; iter1 < berryTypes.length - 2; iter1++) - { - for (int iter2 = iter1 + 1; iter2 < berryTypes.length - 1; iter2++) - { - for (int iter3 = iter2 + 1; iter3 < berryTypes.length; iter3++) - { - GameRegistry.addRecipe(new ShapelessOreRecipe(berryMedley.copy(), "bowlWood", berryTypes[iter1], berryTypes[iter2], berryTypes[iter3])); - } - } - } + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.STRING), "sss", 's', "cropCotton")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.WOOL), "sss", "sss", "sss", 's', "cropCotton")); - ItemStack berryMix = berryMedley.copy(); - berryMix.setCount(2); + GameRegistry.addRecipe(cactusJuice.copy(), "X", 'X', Blocks.CACTUS); + GameRegistry.addRecipe(new ItemStack(Items.WATER_BUCKET, 1), "www", "wBw", "www", 'w', cactusJuice.copy(), 'B', Items.BUCKET); - for (int iter1 = 0; iter1 < berryTypes.length - 3; iter1++) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.BREAD), "bbb", 'b', "cropBarley")); + GameRegistry.addRecipe(new ShapedOreRecipe(barleyFlour.copy(), "X", 'X', "cropBarley")); + + if (Config.enableWheatRecipe) { - for (int iter2 = iter1 + 1; iter2 < berryTypes.length - 2; iter2++) - { - for (int iter3 = iter2 + 1; iter3 < berryTypes.length - 1; iter3++) - { - for (int iter4 = iter3 + 1; iter4 < berryTypes.length; iter4++) - { - GameRegistry.addRecipe(new ShapelessOreRecipe(berryMix.copy(), "bowlWood", "bowlWood", berryTypes[iter1], berryTypes[iter2], berryTypes[iter3], berryTypes[iter4])); - } - } - } + GameRegistry.addRecipe(new ShapedOreRecipe(wheatFlour.copy(), "X", 'X', "cropWheat")); } - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.STRING), "sss", 's', "cropCotton")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.WOOL), "sss", "sss", "sss", 's', "cropCotton")); - GameRegistry.addRecipe(new ItemStack(Items.LEATHER, 2), "##", "##", '#', new ItemStack(impLeather.getItem(), 1, 6)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.ARROW, 4, 0), " f ", "#s#", " # ", 's', "stickWood", '#', new ItemStack(ghostwoodFletching.getItem(), 1, 5), 'f', Items.FLINT)); + + // Cake GameRegistry.addRecipe(new ItemStack(Items.CAKE, 1), "AAA", "BEB", " C ", 'A', Items.MILK_BUCKET, 'B', Items.SUGAR, 'C', wheatFlour.copy(), 'E', Items.EGG); GameRegistry.addRecipe(new ItemStack(Items.CAKE, 1), "AAA", "BEB", " C ", 'A', Items.MILK_BUCKET, 'B', Items.SUGAR, 'C', barleyFlour.copy(), 'E', Items.EGG); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blaze_hopper), "# #", "#C#", " # ", '#', new ItemStack(Items.BLAZE_ROD), 'C', "chestWood")); + + // Leather + if (isEntitiesLoaded()) + { + GameRegistry.addRecipe(new ItemStack(Items.LEATHER, 2), "##", "##", '#', impLeather.copy()); + } + + // Clouds + GameRegistry.addRecipe(new ItemStack(Items.COAL, 1, 1), "ccc", "ccc", "ccc", 'c', new ItemStack(clouds, 1, BlockCloud.CloudType.ASH.getMeta())); + GameRegistry.addRecipe(sulfurPowder.copy(), "cc", "cc", 'c', new ItemStack(clouds, 1, BlockCloud.CloudType.SULFUR.getMeta())); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.GUNPOWDER, 1, 0), "cc", "cc", 'c', "dustSulfur")); + + // Arrows + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.ARROW, 4, 0), " f ", "#s#", " # ", 's', "stickWood", '#', ghostwoodFletching.copy(), 'f', Items.FLINT)); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.ARROW, 4, 0), " f ", "#s#", " # ", 's', new ItemStack(sticks, 1, OreDictionary.WILDCARD_VALUE), '#', ghostwoodFletching.copy(), 'f', Items.FLINT)); + + // Misc + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.GLASS_BOTTLE, 3), "# #", " # ", '#', "glass")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.DAYLIGHT_DETECTOR), "GGG", "QQQ", "WWW", 'G', "glass", 'Q', "gemQuartz", 'W', "slabWood")); } private void registerSmelting() { - //FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(saguaro, 1, 0), new ItemStack(Items.DYE, 1, 2), 0.2F); - FurnaceRecipes.instance().addSmeltingRecipe(impmeatRaw.copy(), impmeatCooked.copy(), 0.2F); - FurnaceRecipes.instance().addSmeltingRecipe(barleyFlour.copy(), new ItemStack(Items.BREAD, 1), 0.5f); - FurnaceRecipes.instance().addSmeltingRecipe(wheatFlour.copy(), new ItemStack(Items.BREAD, 1), 0.5f); + FurnaceRecipes furnaceRecipes = FurnaceRecipes.instance(); + + furnaceRecipes.addSmeltingRecipe(barleyFlour.copy(), new ItemStack(Items.BREAD, 1), 0.5f); + furnaceRecipes.addSmeltingRecipe(wheatFlour.copy(), new ItemStack(Items.BREAD, 1), 0.5f); } } diff --git a/src/main/java/com/progwml6/natura/shared/block/clouds/BlockCloud.java b/src/main/java/com/progwml6/natura/shared/block/clouds/BlockCloud.java index 2e7936c9..2ed45093 100644 --- a/src/main/java/com/progwml6/natura/shared/block/clouds/BlockCloud.java +++ b/src/main/java/com/progwml6/natura/shared/block/clouds/BlockCloud.java @@ -67,8 +67,9 @@ public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState s @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { - ItemStack heldItem = playerIn.getHeldItem(hand); - if (state.getValue(BlockCloud.TYPE) == BlockCloud.CloudType.SULFUR && heldItem.getItem() != null && heldItem.getItem() == Items.FLINT_AND_STEEL) + ItemStack itemstack = playerIn.getHeldItem(hand); + + if (state.getValue(BlockCloud.TYPE) == BlockCloud.CloudType.SULFUR && itemstack.getItem() != Items.AIR && itemstack.getItem() == Items.FLINT_AND_STEEL) { worldIn.setBlockToAir(pos); this.explode(worldIn, pos, 1, playerIn); diff --git a/src/main/java/com/progwml6/natura/shared/item/bags/ItemBoneBag.java b/src/main/java/com/progwml6/natura/shared/item/bags/ItemBoneBag.java new file mode 100644 index 00000000..53531bcb --- /dev/null +++ b/src/main/java/com/progwml6/natura/shared/item/bags/ItemBoneBag.java @@ -0,0 +1,124 @@ +package com.progwml6.natura.shared.item.bags; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.IGrowable; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockPos.MutableBlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.ForgeEventFactory; +import net.minecraftforge.event.entity.player.BonemealEvent; +import net.minecraftforge.fml.common.eventhandler.Event.Result; + +public class ItemBoneBag extends Item +{ + public ItemBoneBag() + { + super(); + this.setCreativeTab(NaturaRegistry.tabGeneral); + } + + /** + * Called when a Block is right-clicked with this Item + */ + @Override + public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if (facing != EnumFacing.UP) + { + return EnumActionResult.FAIL; + } + else + { + ItemStack itemstack = playerIn.getHeldItem(hand); + + MutableBlockPos mutableblockpos = new MutableBlockPos(); + + int posY = pos.getY(); + + boolean planted = false; + + for (int posX = pos.getX() - 1; posX <= pos.getX() + 1; posX++) + { + for (int posZ = pos.getZ() - 1; posZ <= pos.getZ() + 1; posZ++) + { + BlockPos position = mutableblockpos.setPos(posX, posY, posZ); + + if (playerIn.canPlayerEdit(position, facing, itemstack) && playerIn.canPlayerEdit(position.up(), facing, itemstack)) + { + if (applyBonemeal(itemstack, worldIn, position, playerIn, hand)) + { + planted = true; + if (!worldIn.isRemote) + { + worldIn.playEvent(2005, position, 0); + } + } + } + } + } + + if (planted) + { + if (!playerIn.capabilities.isCreativeMode) + { + itemstack.shrink(1); + } + + if (itemstack.getCount() < 1) + { + ForgeEventFactory.onPlayerDestroyItem(playerIn, itemstack, hand); + + playerIn.setHeldItem(hand, ItemStack.EMPTY); + } + + return EnumActionResult.SUCCESS; + } + + return EnumActionResult.PASS; + } + } + + public static boolean applyBonemeal(ItemStack stack, World worldIn, BlockPos target, EntityPlayer player, EnumHand hand) + { + IBlockState iblockstate = worldIn.getBlockState(target); + + BonemealEvent event = new BonemealEvent(player, worldIn, target, iblockstate, hand, stack); + if (MinecraftForge.EVENT_BUS.post(event)) + { + return false; + } + if (event.getResult() == Result.ALLOW) + { + return true; + } + + if (iblockstate.getBlock() instanceof IGrowable) + { + IGrowable igrowable = (IGrowable) iblockstate.getBlock(); + + if (igrowable.canGrow(worldIn, target, iblockstate, worldIn.isRemote)) + { + if (!worldIn.isRemote) + { + if (igrowable.canUseBonemeal(worldIn, worldIn.rand, target, iblockstate)) + { + igrowable.grow(worldIn, worldIn.rand, target, iblockstate); + } + } + + return true; + } + } + + return false; + } +} diff --git a/src/main/java/com/progwml6/natura/shared/item/bags/ItemSeedBag.java b/src/main/java/com/progwml6/natura/shared/item/bags/ItemSeedBag.java new file mode 100644 index 00000000..cb1cf51f --- /dev/null +++ b/src/main/java/com/progwml6/natura/shared/item/bags/ItemSeedBag.java @@ -0,0 +1,108 @@ +package com.progwml6.natura.shared.item.bags; + +import gnu.trove.map.hash.TIntObjectHashMap; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockPos.MutableBlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; +import slimeknights.mantle.item.ItemMetaDynamic; + +public class ItemSeedBag extends ItemMetaDynamic +{ + protected TIntObjectHashMap states = new TIntObjectHashMap<>(); + + public ItemStack addMeta(int meta, String name, IBlockState state) + { + this.states.put(meta, state); + ItemStack ret = this.addMeta(meta, name); + return ret; + } + + @Override + public ItemStack addMeta(int meta, String name) + { + if (!this.states.containsKey(meta)) + { + throw new RuntimeException("Usage of wrong function. Use the addMeta function that has an state paired with it with this implementation"); + } + return super.addMeta(meta, name); + } + + /** + * Called when a Block is right-clicked with this Item + */ + @Override + public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if (facing != EnumFacing.UP)//!playerIn.canPlayerEdit(pos.offset(facing), facing, stack)) + { + return EnumActionResult.FAIL; + } + else + { + ItemStack itemstack = playerIn.getHeldItem(hand); + + int meta = itemstack.getMetadata(); + + if (this.isValid(meta)) + { + MutableBlockPos mutableblockpos = new MutableBlockPos(); + + int posY = pos.getY(); + + boolean planted = false; + + BlockPos position = pos; + + for (int posX = pos.getX() - 1; posX <= pos.getX() + 1; posX++) + { + for (int posZ = pos.getZ() - 1; posZ <= pos.getZ() + 1; posZ++) + { + position = mutableblockpos.setPos(posX, posY, posZ); + + if (playerIn.canPlayerEdit(position, facing, itemstack) && playerIn.canPlayerEdit(position.up(), facing, itemstack)) + { + IBlockState state = worldIn.getBlockState(position); + Block block = state.getBlock(); + + if (block != null && block.canSustainPlant(state, worldIn, position, EnumFacing.UP, (IPlantable) this.states.get(meta).getBlock()) && worldIn.isAirBlock(position.up())) + { + planted = true; + + worldIn.setBlockState(position.up(), this.states.get(meta), 3); + } + } + } + } + + if (planted) + { + if (!playerIn.capabilities.isCreativeMode) + { + itemstack.shrink(1); + } + + if (itemstack.getCount() < 1) + { + worldIn.playEvent(2001, position, Block.getIdFromBlock(this.states.get(meta).getBlock())); + } + + return EnumActionResult.SUCCESS; + } + + return EnumActionResult.PASS; + } + else + { + return EnumActionResult.PASS; + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/shared/item/ItemNaturaEdible.java b/src/main/java/com/progwml6/natura/shared/item/food/ItemNaturaEdible.java similarity index 83% rename from src/main/java/com/progwml6/natura/shared/item/ItemNaturaEdible.java rename to src/main/java/com/progwml6/natura/shared/item/food/ItemNaturaEdible.java index 65ed6191..d203da1f 100644 --- a/src/main/java/com/progwml6/natura/shared/item/ItemNaturaEdible.java +++ b/src/main/java/com/progwml6/natura/shared/item/food/ItemNaturaEdible.java @@ -1,4 +1,4 @@ -package com.progwml6.natura.shared.item; +package com.progwml6.natura.shared.item.food; import java.util.List; @@ -22,18 +22,18 @@ public ItemNaturaEdible() super(); this.displayEffectsTooltip = false; this.displayCustomEffectsTooltip = true; - itemDuration = new TIntIntHashMap(); + this.itemDuration = new TIntIntHashMap(); } public ItemStack addFood(int meta, int food, float saturation, int duration, String name, PotionEffect... effects) { - return addFood(meta, food, saturation, duration, name, effects.length > 0, effects); + return this.addFood(meta, food, saturation, duration, name, effects.length > 0, effects); } public ItemStack addFood(int meta, int food, float saturation, int duration, String name, boolean alwaysEdible, PotionEffect... effects) { - itemDuration.put(meta, duration); - return addFood(meta, food, saturation, name, alwaysEdible, effects); + this.itemDuration.put(meta, duration); + return this.addFood(meta, food, saturation, name, alwaysEdible, effects); } /** @@ -42,7 +42,7 @@ public ItemStack addFood(int meta, int food, float saturation, int duration, Str @Override public int getMaxItemUseDuration(ItemStack stack) { - return itemDuration.get(stack.getMetadata()); + return this.itemDuration.get(stack.getMetadata()); } @Override diff --git a/src/main/java/com/progwml6/natura/shared/item/ItemEdibleSoup.java b/src/main/java/com/progwml6/natura/shared/item/food/ItemNaturaEdibleSoup.java similarity index 92% rename from src/main/java/com/progwml6/natura/shared/item/ItemEdibleSoup.java rename to src/main/java/com/progwml6/natura/shared/item/food/ItemNaturaEdibleSoup.java index 2102f0eb..de63d845 100644 --- a/src/main/java/com/progwml6/natura/shared/item/ItemEdibleSoup.java +++ b/src/main/java/com/progwml6/natura/shared/item/food/ItemNaturaEdibleSoup.java @@ -1,4 +1,4 @@ -package com.progwml6.natura.shared.item; +package com.progwml6.natura.shared.item.food; import javax.annotation.Nullable; @@ -9,11 +9,11 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; -public class ItemEdibleSoup extends ItemNaturaEdible +public class ItemNaturaEdibleSoup extends ItemNaturaEdible { protected TIntObjectHashMap bowlsList; - public ItemEdibleSoup() + public ItemNaturaEdibleSoup() { super(); this.bowlsList = new TIntObjectHashMap<>(); diff --git a/src/main/java/com/progwml6/natura/tools/NaturaTools.java b/src/main/java/com/progwml6/natura/tools/NaturaTools.java new file mode 100644 index 00000000..1cdf39fd --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/NaturaTools.java @@ -0,0 +1,212 @@ +package com.progwml6.natura.tools; + +import org.apache.logging.log4j.Logger; + +import com.google.common.eventbus.Subscribe; +import com.progwml6.natura.common.CommonProxy; +import com.progwml6.natura.common.NaturaPulse; +import com.progwml6.natura.library.Util; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.planks.BlockNetherPlanks; +import com.progwml6.natura.shared.NaturaCommons; +import com.progwml6.natura.tools.item.armor.ItemNaturaImpArmor; +import com.progwml6.natura.tools.item.bows.ItemNaturaBow; +import com.progwml6.natura.tools.item.tools.ItemNaturaAxe; +import com.progwml6.natura.tools.item.tools.ItemNaturaFlintAndBlaze; +import com.progwml6.natura.tools.item.tools.ItemNaturaKama; +import com.progwml6.natura.tools.item.tools.ItemNaturaPickaxe; +import com.progwml6.natura.tools.item.tools.ItemNaturaShovel; +import com.progwml6.natura.tools.item.tools.ItemNaturaSword; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Enchantments; +import net.minecraft.init.SoundEvents; +import net.minecraft.inventory.EntityEquipmentSlot; +import net.minecraft.item.Item; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemArmor.ArmorMaterial; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.fml.common.SidedProxy; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.OreDictionary; +import slimeknights.mantle.pulsar.pulse.Pulse; + +@Pulse(id = NaturaTools.PulseId, description = "All of the tools + armor added by natura") +public class NaturaTools extends NaturaPulse +{ + public static final String PulseId = "NaturaTools"; + + static final Logger log = Util.getLogger(PulseId); + + @SidedProxy(clientSide = "com.progwml6.natura.tools.ToolsClientProxy", serverSide = "com.progwml6.natura.common.CommonProxy") + public static CommonProxy proxy; + + //@formatter:off + public static Item impHelmet; + public static Item impChestplate; + public static Item impLeggings; + public static Item impBoots; + + public static ItemStack impHelmetStack; + public static ItemStack impChestplateStack; + public static ItemStack impLeggingsStack; + public static ItemStack impBootsStack; + + public static Item ghostwoodSword; + public static Item ghostwoodPickaxe; + public static Item ghostwoodShovel; + public static Item ghostwoodAxe; + public static Item ghostwoodKama; + public static Item ghostwoodBow; + + public static Item bloodwoodSword; + public static Item bloodwoodPickaxe; + public static Item bloodwoodShovel; + public static Item bloodwoodAxe; + public static Item bloodwoodKama; + public static Item bloodwoodBow; + + public static Item darkwoodSword; + public static Item darkwoodPickaxe; + public static Item darkwoodShovel; + public static Item darkwoodAxe; + public static Item darkwoodKama; + public static Item darkwoodBow; + + public static Item fusewoodSword; + public static Item fusewoodPickaxe; + public static Item fusewoodShovel; + public static Item fusewoodAxe; + public static Item fusewoodKama; + public static Item fusewoodBow; + + public static Item netherquartzSword; + public static Item netherquartzPickaxe; + public static Item netherquartzShovel; + public static Item netherquartzAxe; + public static Item netherquartzKama; + + public static Item flintAndBlaze; + //@formatter:on + + @Subscribe + public void preInit(FMLPreInitializationEvent event) + { + if (isEntitiesLoaded()) + { + ArmorMaterial impMaterial = EnumHelper.addArmorMaterial("Imp", "natura:impArmor", 33, new int[] { 1, 3, 2, 1 }, 15, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 0); + + impHelmet = registerItem(new ItemNaturaImpArmor(impMaterial, EntityEquipmentSlot.HEAD), "imp_armor_helmet"); + impChestplate = registerItem(new ItemNaturaImpArmor(impMaterial, EntityEquipmentSlot.CHEST), "imp_armor_chestplate"); + impLeggings = registerItem(new ItemNaturaImpArmor(impMaterial, EntityEquipmentSlot.LEGS), "imp_armor_leggings"); + impBoots = registerItem(new ItemNaturaImpArmor(impMaterial, EntityEquipmentSlot.FEET), "imp_armor_boots"); + } + + if (isNetherLoaded()) + { + ToolMaterial bloodwoodMaterial = EnumHelper.addToolMaterial("Bloodwood", 3, 350, 7f, 3, 24); + + ghostwoodSword = registerItem(new ItemNaturaSword(ToolMaterial.WOOD), "ghostwood_sword"); + ghostwoodPickaxe = registerItem(new ItemNaturaPickaxe(ToolMaterial.WOOD, 0), "ghostwood_pickaxe"); + ghostwoodShovel = registerItem(new ItemNaturaShovel(ToolMaterial.WOOD, 0), "ghostwood_shovel"); + ghostwoodAxe = registerItem(new ItemNaturaAxe(ToolMaterial.WOOD, 0), "ghostwood_axe"); + ghostwoodKama = registerItem(new ItemNaturaKama(ToolMaterial.WOOD), "ghostwood_kama"); + ghostwoodBow = registerItem(new ItemNaturaBow(384, ghostwoodBow), "ghostwood_bow"); + + bloodwoodSword = registerItem(new ItemNaturaSword(bloodwoodMaterial), "bloodwood_sword"); + bloodwoodPickaxe = registerItem(new ItemNaturaPickaxe(bloodwoodMaterial, 2), "bloodwood_pickaxe"); + bloodwoodShovel = registerItem(new ItemNaturaShovel(bloodwoodMaterial, 2), "bloodwood_shovel"); + bloodwoodAxe = registerItem(new ItemNaturaAxe(bloodwoodMaterial, 2, 3.0F, -3.0F), "bloodwood_axe"); + bloodwoodKama = registerItem(new ItemNaturaKama(bloodwoodMaterial), "bloodwood_kama"); + bloodwoodBow = registerItem(new ItemNaturaBow(1501, bloodwoodBow), "bloodwood_bow"); + + darkwoodSword = registerItem(new ItemNaturaSword(ToolMaterial.STONE), "darkwood_sword"); + darkwoodPickaxe = registerItem(new ItemNaturaPickaxe(ToolMaterial.STONE, 1), "darkwood_pickaxe"); + darkwoodShovel = registerItem(new ItemNaturaShovel(ToolMaterial.STONE, 1), "darkwood_shovel"); + darkwoodAxe = registerItem(new ItemNaturaAxe(ToolMaterial.STONE, 1), "darkwood_axe"); + darkwoodKama = registerItem(new ItemNaturaKama(ToolMaterial.STONE), "darkwood_kama"); + darkwoodBow = registerItem(new ItemNaturaBow(162, darkwoodBow), "darkwood_bow"); + + fusewoodSword = registerItem(new ItemNaturaSword(ToolMaterial.IRON), "fusewood_sword"); + fusewoodPickaxe = registerItem(new ItemNaturaPickaxe(ToolMaterial.IRON, 2), "fusewood_pickaxe"); + fusewoodShovel = registerItem(new ItemNaturaShovel(ToolMaterial.IRON, 2), "fusewood_shovel"); + fusewoodAxe = registerItem(new ItemNaturaAxe(ToolMaterial.IRON, 2), "fusewood_axe"); + fusewoodKama = registerItem(new ItemNaturaKama(ToolMaterial.IRON), "fusewood_kama"); + fusewoodBow = registerItem(new ItemNaturaBow(28, fusewoodBow), "fusewood_bow"); + + netherquartzSword = registerItem(new ItemNaturaSword(ToolMaterial.STONE), "netherquartz_sword"); + netherquartzPickaxe = registerItem(new ItemNaturaPickaxe(ToolMaterial.STONE, 1), "netherquartz_pickaxe"); + netherquartzShovel = registerItem(new ItemNaturaShovel(ToolMaterial.STONE, 1), "netherquartz_shovel"); + netherquartzAxe = registerItem(new ItemNaturaAxe(ToolMaterial.STONE, 1), "netherquartz_axe"); + netherquartzKama = registerItem(new ItemNaturaKama(ToolMaterial.STONE), "netherquartz_kama"); + + flintAndBlaze = registerItem(new ItemNaturaFlintAndBlaze(), "flint_and_blaze"); + } + + proxy.preInit(); + } + + @Subscribe + public void init(FMLInitializationEvent event) + { + proxy.init(); + this.registerRecipes(); + } + + private void registerRecipes() + { + // Tools + if (isNetherLoaded()) + { + int[] plankMeta = { BlockNetherPlanks.PlankType.GHOSTWOOD.getMeta(), BlockNetherPlanks.PlankType.BLOODWOOD.getMeta(), BlockNetherPlanks.PlankType.DARKWOOD.getMeta(), BlockNetherPlanks.PlankType.FUSEWOOD.getMeta() }; + ItemStack[] stickItem = { NaturaCommons.ghostwood_stick.copy(), NaturaCommons.bloodwood_stick.copy(), NaturaCommons.darkwood_stick.copy(), NaturaCommons.fusewood_stick.copy() }; + + Item[][] tools = { { ghostwoodSword, ghostwoodPickaxe, ghostwoodShovel, ghostwoodAxe, ghostwoodKama, ghostwoodBow }, + { bloodwoodSword, bloodwoodPickaxe, bloodwoodShovel, bloodwoodAxe, bloodwoodKama, bloodwoodBow }, + { darkwoodSword, darkwoodPickaxe, darkwoodShovel, darkwoodAxe, darkwoodKama, darkwoodBow }, + { fusewoodSword, fusewoodPickaxe, fusewoodShovel, fusewoodAxe, fusewoodKama, fusewoodBow } }; + + for (int i = 0; i < plankMeta.length; i++) + { + addShapedRecipe(new ItemStack(tools[i][0], 1, 0), "#", "#", "s", '#', new ItemStack(NaturaNether.netherPlanks, 1, plankMeta[i]), 's', stickItem[i]); + addShapedRecipe(new ItemStack(tools[i][1], 1, 0), "###", " s ", " s ", '#', new ItemStack(NaturaNether.netherPlanks, 1, plankMeta[i]), 's', stickItem[i]); + addShapedRecipe(new ItemStack(tools[i][2], 1, 0), "#", "s", "s", '#', new ItemStack(NaturaNether.netherPlanks, 1, plankMeta[i]), 's', stickItem[i]); + addShapedRecipe(new ItemStack(tools[i][3], 1, 0), "##", "#s", " s", '#', new ItemStack(NaturaNether.netherPlanks, 1, plankMeta[i]), 's', stickItem[i]); + addShapedRecipe(new ItemStack(tools[i][4], 1, 0), "##", " s", " s", '#', new ItemStack(NaturaNether.netherPlanks, 1, plankMeta[i]), 's', stickItem[i]); + addShapedRecipe(new ItemStack(tools[i][5], 1, 0), "#s ", "# s", "#s ", '#', NaturaCommons.flameString.copy(), 's', stickItem[i]); + } + } + + GameRegistry.addRecipe(new ItemStack(netherquartzSword, 1, 0), "#", "#", "s", '#', new ItemStack(Blocks.QUARTZ_BLOCK, 1, OreDictionary.WILDCARD_VALUE), 's', NaturaCommons.ghostwood_stick.copy()); + GameRegistry.addRecipe(new ItemStack(netherquartzPickaxe, 1, 0), "###", " s ", " s ", '#', new ItemStack(Blocks.QUARTZ_BLOCK, 1, OreDictionary.WILDCARD_VALUE), 's', NaturaCommons.ghostwood_stick.copy()); + GameRegistry.addRecipe(new ItemStack(netherquartzShovel, 1, 0), "#", "s", "s", '#', new ItemStack(Blocks.QUARTZ_BLOCK, 1, OreDictionary.WILDCARD_VALUE), 's', NaturaCommons.ghostwood_stick.copy()); + GameRegistry.addRecipe(new ItemStack(netherquartzAxe, 1, 0), "##", "#s", " s", '#', new ItemStack(Blocks.QUARTZ_BLOCK, 1, OreDictionary.WILDCARD_VALUE), 's', NaturaCommons.ghostwood_stick.copy()); + + if (isEntitiesLoaded()) + { + impHelmetStack = new ItemStack(impHelmet); + impHelmetStack.addEnchantment(Enchantments.PROTECTION, 1); + impHelmetStack.addEnchantment(Enchantments.FIRE_PROTECTION, 1); + GameRegistry.addRecipe(impHelmetStack.copy(), "###", "# #", '#', NaturaCommons.impLeather.copy()); + + impChestplateStack = new ItemStack(impChestplate); + impChestplateStack.addEnchantment(Enchantments.BLAST_PROTECTION, 1); + impChestplateStack.addEnchantment(Enchantments.FIRE_PROTECTION, 1); + GameRegistry.addRecipe(impChestplateStack.copy(), "# #", "###", "###", '#', NaturaCommons.impLeather.copy()); + + impLeggingsStack = new ItemStack(impLeggings); + impLeggingsStack.addEnchantment(Enchantments.PROJECTILE_PROTECTION, 1); + impLeggingsStack.addEnchantment(Enchantments.FIRE_PROTECTION, 1); + GameRegistry.addRecipe(impLeggingsStack.copy(), "###", "# #", "# #", '#', NaturaCommons.impLeather.copy()); + + impBootsStack = new ItemStack(impBoots); + impBootsStack.addEnchantment(Enchantments.FEATHER_FALLING, 1); + impBootsStack.addEnchantment(Enchantments.FIRE_PROTECTION, 1); + GameRegistry.addRecipe(impBootsStack.copy(), "# #", "# #", '#', NaturaCommons.impLeather.copy()); + } + } + +} diff --git a/src/main/java/com/progwml6/natura/tools/ToolsClientProxy.java b/src/main/java/com/progwml6/natura/tools/ToolsClientProxy.java new file mode 100644 index 00000000..308acca4 --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/ToolsClientProxy.java @@ -0,0 +1,98 @@ +package com.progwml6.natura.tools; + +import com.progwml6.natura.common.ClientProxy; + +import net.minecraft.item.ItemStack; + +public class ToolsClientProxy extends ClientProxy +{ + @Override + public void preInit() + { + super.preInit(); + } + + @Override + public void init() + { + super.init(); + } + + @Override + protected void registerModels() + { + // Armor + this.registerItemModelNatura(new ItemStack(NaturaTools.impHelmet), "imp_armor_helmet"); + this.registerItemModelNatura(new ItemStack(NaturaTools.impChestplate), "imp_armor_chestplate"); + this.registerItemModelNatura(new ItemStack(NaturaTools.impLeggings), "imp_armor_leggings"); + this.registerItemModelNatura(new ItemStack(NaturaTools.impBoots), "imp_armor_boots"); + + this.registerItemModelNatura(new ItemStack(NaturaTools.ghostwoodSword), "ghostwood_sword"); + this.registerItemModelNatura(new ItemStack(NaturaTools.ghostwoodPickaxe), "ghostwood_pickaxe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.ghostwoodShovel), "ghostwood_shovel"); + this.registerItemModelNatura(new ItemStack(NaturaTools.ghostwoodAxe), "ghostwood_axe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.ghostwoodKama), "ghostwood_kama"); + + ItemStack stack = new ItemStack(NaturaTools.ghostwoodBow, 1, 0); + this.registerItemModelNatura(stack, "ghostwood_bow"); + stack = new ItemStack(NaturaTools.ghostwoodBow, 1, 1); + this.registerItemModelNatura(stack, "ghostwood_bow_pulling_0"); + stack = new ItemStack(NaturaTools.ghostwoodBow, 1, 2); + this.registerItemModelNatura(stack, "ghostwood_bow_pulling_1"); + stack = new ItemStack(NaturaTools.ghostwoodBow, 1, 3); + this.registerItemModelNatura(stack, "ghostwood_bow_pulling_2"); + + this.registerItemModelNatura(new ItemStack(NaturaTools.bloodwoodSword), "bloodwood_sword"); + this.registerItemModelNatura(new ItemStack(NaturaTools.bloodwoodPickaxe), "bloodwood_pickaxe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.bloodwoodShovel), "bloodwood_shovel"); + this.registerItemModelNatura(new ItemStack(NaturaTools.bloodwoodAxe), "bloodwood_axe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.bloodwoodKama), "bloodwood_kama"); + + stack = new ItemStack(NaturaTools.bloodwoodBow, 1, 0); + this.registerItemModelNatura(stack, "bloodwood_bow"); + stack = new ItemStack(NaturaTools.bloodwoodBow, 1, 1); + this.registerItemModelNatura(stack, "bloodwood_bow_pulling_0"); + stack = new ItemStack(NaturaTools.bloodwoodBow, 1, 2); + this.registerItemModelNatura(stack, "bloodwood_bow_pulling_1"); + stack = new ItemStack(NaturaTools.bloodwoodBow, 1, 3); + this.registerItemModelNatura(stack, "bloodwood_bow_pulling_2"); + + this.registerItemModelNatura(new ItemStack(NaturaTools.darkwoodSword), "darkwood_sword"); + this.registerItemModelNatura(new ItemStack(NaturaTools.darkwoodPickaxe), "darkwood_pickaxe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.darkwoodShovel), "darkwood_shovel"); + this.registerItemModelNatura(new ItemStack(NaturaTools.darkwoodAxe), "darkwood_axe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.darkwoodKama), "darkwood_kama"); + + stack = new ItemStack(NaturaTools.darkwoodBow, 1, 0); + this.registerItemModelNatura(stack, "darkwood_bow"); + stack = new ItemStack(NaturaTools.darkwoodBow, 1, 1); + this.registerItemModelNatura(stack, "darkwood_bow_pulling_0"); + stack = new ItemStack(NaturaTools.darkwoodBow, 1, 2); + this.registerItemModelNatura(stack, "darkwood_bow_pulling_1"); + stack = new ItemStack(NaturaTools.darkwoodBow, 1, 3); + this.registerItemModelNatura(stack, "darkwood_bow_pulling_2"); + + this.registerItemModelNatura(new ItemStack(NaturaTools.fusewoodSword), "fusewood_sword"); + this.registerItemModelNatura(new ItemStack(NaturaTools.fusewoodPickaxe), "fusewood_pickaxe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.fusewoodShovel), "fusewood_shovel"); + this.registerItemModelNatura(new ItemStack(NaturaTools.fusewoodAxe), "fusewood_axe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.fusewoodKama), "fusewood_kama"); + + stack = new ItemStack(NaturaTools.fusewoodBow, 1, 0); + this.registerItemModelNatura(stack, "fusewood_bow"); + stack = new ItemStack(NaturaTools.fusewoodBow, 1, 1); + this.registerItemModelNatura(stack, "fusewood_bow_pulling_0"); + stack = new ItemStack(NaturaTools.fusewoodBow, 1, 2); + this.registerItemModelNatura(stack, "fusewood_bow_pulling_1"); + stack = new ItemStack(NaturaTools.fusewoodBow, 1, 3); + this.registerItemModelNatura(stack, "fusewood_bow_pulling_2"); + + this.registerItemModelNatura(new ItemStack(NaturaTools.netherquartzSword), "netherquartz_sword"); + this.registerItemModelNatura(new ItemStack(NaturaTools.netherquartzPickaxe), "netherquartz_pickaxe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.netherquartzShovel), "netherquartz_shovel"); + this.registerItemModelNatura(new ItemStack(NaturaTools.netherquartzAxe), "netherquartz_axe"); + this.registerItemModelNatura(new ItemStack(NaturaTools.netherquartzKama), "netherquartz_kama"); + + this.registerItemModelNatura(new ItemStack(NaturaTools.flintAndBlaze), "flint_and_blaze"); + } +} diff --git a/src/main/java/com/progwml6/natura/tools/item/armor/ItemNaturaImpArmor.java b/src/main/java/com/progwml6/natura/tools/item/armor/ItemNaturaImpArmor.java new file mode 100644 index 00000000..d3316590 --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/item/armor/ItemNaturaImpArmor.java @@ -0,0 +1,47 @@ +package com.progwml6.natura.tools.item.armor; + +import com.progwml6.natura.tools.NaturaTools; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.inventory.EntityEquipmentSlot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; + +public class ItemNaturaImpArmor extends ItemArmor +{ + public ItemNaturaImpArmor(ArmorMaterial armorMaterialIn, EntityEquipmentSlot equipmentSlotIn) + { + super(armorMaterialIn, 1, equipmentSlotIn); + } + + @Override + public void getSubItems(Item id, CreativeTabs tab, NonNullList list) + { + switch (this.armorType) + { + case HEAD: + list.add(NaturaTools.impHelmetStack.copy()); + break; + case CHEST: + list.add(NaturaTools.impChestplateStack.copy()); + break; + case LEGS: + list.add(NaturaTools.impLeggingsStack.copy()); + break; + case FEET: + list.add(NaturaTools.impBootsStack.copy()); + break; + default: + break; + } + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) + { + return "natura:textures/armor/imp_armor" + (slot == EntityEquipmentSlot.LEGS ? "_legs" : "") + ".png"; + } +} diff --git a/src/main/java/com/progwml6/natura/tools/item/bows/ItemNaturaBow.java b/src/main/java/com/progwml6/natura/tools/item/bows/ItemNaturaBow.java new file mode 100644 index 00000000..a090f78b --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/item/bows/ItemNaturaBow.java @@ -0,0 +1,62 @@ +package com.progwml6.natura.tools.item.bows; + +import javax.annotation.Nullable; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.IItemPropertyGetter; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBow; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemNaturaBow extends ItemBow +{ + private Item bow; + + public ItemNaturaBow(int damage, Item bow) + { + super(); + this.setMaxDamage(damage); + this.setCreativeTab(NaturaRegistry.tabGeneral); + this.setFull3D(); + this.bow = bow; + + this.addPropertyOverride(new ResourceLocation("pull"), new IItemPropertyGetter() + { + @Override + @SideOnly(Side.CLIENT) + public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) + { + return ItemNaturaBow.this.updatePullProperty(stack, worldIn, entityIn); + } + }); + + this.addPropertyOverride(new ResourceLocation("pulling"), new IItemPropertyGetter() + { + @Override + @SideOnly(Side.CLIENT) + public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) + { + return entityIn != null && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? 1.0F : 0.0F; + } + }); + } + + private float updatePullProperty(ItemStack stack, World worldIn, EntityLivingBase entityIn) + { + if (entityIn == null) + { + return 0.0F; + } + else + { + ItemStack itemstack = entityIn.getActiveItemStack(); + return itemstack != ItemStack.EMPTY && itemstack.getItem() == this.bow ? (stack.getMaxItemUseDuration() - entityIn.getItemInUseCount()) / 20.0F : 0.0F; + } + } +} diff --git a/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaAxe.java b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaAxe.java new file mode 100644 index 00000000..fbc61e70 --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaAxe.java @@ -0,0 +1,26 @@ +package com.progwml6.natura.tools.item.tools; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.item.ItemAxe; + +public class ItemNaturaAxe extends ItemAxe +{ + private static final float[] ATTACK_DAMAGES = new float[] { 6.0F, 8.0F, 8.0F, 8.0F, 6.0F }; + + private static final float[] ATTACK_SPEEDS = new float[] { -3.2F, -3.2F, -3.1F, -3.0F, -3.0F }; + + public ItemNaturaAxe(ToolMaterial toolMaterialIn, int harvestLevelIn, float damageIn, float speedIn) + { + super(toolMaterialIn, damageIn, speedIn); + + this.setCreativeTab(NaturaRegistry.tabGeneral); + + this.setHarvestLevel("axe", harvestLevelIn); + } + + public ItemNaturaAxe(ToolMaterial toolMaterialIn, int harvestLevelIn) + { + this(toolMaterialIn, harvestLevelIn, ATTACK_DAMAGES[toolMaterialIn.ordinal()], ATTACK_SPEEDS[toolMaterialIn.ordinal()]); + } +} diff --git a/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaFlintAndBlaze.java b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaFlintAndBlaze.java new file mode 100644 index 00000000..370571fa --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaFlintAndBlaze.java @@ -0,0 +1,51 @@ +package com.progwml6.natura.tools.item.tools; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.SoundEvents; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class ItemNaturaFlintAndBlaze extends Item +{ + public ItemNaturaFlintAndBlaze() + { + this.maxStackSize = 1; + this.setMaxDamage(64); + this.setCreativeTab(NaturaRegistry.tabGeneral); + } + + /** + * Called when a Block is right-clicked with this Item + */ + @Override + public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + pos = pos.offset(facing); + ItemStack itemstack = player.getHeldItem(hand); + + if (!player.canPlayerEdit(pos, facing, itemstack)) + { + return EnumActionResult.FAIL; + } + else + { + if (worldIn.isAirBlock(pos)) + { + worldIn.playSound(player, pos, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + worldIn.setBlockState(pos, Blocks.FIRE.getDefaultState(), 11); + } + + itemstack.damageItem(1, player); + return EnumActionResult.SUCCESS; + } + } +} diff --git a/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaKama.java b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaKama.java new file mode 100644 index 00000000..294b8e09 --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaKama.java @@ -0,0 +1,128 @@ +package com.progwml6.natura.tools.item.tools; + +import java.util.List; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import slimeknights.mantle.item.ItemTooltip; + +public class ItemNaturaKama extends ItemSword +{ + public ItemNaturaKama(ToolMaterial toolMaterialIn) + { + super(toolMaterialIn); + this.setCreativeTab(NaturaRegistry.tabGeneral); + } + + /** + * Called when a Block is destroyed using this Item. Return true to trigger the "Use Item" statistic. + */ + @Override + public boolean onBlockDestroyed(ItemStack stack, World worldIn, IBlockState state, BlockPos pos, EntityLivingBase entityLiving) + { + return true; + } + + /** + * Check whether this Item can harvest the given Block + */ + @Override + public boolean canHarvestBlock(IBlockState blockIn) + { + Block block = blockIn.getBlock(); + return block == Blocks.WEB || block == Blocks.REDSTONE_WIRE || block == Blocks.TRIPWIRE; + } + + @Override + public float getStrVsBlock(ItemStack stack, IBlockState state) + { + Block block = state.getBlock(); + return block != Blocks.WEB && state.getMaterial() != Material.LEAVES ? (block == Blocks.WOOL ? 5.0F : super.getStrVsBlock(stack, state)) : 15.0F; + } + + /** + * Returns true if the item can be used on the given entity, e.g. shears on sheep. + */ + @Override + public boolean itemInteractionForEntity(ItemStack itemstack, net.minecraft.entity.player.EntityPlayer player, EntityLivingBase entity, net.minecraft.util.EnumHand hand) + { + if (entity.world.isRemote) + { + return false; + } + if (entity instanceof net.minecraftforge.common.IShearable) + { + net.minecraftforge.common.IShearable target = (net.minecraftforge.common.IShearable) entity; + BlockPos pos = new BlockPos(entity.posX, entity.posY, entity.posZ); + if (target.isShearable(itemstack, entity.world, pos)) + { + java.util.List drops = target.onSheared(itemstack, entity.world, pos, + net.minecraft.enchantment.EnchantmentHelper.getEnchantmentLevel(net.minecraft.init.Enchantments.FORTUNE, itemstack)); + + java.util.Random rand = new java.util.Random(); + for (ItemStack stack : drops) + { + net.minecraft.entity.item.EntityItem ent = entity.entityDropItem(stack, 1.0F); + ent.motionY += rand.nextFloat() * 0.05F; + ent.motionX += (rand.nextFloat() - rand.nextFloat()) * 0.1F; + ent.motionZ += (rand.nextFloat() - rand.nextFloat()) * 0.1F; + } + itemstack.damageItem(1, entity); + } + return true; + } + return false; + } + + @Override + public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, net.minecraft.entity.player.EntityPlayer player) + { + if (player.world.isRemote || player.capabilities.isCreativeMode) + { + return false; + } + Block block = player.world.getBlockState(pos).getBlock(); + if (block instanceof net.minecraftforge.common.IShearable) + { + net.minecraftforge.common.IShearable target = (net.minecraftforge.common.IShearable) block; + if (target.isShearable(itemstack, player.world, pos)) + { + java.util.List drops = target.onSheared(itemstack, player.world, pos, + net.minecraft.enchantment.EnchantmentHelper.getEnchantmentLevel(net.minecraft.init.Enchantments.FORTUNE, itemstack)); + java.util.Random rand = new java.util.Random(); + + for (ItemStack stack : drops) + { + float f = 0.7F; + double d = rand.nextFloat() * f + (1.0F - f) * 0.5D; + double d1 = rand.nextFloat() * f + (1.0F - f) * 0.5D; + double d2 = rand.nextFloat() * f + (1.0F - f) * 0.5D; + net.minecraft.entity.item.EntityItem entityitem = new net.minecraft.entity.item.EntityItem(player.world, pos.getX() + d, pos.getY() + d1, pos.getZ() + d2, stack); + entityitem.setDefaultPickupDelay(); + player.world.spawnEntity(entityitem); + } + + itemstack.damageItem(1, player); + player.addStat(net.minecraft.stats.StatList.getBlockStats(block)); + } + } + return false; + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) + { + ItemTooltip.addOptionalTooltip(stack, tooltip); + super.addInformation(stack, playerIn, tooltip, advanced); + } +} diff --git a/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaPickaxe.java b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaPickaxe.java new file mode 100644 index 00000000..7170fdd3 --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaPickaxe.java @@ -0,0 +1,17 @@ +package com.progwml6.natura.tools.item.tools; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.item.ItemPickaxe; + +public class ItemNaturaPickaxe extends ItemPickaxe +{ + public ItemNaturaPickaxe(ToolMaterial toolMaterialIn, int harvestLevelIn) + { + super(toolMaterialIn); + + this.setCreativeTab(NaturaRegistry.tabGeneral); + + this.setHarvestLevel("pickaxe", harvestLevelIn); + } +} diff --git a/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaShovel.java b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaShovel.java new file mode 100644 index 00000000..1ae40f73 --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaShovel.java @@ -0,0 +1,17 @@ +package com.progwml6.natura.tools.item.tools; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.item.ItemSpade; + +public class ItemNaturaShovel extends ItemSpade +{ + public ItemNaturaShovel(ToolMaterial toolMaterialIn, int harvestLevelIn) + { + super(toolMaterialIn); + + this.setCreativeTab(NaturaRegistry.tabGeneral); + + this.setHarvestLevel("shovel", harvestLevelIn); + } +} diff --git a/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaSword.java b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaSword.java new file mode 100644 index 00000000..5ca5aac9 --- /dev/null +++ b/src/main/java/com/progwml6/natura/tools/item/tools/ItemNaturaSword.java @@ -0,0 +1,14 @@ +package com.progwml6.natura.tools.item.tools; + +import com.progwml6.natura.library.NaturaRegistry; + +import net.minecraft.item.ItemSword; + +public class ItemNaturaSword extends ItemSword +{ + public ItemNaturaSword(ToolMaterial toolMaterialIn) + { + super(toolMaterialIn); + this.setCreativeTab(NaturaRegistry.tabGeneral); + } +} diff --git a/src/main/java/com/progwml6/natura/world/NaturaWorld.java b/src/main/java/com/progwml6/natura/world/NaturaWorld.java index 526b1054..2d557ad6 100644 --- a/src/main/java/com/progwml6/natura/world/NaturaWorld.java +++ b/src/main/java/com/progwml6/natura/world/NaturaWorld.java @@ -7,11 +7,19 @@ import com.progwml6.natura.common.NaturaPulse; import com.progwml6.natura.common.config.Config; import com.progwml6.natura.library.Util; -import com.progwml6.natura.world.worldgen.BerryBushGenerator; +import com.progwml6.natura.world.dimension.WorldProviderNetherite; import com.progwml6.natura.world.worldgen.CloudGenerator; -import com.progwml6.natura.world.worldgen.TreeGenerator; +import com.progwml6.natura.world.worldgen.CropGenerator; +import com.progwml6.natura.world.worldgen.GlowshroomGenerator; +import com.progwml6.natura.world.worldgen.NetherBerryBushesGenerator; +import com.progwml6.natura.world.worldgen.NetherTreesGenerator; +import com.progwml6.natura.world.worldgen.OverworldBerryBushesGenerator; +import com.progwml6.natura.world.worldgen.OverworldTreesGenerator; +import com.progwml6.natura.world.worldgen.VineGenerator; import com.progwml6.natura.world.worldgen.retrogen.TickHandlerWorldRetrogen; +import net.minecraft.world.DimensionType; +import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @@ -20,7 +28,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry; import slimeknights.mantle.pulsar.pulse.Pulse; -@Pulse(id = NaturaWorld.PulseId, description = "Everything that's found in the world and worldgen") +@Pulse(id = NaturaWorld.PulseId, description = "Everything that's found in the world and worldgen including the netherite dimension") public class NaturaWorld extends NaturaPulse { public static final String PulseId = "NaturaWorld"; @@ -45,17 +53,35 @@ public void init(FMLInitializationEvent event) @Subscribe public void postInit(FMLPostInitializationEvent event) { - GameRegistry.registerWorldGenerator(TreeGenerator.INSTANCE, 0); - GameRegistry.registerWorldGenerator(BerryBushGenerator.INSTANCE, 0); - if (Config.enableCloudBlocks) + if (isOverworldLoaded()) { - GameRegistry.registerWorldGenerator(CloudGenerator.INSTANCE, 0); + GameRegistry.registerWorldGenerator(OverworldTreesGenerator.INSTANCE, 0); + GameRegistry.registerWorldGenerator(OverworldBerryBushesGenerator.INSTANCE, 0); + + if (Config.enableCloudBlocks) + { + GameRegistry.registerWorldGenerator(CloudGenerator.INSTANCE, 0); + } + + GameRegistry.registerWorldGenerator(CropGenerator.INSTANCE, 0); } - //GameRegistry.registerWorldGenerator(TreeGenerator.INSTANCE, 25); - //GameRegistry.registerWorldGenerator(BerryBushGenerator.INSTANCE, 25); + if (isNetherLoaded()) + { + GameRegistry.registerWorldGenerator(NetherTreesGenerator.INSTANCE, 0); + GameRegistry.registerWorldGenerator(NetherBerryBushesGenerator.INSTANCE, 0); + + GameRegistry.registerWorldGenerator(GlowshroomGenerator.INSTANCE, 0); + GameRegistry.registerWorldGenerator(VineGenerator.INSTANCE, 0); + + if (Config.overrideNether) + { + DimensionManager.unregisterDimension(-1); + DimensionManager.registerDimension(-1, DimensionType.register("Nether", "_nether", -1, WorldProviderNetherite.class, false)); + } + } - MinecraftForge.EVENT_BUS.register(new TickHandlerWorldRetrogen()); + MinecraftForge.EVENT_BUS.register(TickHandlerWorldRetrogen.INSTANCE); proxy.postInit(); } diff --git a/src/main/java/com/progwml6/natura/world/WorldEvents.java b/src/main/java/com/progwml6/natura/world/WorldEvents.java index 5aedd87a..ca5b30dc 100644 --- a/src/main/java/com/progwml6/natura/world/WorldEvents.java +++ b/src/main/java/com/progwml6/natura/world/WorldEvents.java @@ -1,13 +1,65 @@ package com.progwml6.natura.world; -import net.minecraftforge.event.entity.player.BonemealEvent; +import com.progwml6.natura.Natura; +import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.shared.NaturaCommons; + +import net.minecraft.entity.EntityCreature; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.ai.EntityAITempt; +import net.minecraft.entity.passive.EntityAnimal; +import net.minecraft.entity.passive.EntityChicken; +import net.minecraft.entity.passive.EntityCow; +import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteract; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class WorldEvents { @SubscribeEvent - public void bonemealEvent(BonemealEvent event) + public void interactEvent(EntityInteract event) + { + if (event.getTarget() instanceof EntityCow || event.getTarget() instanceof EntitySheep) + { + ItemStack equipped = event.getEntityPlayer().getHeldItem(event.getHand()); + EntityAnimal creature = (EntityAnimal) event.getTarget(); + + if (equipped != null && equipped == NaturaCommons.barley && creature.getGrowingAge() == 0 && !creature.isInLove()) + { + EntityPlayer player = event.getEntityPlayer(); + + if (!player.capabilities.isCreativeMode) + { + equipped.shrink(1); + + if (equipped.getCount() <= 0) + { + player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY); + } + } + + creature.setInLove(event.getEntityPlayer()); + } + } + } + + @SubscribeEvent + public void onLivingJoin(EntityJoinWorldEvent event) { + if (event.getEntity() instanceof EntityCow || event.getEntity() instanceof EntitySheep) + { + ((EntityLiving) event.getEntity()).tasks.addTask(3, new EntityAITempt((EntityCreature) event.getEntity(), 0.25F, NaturaCommons.materials, false)); + } + if (Natura.pulseManager.isPulseLoaded(NaturaOverworld.PulseId)) + { + if (event.getEntity() instanceof EntityChicken) + { + ((EntityLiving) event.getEntity()).tasks.addTask(3, new EntityAITempt((EntityCreature) event.getEntity(), 0.25F, NaturaOverworld.overworldSeeds, false)); + } + } } } diff --git a/src/main/java/com/progwml6/natura/world/dimension/ChunkNetherite.java b/src/main/java/com/progwml6/natura/world/dimension/ChunkNetherite.java new file mode 100644 index 00000000..37c66248 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/dimension/ChunkNetherite.java @@ -0,0 +1,41 @@ +package com.progwml6.natura.world.dimension; + +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.ChunkPrimer; +import net.minecraft.world.chunk.storage.ExtendedBlockStorage; + +public class ChunkNetherite extends Chunk +{ + public ChunkNetherite(World worldIn, ChunkPrimer primer, int x, int z) + { + super(worldIn, x, z); + boolean flag = !worldIn.provider.hasNoSky(); + ExtendedBlockStorage[] storageArrays = this.getBlockStorageArray(); + + for (int j = 0; j < 16; ++j) + { + for (int k = 0; k < 16; ++k) + { + for (int l = 0; l < 256; ++l) + { + IBlockState iblockstate = primer.getBlockState(j, l, k); + + if (iblockstate.getMaterial() != Material.AIR) + { + int i1 = l >> 4; + + if (storageArrays[i1] == NULL_BLOCK_STORAGE) + { + storageArrays[i1] = new ExtendedBlockStorage(i1 << 4, flag); + } + + storageArrays[i1].set(j, l & 15, k, iblockstate); + } + } + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/world/dimension/ChunkProviderNetherite.java b/src/main/java/com/progwml6/natura/world/dimension/ChunkProviderNetherite.java new file mode 100644 index 00000000..475b3778 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/dimension/ChunkProviderNetherite.java @@ -0,0 +1,547 @@ +package com.progwml6.natura.world.dimension; + +import java.util.List; +import java.util.Random; + +import javax.annotation.Nullable; + +import com.progwml6.natura.nether.NaturaNether; + +import net.minecraft.block.BlockFalling; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.block.state.pattern.BlockMatcher; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.ChunkPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.ChunkPrimer; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.gen.MapGenBase; +import net.minecraft.world.gen.MapGenCavesHell; +import net.minecraft.world.gen.NoiseGeneratorOctaves; +import net.minecraft.world.gen.feature.WorldGenBush; +import net.minecraft.world.gen.feature.WorldGenGlowStone1; +import net.minecraft.world.gen.feature.WorldGenGlowStone2; +import net.minecraft.world.gen.feature.WorldGenHellLava; +import net.minecraft.world.gen.feature.WorldGenMinable; +import net.minecraft.world.gen.feature.WorldGenerator; +import net.minecraft.world.gen.structure.MapGenNetherBridge; + +public class ChunkProviderNetherite implements IChunkGenerator +{ + protected static final IBlockState AIR = Blocks.AIR.getDefaultState(); + + protected static final IBlockState NETHERRACK = Blocks.NETHERRACK.getDefaultState(); + + protected static final IBlockState BEDROCK = Blocks.BEDROCK.getDefaultState(); + + protected static final IBlockState LAVA = Blocks.LAVA.getDefaultState(); + + protected static final IBlockState GRAVEL = Blocks.GRAVEL.getDefaultState(); + + protected static final IBlockState SOUL_SAND = Blocks.SOUL_SAND.getDefaultState(); + + protected static final IBlockState TAINTED_SOIL = NaturaNether.netherTaintedSoil.getDefaultState(); + + protected static final IBlockState HEAT_SAND = NaturaNether.netherHeatSand.getDefaultState(); + + private final World world; + + private final boolean generateStructures; + + private final Random rand; + + /** Holds the noise used to determine whether slowsand can be generated at a location */ + private double[] slowsandNoise = new double[256]; + + private double[] gravelNoise = new double[256]; + + private double[] depthBuffer = new double[256]; + + private double[] buffer; + + private NoiseGeneratorOctaves lperlinNoise1; + + private NoiseGeneratorOctaves lperlinNoise2; + + private NoiseGeneratorOctaves perlinNoise1; + + /** Determines whether slowsand or gravel can be generated at a location */ + private NoiseGeneratorOctaves slowsandGravelNoiseGen; + + /** Determines whether something other than nettherack can be generated at a location */ + private NoiseGeneratorOctaves netherrackExculsivityNoiseGen; + + public NoiseGeneratorOctaves scaleNoise; + + public NoiseGeneratorOctaves depthNoise; + + private final WorldGenNetheriteFire fireFeature = new WorldGenNetheriteFire(); + + private final WorldGenGlowStone1 lightGemGen = new WorldGenGlowStone1(); + + private final WorldGenGlowStone2 hellPortalGen = new WorldGenGlowStone2(); + + private final WorldGenerator quartzGen = new WorldGenMinable(Blocks.QUARTZ_ORE.getDefaultState(), 14, BlockMatcher.forBlock(Blocks.NETHERRACK)); + + private final WorldGenerator magmaGen = new WorldGenMinable(Blocks.MAGMA.getDefaultState(), 33, BlockMatcher.forBlock(Blocks.NETHERRACK)); + + private final WorldGenHellLava lavaTrapGen = new WorldGenHellLava(Blocks.FLOWING_LAVA, true); + + private final WorldGenHellLava hellSpringGen = new WorldGenHellLava(Blocks.FLOWING_LAVA, false); + + private final WorldGenBush brownMushroomFeature = new WorldGenBush(Blocks.BROWN_MUSHROOM); + + private final WorldGenBush redMushroomFeature = new WorldGenBush(Blocks.RED_MUSHROOM); + + private MapGenNetherBridge genNetherBridge = new MapGenNetherBridge(); + + private MapGenBase genNetherCaves = new MapGenCavesHell(); + + double[] pnr; + + double[] ar; + + double[] br; + + double[] noiseData4; + + double[] dr; + + public ChunkProviderNetherite(World worldIn, boolean p_i45637_2_, long seed) + { + this.world = worldIn; + this.generateStructures = p_i45637_2_; + this.rand = new Random(seed); + this.lperlinNoise1 = new NoiseGeneratorOctaves(this.rand, 16); + this.lperlinNoise2 = new NoiseGeneratorOctaves(this.rand, 16); + this.perlinNoise1 = new NoiseGeneratorOctaves(this.rand, 8); + this.slowsandGravelNoiseGen = new NoiseGeneratorOctaves(this.rand, 4); + this.netherrackExculsivityNoiseGen = new NoiseGeneratorOctaves(this.rand, 4); + this.scaleNoise = new NoiseGeneratorOctaves(this.rand, 10); + this.depthNoise = new NoiseGeneratorOctaves(this.rand, 16); + worldIn.setSeaLevel(63); + + net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextHell ctx = new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextHell(lperlinNoise1, lperlinNoise2, perlinNoise1, slowsandGravelNoiseGen, netherrackExculsivityNoiseGen, scaleNoise, depthNoise); + ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, this.rand, ctx); + this.lperlinNoise1 = ctx.getLPerlin1(); + this.lperlinNoise2 = ctx.getLPerlin2(); + this.perlinNoise1 = ctx.getPerlin(); + this.slowsandGravelNoiseGen = ctx.getPerlin2(); + this.netherrackExculsivityNoiseGen = ctx.getPerlin3(); + this.scaleNoise = ctx.getScale(); + this.depthNoise = ctx.getDepth(); + this.genNetherBridge = (MapGenNetherBridge) net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(genNetherBridge, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_BRIDGE); + this.genNetherCaves = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(genNetherCaves, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_CAVE); + } + + public void prepareHeights(int p_185936_1_, int p_185936_2_, ChunkPrimer primer) + { + int j = this.world.getSeaLevel() / 2 + 1; + this.buffer = this.getHeights(this.buffer, p_185936_1_ * 4, 0, p_185936_2_ * 4, 5, 17, 5); + + for (int j1 = 0; j1 < 4; ++j1) + { + for (int k1 = 0; k1 < 4; ++k1) + { + for (int l1 = 0; l1 < 16; ++l1) + { + double d1 = this.buffer[((j1 + 0) * 5 + k1 + 0) * 17 + l1 + 0]; + double d2 = this.buffer[((j1 + 0) * 5 + k1 + 1) * 17 + l1 + 0]; + double d3 = this.buffer[((j1 + 1) * 5 + k1 + 0) * 17 + l1 + 0]; + double d4 = this.buffer[((j1 + 1) * 5 + k1 + 1) * 17 + l1 + 0]; + double d5 = (this.buffer[((j1 + 0) * 5 + k1 + 0) * 17 + l1 + 1] - d1) * 0.125D; + double d6 = (this.buffer[((j1 + 0) * 5 + k1 + 1) * 17 + l1 + 1] - d2) * 0.125D; + double d7 = (this.buffer[((j1 + 1) * 5 + k1 + 0) * 17 + l1 + 1] - d3) * 0.125D; + double d8 = (this.buffer[((j1 + 1) * 5 + k1 + 1) * 17 + l1 + 1] - d4) * 0.125D; + + for (int i2 = 0; i2 < 8; ++i2) + { + double d10 = d1; + double d11 = d2; + double d12 = (d3 - d1) * 0.25D; + double d13 = (d4 - d2) * 0.25D; + + for (int j2 = 0; j2 < 4; ++j2) + { + double d15 = d10; + double d16 = (d11 - d10) * 0.25D; + + for (int k2 = 0; k2 < 4; ++k2) + { + IBlockState iblockstate = null; + + if (l1 * 8 + i2 < j) + { + iblockstate = LAVA; + } + + if (d15 > 0.0D) + { + iblockstate = NETHERRACK; + } + + if (d15 > 56.0D) + { + iblockstate = TAINTED_SOIL; + } + + int l2 = j2 + j1 * 4; + int i3 = i2 + l1 * 8; + int j3 = k2 + k1 * 4; + primer.setBlockState(l2, i3, j3, iblockstate); + d15 += d16; + } + + d10 += d12; + d11 += d13; + } + + d1 += d5; + d2 += d6; + d3 += d7; + d4 += d8; + } + } + } + } + } + + public void buildSurfaces(int p_185937_1_, int p_185937_2_, ChunkPrimer primer) + { + if (!net.minecraftforge.event.ForgeEventFactory.onReplaceBiomeBlocks(this, p_185937_1_, p_185937_2_, primer, this.world)) + return; + int i = this.world.getSeaLevel() + 1; + this.slowsandNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.slowsandNoise, p_185937_1_ * 16, p_185937_2_ * 16, 0, 16, 16, 1, 0.03125D, 0.03125D, 1.0D); + this.gravelNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.gravelNoise, p_185937_1_ * 16, 109, p_185937_2_ * 16, 16, 1, 16, 0.03125D, 1.0D, 0.03125D); + this.depthBuffer = this.netherrackExculsivityNoiseGen.generateNoiseOctaves(this.depthBuffer, p_185937_1_ * 16, p_185937_2_ * 16, 0, 16, 16, 1, 0.0625D, 0.0625D, 0.0625D); + + for (int j = 0; j < 16; ++j) + { + for (int k = 0; k < 16; ++k) + { + boolean flag = this.slowsandNoise[j + k * 16] + this.rand.nextDouble() * 0.2D > 0.0D; + boolean flag1 = this.gravelNoise[j + k * 16] + this.rand.nextDouble() * 0.2D > 0.0D; + int l = (int) (this.depthBuffer[j + k * 16] / 3.0D + 3.0D + this.rand.nextDouble() * 0.25D); + int i1 = -1; + IBlockState iblockstate = NETHERRACK; + IBlockState iblockstate1 = TAINTED_SOIL; + + for (int j1 = 127; j1 >= 0; --j1) + { + if (j1 < 127 - this.rand.nextInt(5) && j1 > this.rand.nextInt(5)) + { + IBlockState iblockstate2 = primer.getBlockState(k, j1, j); + + if (iblockstate2.getBlock() != null && iblockstate2.getMaterial() != Material.AIR) + { + if (iblockstate2.getBlock() == Blocks.NETHERRACK) + { + if (i1 == -1) + { + if (l <= 0) + { + iblockstate = AIR; + iblockstate1 = NETHERRACK; + } + else if (j1 >= i - 4 && j1 <= i + 1) + { + iblockstate = NETHERRACK; + iblockstate1 = TAINTED_SOIL; + + if (flag1) + { + iblockstate = GRAVEL; + iblockstate1 = NETHERRACK; + } + + if (flag) + { + iblockstate = SOUL_SAND; + iblockstate1 = HEAT_SAND; + } + } + + if (j1 < i && (iblockstate == null || iblockstate.getMaterial() == Material.AIR)) + { + iblockstate = LAVA; + } + + i1 = l; + + if (j1 >= i - 1) + { + primer.setBlockState(k, j1, j, iblockstate); + } + else + { + primer.setBlockState(k, j1, j, iblockstate1); + } + } + else if (i1 > 0) + { + --i1; + primer.setBlockState(k, j1, j, iblockstate1); + } + } + } + else + { + i1 = -1; + } + } + else + { + primer.setBlockState(k, j1, j, BEDROCK); + } + } + } + } + } + + /** + * Generates the chunk at the specified position, from scratch + */ + @Override + public Chunk provideChunk(int x, int z) + { + this.rand.setSeed(x * 341873128712L + z * 132897987541L); + ChunkPrimer chunkprimer = new ChunkPrimer(); + this.prepareHeights(x, z, chunkprimer); + this.buildSurfaces(x, z, chunkprimer); + this.genNetherCaves.generate(this.world, x, z, chunkprimer); + + if (this.generateStructures) + { + this.genNetherBridge.generate(this.world, x, z, chunkprimer); + } + + Chunk chunk = new ChunkNetherite(this.world, chunkprimer, x, z); + Biome[] abiome = this.world.getBiomeProvider().getBiomes((Biome[]) null, x * 16, z * 16, 16, 16); + byte[] abyte = chunk.getBiomeArray(); + + for (int i = 0; i < abyte.length; ++i) + { + abyte[i] = (byte) Biome.getIdForBiome(abiome[i]); + } + + chunk.resetRelightChecks(); + return chunk; + } + + private double[] getHeights(double[] p_185938_1_, int p_185938_2_, int p_185938_3_, int p_185938_4_, int p_185938_5_, int p_185938_6_, int p_185938_7_) + { + if (p_185938_1_ == null) + { + p_185938_1_ = new double[p_185938_5_ * p_185938_6_ * p_185938_7_]; + } + + net.minecraftforge.event.terraingen.ChunkGeneratorEvent.InitNoiseField event = new net.minecraftforge.event.terraingen.ChunkGeneratorEvent.InitNoiseField(this, p_185938_1_, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, p_185938_6_, p_185938_7_); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event); + if (event.getResult() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) + return event.getNoisefield(); + + this.noiseData4 = this.scaleNoise.generateNoiseOctaves(this.noiseData4, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, 1, p_185938_7_, 1.0D, 0.0D, 1.0D); + this.dr = this.depthNoise.generateNoiseOctaves(this.dr, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, 1, p_185938_7_, 100.0D, 0.0D, 100.0D); + this.pnr = this.perlinNoise1.generateNoiseOctaves(this.pnr, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, p_185938_6_, p_185938_7_, 8.555150000000001D, 34.2206D, 8.555150000000001D); + this.ar = this.lperlinNoise1.generateNoiseOctaves(this.ar, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, p_185938_6_, p_185938_7_, 684.412D, 2053.236D, 684.412D); + this.br = this.lperlinNoise2.generateNoiseOctaves(this.br, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, p_185938_6_, p_185938_7_, 684.412D, 2053.236D, 684.412D); + int i = 0; + double[] adouble = new double[p_185938_6_]; + + for (int j = 0; j < p_185938_6_; ++j) + { + adouble[j] = Math.cos(j * Math.PI * 6.0D / p_185938_6_) * 2.0D; + double d2 = j; + + if (j > p_185938_6_ / 2) + { + d2 = p_185938_6_ - 1 - j; + } + + if (d2 < 4.0D) + { + d2 = 4.0D - d2; + adouble[j] -= d2 * d2 * d2 * 10.0D; + } + } + + for (int l = 0; l < p_185938_5_; ++l) + { + for (int i1 = 0; i1 < p_185938_7_; ++i1) + { + for (int k = 0; k < p_185938_6_; ++k) + { + double d4 = adouble[k]; + double d5 = this.ar[i] / 512.0D; + double d6 = this.br[i] / 512.0D; + double d7 = (this.pnr[i] / 10.0D + 1.0D) / 2.0D; + double d8; + + if (d7 < 0.0D) + { + d8 = d5; + } + else if (d7 > 1.0D) + { + d8 = d6; + } + else + { + d8 = d5 + (d6 - d5) * d7; + } + + d8 = d8 - d4; + + if (k > p_185938_6_ - 4) + { + double d9 = (k - (p_185938_6_ - 4)) / 3.0F; + d8 = d8 * (1.0D - d9) + -10.0D * d9; + } + + if (k < 0.0D) + { + double d10 = (0.0D - k) / 4.0D; + d10 = MathHelper.clamp(d10, 0.0D, 1.0D); + d8 = d8 * (1.0D - d10) + -10.0D * d10; + } + + p_185938_1_[i] = d8; + ++i; + } + } + } + + return p_185938_1_; + } + + /** + * Generate initial structures in this chunk, e.g. mineshafts, temples, lakes, and dungeons + */ + @Override + public void populate(int x, int z) + { + BlockFalling.fallInstantly = true; + net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.world, this.rand, x, z, false); + int i = x * 16; + int j = z * 16; + BlockPos blockpos = new BlockPos(i, 0, j); + Biome biome = this.world.getBiome(blockpos.add(16, 0, 16)); + ChunkPos chunkpos = new ChunkPos(x, z); + this.genNetherBridge.generateStructure(this.world, this.rand, chunkpos); + + if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.world, this.rand, x, z, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_LAVA)) + for (int k = 0; k < 8; ++k) + { + this.hellSpringGen.generate(this.world, this.rand, blockpos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(120) + 4, this.rand.nextInt(16) + 8)); + } + + if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.world, this.rand, x, z, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.FIRE)) + for (int i1 = 0; i1 < this.rand.nextInt(this.rand.nextInt(10) + 1) + 1; ++i1) + { + this.fireFeature.generate(this.world, this.rand, blockpos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(120) + 4, this.rand.nextInt(16) + 8)); + } + + if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.world, this.rand, x, z, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.GLOWSTONE)) + { + for (int j1 = 0; j1 < this.rand.nextInt(this.rand.nextInt(10) + 1); ++j1) + { + this.lightGemGen.generate(this.world, this.rand, blockpos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(120) + 4, this.rand.nextInt(16) + 8)); + } + + for (int k1 = 0; k1 < 10; ++k1) + { + this.hellPortalGen.generate(this.world, this.rand, blockpos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(128), this.rand.nextInt(16) + 8)); + } + } //Forge: End doGLowstone + + net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.world, this.rand, x, z, false); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.DecorateBiomeEvent.Pre(this.world, this.rand, blockpos)); + + if (net.minecraftforge.event.terraingen.TerrainGen.decorate(this.world, this.rand, blockpos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SHROOM)) + { + if (this.rand.nextBoolean()) + { + this.brownMushroomFeature.generate(this.world, this.rand, blockpos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(128), this.rand.nextInt(16) + 8)); + } + + if (this.rand.nextBoolean()) + { + this.redMushroomFeature.generate(this.world, this.rand, blockpos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(128), this.rand.nextInt(16) + 8)); + } + } + + if (net.minecraftforge.event.terraingen.TerrainGen.generateOre(this.world, this.rand, quartzGen, blockpos, net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.QUARTZ)) + for (int l1 = 0; l1 < 16; ++l1) + { + this.quartzGen.generate(this.world, this.rand, blockpos.add(this.rand.nextInt(16), this.rand.nextInt(108) + 10, this.rand.nextInt(16))); + } + + int i2 = this.world.getSeaLevel() / 2 + 1; + + if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.world, this.rand, x, z, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_MAGMA)) + for (int l = 0; l < 4; ++l) + { + this.magmaGen.generate(this.world, this.rand, blockpos.add(this.rand.nextInt(16), i2 - 5 + this.rand.nextInt(10), this.rand.nextInt(16))); + } + + if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.world, this.rand, x, z, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_LAVA2)) + for (int j2 = 0; j2 < 16; ++j2) + { + this.lavaTrapGen.generate(this.world, this.rand, blockpos.add(this.rand.nextInt(16), this.rand.nextInt(108) + 10, this.rand.nextInt(16))); + } + + biome.decorate(this.world, this.rand, new BlockPos(i, 0, j)); + + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.DecorateBiomeEvent.Post(this.world, this.rand, blockpos)); + + BlockFalling.fallInstantly = false; + } + + /** + * Called to generate additional structures after initial worldgen, used by ocean monuments + */ + @Override + public boolean generateStructures(Chunk chunkIn, int x, int z) + { + return false; + } + + @Override + public List getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos) + { + if (creatureType == EnumCreatureType.MONSTER) + { + if (this.genNetherBridge.isInsideStructure(pos)) + { + return this.genNetherBridge.getSpawnList(); + } + + if (this.genNetherBridge.isPositionInStructure(this.world, pos) && this.world.getBlockState(pos.down()).getBlock() == Blocks.NETHER_BRICK) + { + return this.genNetherBridge.getSpawnList(); + } + } + + Biome biome = this.world.getBiome(pos); + return biome.getSpawnableList(creatureType); + } + + @Override + @Nullable + public BlockPos getStrongholdGen(World worldIn, String structureName, BlockPos position, boolean p_180513_4_) + { + return "Fortress".equals(structureName) && this.genNetherBridge != null ? this.genNetherBridge.getClosestStrongholdPos(worldIn, position, p_180513_4_) : null; + } + + @Override + public void recreateStructures(Chunk chunkIn, int x, int z) + { + this.genNetherBridge.generate(this.world, x, z, (ChunkPrimer) null); + } +} diff --git a/src/main/java/com/progwml6/natura/world/dimension/WorldGenNetheriteFire.java b/src/main/java/com/progwml6/natura/world/dimension/WorldGenNetheriteFire.java new file mode 100644 index 00000000..99c613d4 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/dimension/WorldGenNetheriteFire.java @@ -0,0 +1,29 @@ +package com.progwml6.natura.world.dimension; + +import java.util.Random; + +import com.progwml6.natura.nether.NaturaNether; + +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class WorldGenNetheriteFire extends WorldGenerator +{ + @Override + public boolean generate(World worldIn, Random rand, BlockPos position) + { + for (int i = 0; i < 64; ++i) + { + BlockPos blockpos = position.add(rand.nextInt(8) - rand.nextInt(8), rand.nextInt(4) - rand.nextInt(4), rand.nextInt(8) - rand.nextInt(8)); + + if (worldIn.isAirBlock(blockpos) && (worldIn.getBlockState(blockpos.down()).getBlock() == Blocks.NETHERRACK || worldIn.getBlockState(blockpos.down()).getBlock() == NaturaNether.netherTaintedSoil)) + { + worldIn.setBlockState(blockpos, Blocks.FIRE.getDefaultState(), 2); + } + } + + return true; + } +} diff --git a/src/main/java/com/progwml6/natura/world/dimension/WorldProviderNetherite.java b/src/main/java/com/progwml6/natura/world/dimension/WorldProviderNetherite.java new file mode 100644 index 00000000..b995277f --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/dimension/WorldProviderNetherite.java @@ -0,0 +1,77 @@ +package com.progwml6.natura.world.dimension; + +import com.progwml6.natura.common.config.Config; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Biomes; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.WorldProviderHell; +import net.minecraft.world.biome.BiomeProvider; +import net.minecraft.world.biome.BiomeProviderSingle; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class WorldProviderNetherite extends WorldProviderHell +{ + /** + * Creates a new {@link BiomeProvider} for the WorldProvider, and also sets the values of {@link #hasSkylight} and + * {@link #hasNoSky} appropriately. + * + * Note that subclasses generally override this method without calling the parent version. + */ + @Override + public void init() + { + this.biomeProvider = new BiomeProviderSingle(Biomes.HELL); + this.doesWaterVaporize = true; + this.hasNoSky = true; + } + + @Override + public IChunkGenerator createChunkGenerator() + { + return new ChunkProviderNetherite(this.world, this.world.getWorldInfo().isMapFeaturesEnabled(), this.world.getSeed()); + } + + /** + * True if the player can respawn in this dimension (true = overworld, false = nether). + */ + @Override + public boolean canRespawnHere() + { + return false; + } + + /** + * Returns true if the given X,Z coordinate should show environmental fog. + */ + @Override + @SideOnly(Side.CLIENT) + public boolean doesXZShowFog(int x, int z) + { + return true; + } + + /** + * Determines the dimension the player will be respawned in, typically this brings them back to the overworld. + * + * @param player The player that is respawning + * @return The dimension to respawn the player in + */ + @Override + public int getRespawnDimension(EntityPlayerMP player) + { + if (Config.canRespawnInNether) + { + BlockPos coords = player.getBedLocation(-1); + + if (coords != null) + { + return -1; + } + } + + return 0; + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/CropGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/CropGenerator.java new file mode 100644 index 00000000..dbbce936 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/CropGenerator.java @@ -0,0 +1,155 @@ +package com.progwml6.natura.world.worldgen; + +import java.util.Random; + +import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.overworld.block.crops.BlockNaturaBarley; +import com.progwml6.natura.overworld.block.crops.BlockNaturaCotton; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraftforge.fml.common.IWorldGenerator; + +public class CropGenerator implements IWorldGenerator +{ + public static CropGenerator INSTANCE = new CropGenerator(); + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + this.generateOverworld(random, chunkX, chunkZ, world); + } + + public void retroGen(Random random, int chunkX, int chunkZ, World world) + { + this.generateOverworld(random, chunkX, chunkZ, world); + world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified(); + } + + public void generateOverworld(Random random, int chunkX, int chunkZ, World world) + { + int xPos = chunkX * 16 + 8; + int zPos = chunkZ * 16 + 8; + + BlockPos chunkPos = new BlockPos(xPos, 0, zPos); + + Biome biome = world.getChunkFromBlockCoords(chunkPos).getBiome(chunkPos, world.getBiomeProvider()); + + // Barley + if (Config.generateBarley && random.nextInt(5) == 0 && this.goodClimate(biome, 0.11f, 1.0f, 0.11f, 2f)) + { + final int posX = xPos + random.nextInt(16); + final int posY = random.nextInt(128) + Config.seaLevel; + final int posZ = zPos + random.nextInt(16); + final BlockPos newPos = new BlockPos(posX, posY, posZ); + //final BlockPos newPos = WorldGenHelper.getGroundPos(world, posX, posZ); + + if (newPos != null) + { + this.generateBarley(world, random, newPos); + this.generateBarley(world, random, newPos); + } + } + + // Cotton + if (Config.generateCotton && random.nextInt(12) == 0 && this.goodClimate(biome, 0.11f, 1.0f, 0.11f, 2f)) + { + final int posX = xPos + random.nextInt(16); + final int posZ = zPos + random.nextInt(16); + final int posY = random.nextInt(128) + Config.seaLevel; + final BlockPos newPos = new BlockPos(posX, posY, posZ); + //final BlockPos newPos = WorldGenHelper.getGroundPos(world, posX, posZ); + + if (newPos != null) + { + this.generateCotton(world, random, newPos); + this.generateCotton(world, random, newPos); + } + } + + // Bluebells + if (Config.generateBluebells && random.nextInt(12) == 0) + { + final int posX = xPos + random.nextInt(16); + final int posZ = zPos + random.nextInt(16); + final int posY = random.nextInt(128) + Config.seaLevel; + final BlockPos newPos = new BlockPos(posX, posY, posZ); + //final BlockPos newPos = WorldGenHelper.getGroundPos(world, posX, posZ); + + if (newPos != null) + { + this.generateBluebells(world, random, newPos); + } + } + } + + public boolean generateBarley(World world, Random random, BlockPos position) + { + IBlockState state = NaturaOverworld.barleyCrop.getDefaultState().withProperty(BlockNaturaBarley.AGE, 3); + + for (int tries = 0; tries < 64; tries++) + { + BlockPos blockpos = position.add(random.nextInt(8) - random.nextInt(8), random.nextInt(4) - random.nextInt(4), random.nextInt(8) - random.nextInt(8)); + + if (world.isAirBlock(blockpos) && NaturaOverworld.barleyCrop.canBlockStay(world, blockpos, state)) + { + world.setBlockState(blockpos, state, 2); + } + } + + return true; + } + + public boolean generateCotton(World world, Random random, BlockPos position) + { + IBlockState state = NaturaOverworld.cottonCrop.getDefaultState().withProperty(BlockNaturaCotton.AGE, 4); + + for (int tries = 0; tries < 64; tries++) + { + BlockPos blockpos = position.add(random.nextInt(8) - random.nextInt(8), random.nextInt(4) - random.nextInt(4), random.nextInt(8) - random.nextInt(8)); + + if (world.isAirBlock(blockpos) && NaturaOverworld.cottonCrop.canBlockStay(world, blockpos, state)) + { + world.setBlockState(blockpos, state, 2); + } + } + + return true; + } + + public boolean generateBluebells(World world, Random random, BlockPos position) + { + IBlockState state = NaturaOverworld.bluebellsFlower.getDefaultState(); + + for (int tries = 0; tries < 40; tries++) + { + BlockPos blockpos = position.add(random.nextInt(8) - random.nextInt(8), random.nextInt(8) - random.nextInt(8), random.nextInt(8) - random.nextInt(8)); + + if (world.isAirBlock(blockpos) && NaturaOverworld.bluebellsFlower.canBlockStay(world, blockpos, state)) + { + world.setBlockState(blockpos, state, 2); + } + } + + return true; + } + + public boolean goodClimate(Biome biome, float minTemp, float maxTemp, float minRain, float maxRain) + { + float temp = biome.getTemperature(); + float rain = biome.getRainfall(); + + if (minTemp <= temp && temp <= maxTemp && minRain <= rain && rain <= maxRain) + { + return true; + } + + return false; + } + +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/GlowshroomGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/GlowshroomGenerator.java new file mode 100644 index 00000000..eaa10744 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/GlowshroomGenerator.java @@ -0,0 +1,120 @@ +package com.progwml6.natura.world.worldgen; + +import java.util.Random; + +import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.world.worldgen.glowshroom.nether.BlueGlowshroomGenerator; +import com.progwml6.natura.world.worldgen.glowshroom.nether.GreenGlowshroomGenerator; +import com.progwml6.natura.world.worldgen.glowshroom.nether.PurpleGlowshroomGenerator; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeDictionary.Type; +import net.minecraftforge.fml.common.IWorldGenerator; + +public class GlowshroomGenerator implements IWorldGenerator +{ + public static GlowshroomGenerator INSTANCE = new GlowshroomGenerator(); + + //@formatter:off + GreenGlowshroomGenerator greenGlowshroomGen; + BlueGlowshroomGenerator blueGlowshroomGen; + PurpleGlowshroomGenerator purpleGlowshroomGen; + //@formatter:on + + public GlowshroomGenerator() + { + this.greenGlowshroomGen = new GreenGlowshroomGenerator(NaturaNether.netherLargeGreenGlowshroom.getDefaultState()); + this.blueGlowshroomGen = new BlueGlowshroomGenerator(NaturaNether.netherLargeBlueGlowshroom.getDefaultState()); + this.purpleGlowshroomGen = new PurpleGlowshroomGenerator(NaturaNether.netherLargePurpleGlowshroom.getDefaultState()); + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + this.generateNether(random, chunkX, chunkZ, world); + } + + public void retroGen(Random random, int chunkX, int chunkZ, World world) + { + this.generateNether(random, chunkX, chunkZ, world); + world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified(); + } + + public void generateNether(Random random, int chunkX, int chunkZ, World world) + { + int xSpawn, ySpawn, zSpawn; + + int xPos = chunkX * 16 + 8; + int zPos = chunkZ * 16 + 8; + + BlockPos chunkPos = new BlockPos(xPos, 0, zPos); + + BlockPos position; + + Biome biome = world.getChunkFromBlockCoords(chunkPos).getBiome(chunkPos, world.getBiomeProvider()); + + if (biome == null) + { + return; + } + + if (BiomeDictionary.hasType(biome, Type.NETHER)) + { + if (Config.generateGlowshroomtree && random.nextInt(35) == 0) + { + for (int iter = 0; iter < 5; iter++) + { + xSpawn = xPos + random.nextInt(24) - 4; + zSpawn = zPos + random.nextInt(24) - 4; + ySpawn = this.findGround(world, xSpawn, random.nextInt(64) + 32, zSpawn); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + if (random.nextInt(3) == 0) + { + this.purpleGlowshroomGen.generateShroom(random, world, position); + } + else + { + if (random.nextInt(2) == 0) + { + this.greenGlowshroomGen.generateShroom(random, world, position); + } + else + { + this.blueGlowshroomGen.generateShroom(random, world, position); + } + } + } + } + } + } + + int findGround(World world, int x, int y, int z) + { + boolean foundGround = false; + int height = y; + do + { + height--; + BlockPos pos = new BlockPos(x, height, z); + + Block block = world.getBlockState(pos).getBlock(); + + if (block == Blocks.NETHERRACK || block == Blocks.SOUL_SAND || block == NaturaNether.netherTaintedSoil || height < 0) + { + foundGround = true; + } + } + while (!foundGround); + + return height + 1; + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/NetherBerryBushesGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/NetherBerryBushesGenerator.java new file mode 100644 index 00000000..9bd31470 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/NetherBerryBushesGenerator.java @@ -0,0 +1,98 @@ +package com.progwml6.natura.world.worldgen; + +import java.util.Random; + +import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.world.worldgen.berry.nether.NetherBerryBushGenerator; + +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraftforge.fml.common.IWorldGenerator; + +public class NetherBerryBushesGenerator implements IWorldGenerator +{ + public static NetherBerryBushesGenerator INSTANCE = new NetherBerryBushesGenerator(); + + //@formatter:off + NetherBerryBushGenerator blightberryBushGen; + NetherBerryBushGenerator duskberryBushGen; + NetherBerryBushGenerator skyberryBushGen; + NetherBerryBushGenerator stingberryBushGen; + //@formatter:on + + public NetherBerryBushesGenerator() + { + this.blightberryBushGen = new NetherBerryBushGenerator(NaturaNether.netherBerryBushBlightberry.getDefaultState()); + this.duskberryBushGen = new NetherBerryBushGenerator(NaturaNether.netherBerryBushDuskberry.getDefaultState()); + this.skyberryBushGen = new NetherBerryBushGenerator(NaturaNether.netherBerryBushSkyberry.getDefaultState()); + this.stingberryBushGen = new NetherBerryBushGenerator(NaturaNether.netherBerryBushStingberry.getDefaultState()); + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + this.generateNether(random, chunkX, chunkZ, world); + } + + public void retroGen(Random random, int chunkX, int chunkZ, World world) + { + this.generateNether(random, chunkX, chunkZ, world); + world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified(); + } + + public void generateNether(Random random, int chunkX, int chunkZ, World world) + { + int xSpawn, ySpawn, zSpawn; + + int xPos = chunkX * 16 + 8; + int zPos = chunkZ * 16 + 8; + + BlockPos position; + + if (world.provider.doesWaterVaporize()) + { + if (Config.generateBlightberries && random.nextInt(Config.blightberrySpawnRarity) == 0) + { + xSpawn = xPos + random.nextInt(16); + ySpawn = random.nextInt(Config.blightberrySpawnRange) + 16; + zSpawn = zPos + random.nextInt(16); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + this.blightberryBushGen.generateBush(random, world, position); + } + + if (Config.generateDuskberries && random.nextInt(Config.duskberrySpawnRarity) == 0) + { + xSpawn = xPos + random.nextInt(16); + ySpawn = random.nextInt(Config.duskberrySpawnRange) + 16; + zSpawn = zPos + random.nextInt(16); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + this.duskberryBushGen.generateBush(random, world, position); + } + + if (Config.generateSkyberries && random.nextInt(Config.skyberrySpawnRarity) == 0) + { + xSpawn = xPos + random.nextInt(16); + ySpawn = random.nextInt(Config.skyberrySpawnRange) + 16; + zSpawn = zPos + random.nextInt(16); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + this.skyberryBushGen.generateBush(random, world, position); + } + + if (Config.generateStingberries && random.nextInt(Config.stingberrySpawnRarity) == 0) + { + xSpawn = xPos + random.nextInt(16); + ySpawn = random.nextInt(Config.stingberrySpawnRange) + 16; + zSpawn = zPos + random.nextInt(16); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + this.stingberryBushGen.generateBush(random, world, position); + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/NetherTreesGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/NetherTreesGenerator.java new file mode 100644 index 00000000..f65b4a5c --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/NetherTreesGenerator.java @@ -0,0 +1,127 @@ +package com.progwml6.natura.world.worldgen; + +import java.util.Random; + +import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.leaves.BlockNetherLeaves; +import com.progwml6.natura.nether.block.leaves.BlockNetherLeaves2; +import com.progwml6.natura.nether.block.logs.BlockNetherLog; +import com.progwml6.natura.nether.block.logs.BlockNetherLog2; +import com.progwml6.natura.world.worldgen.trees.nether.BloodwoodTreeGenerator; +import com.progwml6.natura.world.worldgen.trees.nether.DarkwoodTreeGenerator; +import com.progwml6.natura.world.worldgen.trees.nether.FusewoodTreeGenerator; +import com.progwml6.natura.world.worldgen.trees.nether.GhostwoodTreeGenerator; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeDictionary.Type; +import net.minecraftforge.fml.common.IWorldGenerator; + +public class NetherTreesGenerator implements IWorldGenerator +{ + public static NetherTreesGenerator INSTANCE = new NetherTreesGenerator(); + + //@formatter:off + DarkwoodTreeGenerator darkwoodTreeGen; + FusewoodTreeGenerator fusewoodTreeGen; + GhostwoodTreeGenerator ghostwoodTreeGen; + BloodwoodTreeGenerator bloodwoodTreeGen; + //@formatter:on + + public NetherTreesGenerator() + { + IBlockState netherLog = NaturaNether.netherLog.getDefaultState(); + IBlockState netherLog2 = NaturaNether.netherLog2.getDefaultState(); + IBlockState netherLeaves = NaturaNether.netherLeaves.getDefaultState(); + IBlockState netherLeaves2 = NaturaNether.netherLeaves2.getDefaultState(); + + this.darkwoodTreeGen = new DarkwoodTreeGenerator(3, netherLog.withProperty(BlockNetherLog.TYPE, BlockNetherLog.LogType.DARKWOOD), netherLeaves2.withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD), netherLeaves2.withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD_FLOWERING), netherLeaves2.withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD_FRUIT)); + this.fusewoodTreeGen = new FusewoodTreeGenerator(3, netherLog.withProperty(BlockNetherLog.TYPE, BlockNetherLog.LogType.FUSEWOOD), netherLeaves.withProperty(BlockNetherLeaves.TYPE, BlockNetherLeaves.LeavesType.FUSEWOOD)); + this.ghostwoodTreeGen = new GhostwoodTreeGenerator(netherLog.withProperty(BlockNetherLog.TYPE, BlockNetherLog.LogType.GHOSTWOOD), netherLeaves.withProperty(BlockNetherLeaves.TYPE, BlockNetherLeaves.LeavesType.GHOSTWOOD), true); + this.bloodwoodTreeGen = new BloodwoodTreeGenerator(netherLog2.withProperty(BlockNetherLog2.META, 15), netherLog2.withProperty(BlockNetherLog2.META, 0), netherLog2.withProperty(BlockNetherLog2.META, 1), netherLog2.withProperty(BlockNetherLog2.META, 2), netherLog2.withProperty(BlockNetherLog2.META, 3), netherLeaves.withProperty(BlockNetherLeaves.TYPE, BlockNetherLeaves.LeavesType.BLOODWOOD)); + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + this.generateNether(random, chunkX, chunkZ, world); + } + + public void retroGen(Random random, int chunkX, int chunkZ, World world) + { + this.generateNether(random, chunkX, chunkZ, world); + world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified(); + } + + public void generateNether(Random random, int chunkX, int chunkZ, World world) + { + int xSpawn, ySpawn, zSpawn; + + int xPos = chunkX * 16 + 8; + int zPos = chunkZ * 16 + 8; + + BlockPos chunkPos = new BlockPos(xPos, 0, zPos); + + BlockPos position; + + Biome biome = world.getChunkFromBlockCoords(chunkPos).getBiome(chunkPos, world.getBiomeProvider()); + + if (biome == null) + { + return; + } + + if (BiomeDictionary.hasType(biome, Type.NETHER)) + { + if (Config.generateBloodwood && random.nextInt(Config.bloodwoodSpawnRarity) == 0) + { + xSpawn = xPos + random.nextInt(16); + ySpawn = 72; + zSpawn = zPos + random.nextInt(16); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + this.bloodwoodTreeGen.generateTree(random, world, position); + } + + if (Config.generateDarkwood && random.nextInt(Config.darkwoodSpawnRarity) == 0) + { + xSpawn = xPos + random.nextInt(16); + ySpawn = random.nextInt(64) + 32; + zSpawn = zPos + random.nextInt(16); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + this.darkwoodTreeGen.generateTree(random, world, position); + } + + if (Config.generateFusewood && random.nextInt(Config.fusewoodSpawnRarity) == 0) + { + xSpawn = xPos + random.nextInt(16); + ySpawn = random.nextInt(64) + 32; + zSpawn = zPos + random.nextInt(16); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + this.fusewoodTreeGen.generateTree(random, world, position); + } + + if (Config.generateGhostwood && random.nextInt(Config.ghostwoodSpawnRarity) == 0) + { + for (int iter = 0; iter < 3; iter++) + { + xSpawn = xPos + random.nextInt(16); + ySpawn = random.nextInt(80) + 16; + zSpawn = zPos + random.nextInt(16); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + this.ghostwoodTreeGen.generateTree(random, world, position); + } + } + } + } + +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/BerryBushGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/OverworldBerryBushesGenerator.java similarity index 61% rename from src/main/java/com/progwml6/natura/world/worldgen/BerryBushGenerator.java rename to src/main/java/com/progwml6/natura/world/worldgen/OverworldBerryBushesGenerator.java index 23737874..b0449273 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/BerryBushGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/OverworldBerryBushesGenerator.java @@ -3,9 +3,7 @@ import java.util.Random; import com.progwml6.natura.common.config.Config; -import com.progwml6.natura.nether.NaturaNether; import com.progwml6.natura.overworld.NaturaOverworld; -import com.progwml6.natura.world.worldgen.berry.nether.NetherBerryBushGenerator; import com.progwml6.natura.world.worldgen.berry.overworld.OverworldBerryBushGenerator; import net.minecraft.util.math.BlockPos; @@ -17,46 +15,34 @@ import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.fml.common.IWorldGenerator; -public class BerryBushGenerator implements IWorldGenerator +public class OverworldBerryBushesGenerator implements IWorldGenerator { - public static BerryBushGenerator INSTANCE = new BerryBushGenerator(); + public static OverworldBerryBushesGenerator INSTANCE = new OverworldBerryBushesGenerator(); //@formatter:off OverworldBerryBushGenerator raspberryBushGen; OverworldBerryBushGenerator blueberryBushGen; OverworldBerryBushGenerator blackberryBushGen; OverworldBerryBushGenerator maloberryBushGen; - - NetherBerryBushGenerator blightberryBushGen; - NetherBerryBushGenerator duskberryBushGen; - NetherBerryBushGenerator skyberryBushGen; - NetherBerryBushGenerator stingberryBushGen; //@formatter:on - public BerryBushGenerator() + public OverworldBerryBushesGenerator() { this.raspberryBushGen = new OverworldBerryBushGenerator(Config.seaLevel + Config.raspberrySpawnRange, NaturaOverworld.overworldBerryBushRaspberry.getDefaultState()); this.blueberryBushGen = new OverworldBerryBushGenerator(Config.seaLevel + Config.blueberrySpawnRange, NaturaOverworld.overworldBerryBushBlueberry.getDefaultState()); this.blackberryBushGen = new OverworldBerryBushGenerator(Config.seaLevel + Config.blackberrySpawnRange, NaturaOverworld.overworldBerryBushBlackberry.getDefaultState()); this.maloberryBushGen = new OverworldBerryBushGenerator(Config.seaLevel + Config.maloberrySpawnRange, NaturaOverworld.overworldBerryBushMaloberry.getDefaultState()); - - this.blightberryBushGen = new NetherBerryBushGenerator(NaturaNether.netherBerryBushBlightberry.getDefaultState()); - this.duskberryBushGen = new NetherBerryBushGenerator(NaturaNether.netherBerryBushDuskberry.getDefaultState()); - this.skyberryBushGen = new NetherBerryBushGenerator(NaturaNether.netherBerryBushSkyberry.getDefaultState()); - this.stingberryBushGen = new NetherBerryBushGenerator(NaturaNether.netherBerryBushStingberry.getDefaultState()); } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { this.generateOverworld(random, chunkX, chunkZ, world); - this.generateNether(random, chunkX, chunkZ, world); } public void retroGen(Random random, int chunkX, int chunkZ, World world) { this.generateOverworld(random, chunkX, chunkZ, world); - this.generateNether(random, chunkX, chunkZ, world); world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified(); } @@ -103,7 +89,7 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world this.blackberryBushGen.generateBush(random, world, position); } - if (Config.generateBlackberries && random.nextInt(Config.blackberrySpawnRarity / 3) == 0 && BiomeDictionary.isBiomeOfType(biome, Type.SWAMP)) + if (Config.generateBlackberries && random.nextInt(Config.blackberrySpawnRarity / 3) == 0 && BiomeDictionary.hasType(biome, Type.SWAMP)) { xSpawn = xPos + random.nextInt(16); ySpawn = random.nextInt(Config.blackberrySpawnRange) + Config.seaLevel; @@ -124,59 +110,6 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world } } - public void generateNether(Random random, int chunkX, int chunkZ, World world) - { - int xSpawn, ySpawn, zSpawn; - - int xPos = chunkX * 16 + 8; - int zPos = chunkZ * 16 + 8; - - BlockPos position; - - if (world.provider.doesWaterVaporize()) - { - if (Config.generateBlightberries && random.nextInt(Config.blightberrySpawnRarity) == 0) - { - xSpawn = xPos + random.nextInt(16); - ySpawn = random.nextInt(Config.blightberrySpawnRange) + 16; - zSpawn = zPos + random.nextInt(16); - position = new BlockPos(xSpawn, ySpawn, zSpawn); - - this.blightberryBushGen.generateBush(random, world, position); - } - - if (Config.generateDuskberries && random.nextInt(Config.duskberrySpawnRarity) == 0) - { - xSpawn = xPos + random.nextInt(16); - ySpawn = random.nextInt(Config.duskberrySpawnRange) + 16; - zSpawn = zPos + random.nextInt(16); - position = new BlockPos(xSpawn, ySpawn, zSpawn); - - this.duskberryBushGen.generateBush(random, world, position); - } - - if (Config.generateSkyberries && random.nextInt(Config.skyberrySpawnRarity) == 0) - { - xSpawn = xPos + random.nextInt(16); - ySpawn = random.nextInt(Config.skyberrySpawnRange) + 16; - zSpawn = zPos + random.nextInt(16); - position = new BlockPos(xSpawn, ySpawn, zSpawn); - - this.skyberryBushGen.generateBush(random, world, position); - } - - if (Config.generateStingberries && random.nextInt(Config.stingberrySpawnRarity) == 0) - { - xSpawn = xPos + random.nextInt(16); - ySpawn = random.nextInt(Config.stingberrySpawnRange) + 16; - zSpawn = zPos + random.nextInt(16); - position = new BlockPos(xSpawn, ySpawn, zSpawn); - - this.stingberryBushGen.generateBush(random, world, position); - } - } - } - public boolean goodClimate(Biome biome, float minTemp, float maxTemp, float minRain, float maxRain) { float temp = biome.getTemperature(); diff --git a/src/main/java/com/progwml6/natura/world/worldgen/TreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/OverworldTreesGenerator.java similarity index 69% rename from src/main/java/com/progwml6/natura/world/worldgen/TreeGenerator.java rename to src/main/java/com/progwml6/natura/world/worldgen/OverworldTreesGenerator.java index 76e16339..fc871967 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/TreeGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/OverworldTreesGenerator.java @@ -3,19 +3,16 @@ import java.util.Random; import com.progwml6.natura.common.config.Config; -import com.progwml6.natura.nether.NaturaNether; -import com.progwml6.natura.nether.block.leaves.BlockNetherLeaves; -import com.progwml6.natura.nether.block.leaves.BlockNetherLeaves2; -import com.progwml6.natura.nether.block.logs.BlockNetherLog; import com.progwml6.natura.overworld.NaturaOverworld; +import com.progwml6.natura.overworld.block.leaves.BlockRedwoodLeaves; import com.progwml6.natura.overworld.block.logs.BlockOverworldLog; import com.progwml6.natura.overworld.block.logs.BlockOverworldLog2; -import com.progwml6.natura.world.worldgen.trees.nether.DarkwoodTreeGenerator; -import com.progwml6.natura.world.worldgen.trees.nether.FusewoodTreeGenerator; -import com.progwml6.natura.world.worldgen.trees.nether.GhostwoodTreeGenerator; +import com.progwml6.natura.overworld.block.logs.BlockRedwoodLog; +import com.progwml6.natura.world.worldgen.saguaro.SaguaroGenerator; import com.progwml6.natura.world.worldgen.trees.overworld.EucalyptusTreeGenerator; import com.progwml6.natura.world.worldgen.trees.overworld.HopseedTreeGenerator; import com.progwml6.natura.world.worldgen.trees.overworld.OverworldTreeGenerator; +import com.progwml6.natura.world.worldgen.trees.overworld.RedwoodTreeGenerator; import com.progwml6.natura.world.worldgen.trees.overworld.SakuraTreeGenerator; import com.progwml6.natura.world.worldgen.trees.overworld.WillowTreeGenerator; @@ -29,9 +26,9 @@ import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.fml.common.IWorldGenerator; -public class TreeGenerator implements IWorldGenerator +public class OverworldTreesGenerator implements IWorldGenerator { - public static TreeGenerator INSTANCE = new TreeGenerator(); + public static OverworldTreesGenerator INSTANCE = new OverworldTreesGenerator(); //@formatter:off OverworldTreeGenerator mapleTreeGen; @@ -44,12 +41,12 @@ public class TreeGenerator implements IWorldGenerator HopseedTreeGenerator hopseedTreeGen; SakuraTreeGenerator sakuraTreeGen; - DarkwoodTreeGenerator darkwoodTreeGen; - FusewoodTreeGenerator fusewoodTreeGen; - GhostwoodTreeGenerator ghostwoodTreeGen; + RedwoodTreeGenerator redwoodTreeGen; + + SaguaroGenerator saguaroGen; //@formatter:on - public TreeGenerator() + public OverworldTreesGenerator() { IBlockState log = NaturaOverworld.overworldLog.getDefaultState(); IBlockState leaves = NaturaOverworld.overworldLeaves.getDefaultState(); @@ -65,32 +62,29 @@ public TreeGenerator() this.willowTreeGen = new WillowTreeGenerator(4, 5, log2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.WILLOW), leaves2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.WILLOW)); this.eucalyptusTreeGen = new EucalyptusTreeGenerator(6, 3, log2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.EUCALYPTUS), leaves2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.EUCALYPTUS)); this.hopseedTreeGen = new HopseedTreeGenerator(2, 3, log2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.HOPSEED), leaves2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.HOPSEED)); - this.sakuraTreeGen = new SakuraTreeGenerator(log2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.SAKURA), leaves2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.SAKURA), true); + this.sakuraTreeGen = new SakuraTreeGenerator(log2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.SAKURA), leaves2.withProperty(BlockOverworldLog2.TYPE, BlockOverworldLog2.LogType.SAKURA), true, false); + + IBlockState redwoodLog = NaturaOverworld.redwoodLog.getDefaultState(); + IBlockState redwoodLeaves = NaturaOverworld.redwoodLeaves.getDefaultState(); - IBlockState netherlog = NaturaNether.netherLog.getDefaultState(); - IBlockState netherleaves = NaturaNether.netherLeaves.getDefaultState(); - IBlockState netherleaves2 = NaturaNether.netherLeaves2.getDefaultState(); + this.redwoodTreeGen = new RedwoodTreeGenerator(redwoodLog.withProperty(BlockRedwoodLog.TYPE, BlockRedwoodLog.RedwoodType.BARK), redwoodLog.withProperty(BlockRedwoodLog.TYPE, BlockRedwoodLog.RedwoodType.HEART), redwoodLog.withProperty(BlockRedwoodLog.TYPE, BlockRedwoodLog.RedwoodType.ROOT), redwoodLeaves.withProperty(BlockRedwoodLeaves.TYPE, BlockRedwoodLeaves.RedwoodType.NORMAL), false, false); - this.darkwoodTreeGen = new DarkwoodTreeGenerator(3, netherlog.withProperty(BlockNetherLog.TYPE, BlockNetherLog.LogType.DARKWOOD), netherleaves2.withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD), netherleaves2.withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD_FLOWERING), netherleaves2.withProperty(BlockNetherLeaves2.TYPE, BlockNetherLeaves2.LeavesType.DARKWOOD_FRUIT)); - this.fusewoodTreeGen = new FusewoodTreeGenerator(3, netherlog.withProperty(BlockNetherLog.TYPE, BlockNetherLog.LogType.FUSEWOOD), netherleaves.withProperty(BlockNetherLeaves.TYPE, BlockNetherLeaves.LeavesType.FUSEWOOD)); - this.ghostwoodTreeGen = new GhostwoodTreeGenerator(netherlog.withProperty(BlockNetherLog.TYPE, BlockNetherLog.LogType.GHOSTWOOD), netherleaves.withProperty(BlockNetherLeaves.TYPE, BlockNetherLeaves.LeavesType.GHOSTWOOD)); + this.saguaroGen = new SaguaroGenerator(NaturaOverworld.saguaro.getDefaultState(), false, false); } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { - this.generateOverworld(random, chunkX, chunkZ, world); - this.generateNether(random, chunkX, chunkZ, world); + this.generateOverworld(random, chunkX, chunkZ, world, false); } public void retroGen(Random random, int chunkX, int chunkZ, World world) { - this.generateOverworld(random, chunkX, chunkZ, world); - this.generateNether(random, chunkX, chunkZ, world); + this.generateOverworld(random, chunkX, chunkZ, world, true); world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified(); } - public void generateOverworld(Random random, int chunkX, int chunkZ, World world) + public void generateOverworld(Random random, int chunkX, int chunkZ, World world, boolean retroGen) { int xSpawn, ySpawn, zSpawn; @@ -115,7 +109,7 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world return; } - if (BiomeDictionary.isBiomeOfType(biome, Type.FOREST)) + if (BiomeDictionary.hasType(biome, Type.FOREST)) { if (Config.generateSakura && random.nextInt(Config.sakuraSpawnRarity * 5) == 0) { @@ -141,8 +135,18 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world } } - if (BiomeDictionary.isBiomeOfType(biome, Type.PLAINS)) + if (BiomeDictionary.hasType(biome, Type.PLAINS)) { + if (!retroGen && Config.generateRedwood && random.nextInt(Config.redwoodSpawnRarity) == 0) + { + xSpawn = xPos + random.nextInt(16); + ySpawn = Config.seaLevel + 16; + zSpawn = zPos + random.nextInt(16); + position = new BlockPos(xSpawn, ySpawn, zSpawn); + + this.redwoodTreeGen.generateTree(random, world, position); + } + if (Config.generateEucalyptus && random.nextInt((int) (Config.eucalyptusSpawnRarity * 1.5)) == 0) { xSpawn = xPos + random.nextInt(16); @@ -154,7 +158,7 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world } } - if (BiomeDictionary.isBiomeOfType(biome, Type.MOUNTAIN) && BiomeDictionary.isBiomeOfType(biome, Type.HILLS)) + if (BiomeDictionary.hasType(biome, Type.MOUNTAIN) || BiomeDictionary.hasType(biome, Type.HILLS)) { if (Config.generateHopseed && random.nextInt(Config.hopseedSpawnRarity) == 0) { @@ -177,7 +181,7 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world } } - if (BiomeDictionary.isBiomeOfType(biome, Type.RIVER)) + if (BiomeDictionary.hasType(biome, Type.RIVER)) { if (Config.generateSakura && random.nextInt(Config.sakuraSpawnRarity) == 0) { @@ -203,7 +207,7 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world } } - if (BiomeDictionary.isBiomeOfType(biome, Type.JUNGLE)) + if (BiomeDictionary.hasType(biome, Type.JUNGLE)) { if (Config.generateAmaranth) { @@ -216,7 +220,7 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world } } - if (BiomeDictionary.isBiomeOfType(biome, Type.FOREST)) + if (BiomeDictionary.hasType(biome, Type.FOREST)) { if (Config.generateMaple && random.nextInt(Config.mapleRarity) == 0) { @@ -249,7 +253,7 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world } } - if (BiomeDictionary.isBiomeOfType(biome, Type.SWAMP)) + if (BiomeDictionary.hasType(biome, Type.SWAMP)) { if (Config.generateWillow && random.nextInt(Config.willowRarity) == 0) { @@ -264,71 +268,17 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world } } } - } - - public void generateNether(Random random, int chunkX, int chunkZ, World world) - { - int xSpawn, ySpawn, zSpawn; - - int xPos = chunkX * 16 + 8; - int zPos = chunkZ * 16 + 8; - - BlockPos chunkPos = new BlockPos(xPos, 0, zPos); - - BlockPos position; - - Biome biome = world.getChunkFromBlockCoords(chunkPos).getBiome(chunkPos, world.getBiomeProvider()); - - if (biome == null) - { - return; - } - if (BiomeDictionary.isBiomeOfType(biome, Type.NETHER)) + if (BiomeDictionary.hasType(biome, Type.SANDY)) { - /*if (Config.generateBloodwood && random.nextInt(Config.bloodwoodSpawnRarity) == 0) + if (Config.generateSaguaro && random.nextInt(Config.saguaroSpawnRarity) == 0) { xSpawn = xPos + random.nextInt(16); - ySpawn = 72; + ySpawn = random.nextInt(Config.seaLevel) + 16; zSpawn = zPos + random.nextInt(16); position = new BlockPos(xSpawn, ySpawn, zSpawn); - - this.bloodwoodTreeGen.generateTree(random, world, position); - - this.genBlood.generate(world, random, xSpawn, ySpawn, zSpawn); - }*/ - if (Config.generateDarkwood && random.nextInt(Config.darkwoodSpawnRarity) == 0) - { - xSpawn = xPos + random.nextInt(16); - ySpawn = random.nextInt(64) + 32; - zSpawn = zPos + random.nextInt(16); - position = new BlockPos(xSpawn, ySpawn, zSpawn); - - this.darkwoodTreeGen.generateTree(random, world, position); - } - - if (Config.generateFusewood && random.nextInt(Config.fusewoodSpawnRarity) == 0) - { - xSpawn = xPos + random.nextInt(16); - ySpawn = random.nextInt(64) + 32; - zSpawn = zPos + random.nextInt(16); - position = new BlockPos(xSpawn, ySpawn, zSpawn); - - this.fusewoodTreeGen.generateTree(random, world, position); - } - - if (Config.generateGhostwood && random.nextInt(Config.ghostwoodSpawnRarity) == 0) - { - for (int iter = 0; iter < 3; iter++) - { - xSpawn = xPos + random.nextInt(16); - ySpawn = random.nextInt(80) + 16; - zSpawn = zPos + random.nextInt(16); - position = new BlockPos(xSpawn, ySpawn, zSpawn); - - this.ghostwoodTreeGen.generateTree(random, world, position); - } + this.saguaroGen.generateSaguaro(random, world, position); } } } diff --git a/src/main/java/com/progwml6/natura/world/worldgen/VineGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/VineGenerator.java new file mode 100644 index 00000000..c7201e3b --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/VineGenerator.java @@ -0,0 +1,85 @@ +package com.progwml6.natura.world.worldgen; + +import java.util.Random; + +import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.world.worldgen.vine.ThornvinesGenerator; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeDictionary.Type; +import net.minecraftforge.fml.common.IWorldGenerator; + +public class VineGenerator implements IWorldGenerator +{ + public static VineGenerator INSTANCE = new VineGenerator(); + + //@formatter:off + ThornvinesGenerator thornvinesGen; + //@formatter:on + + public VineGenerator() + { + this.thornvinesGen = new ThornvinesGenerator(NaturaNether.netherThornVines.getDefaultState()); + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + this.generateNether(random, chunkX, chunkZ, world); + } + + public void retroGen(Random random, int chunkX, int chunkZ, World world) + { + this.generateNether(random, chunkX, chunkZ, world); + world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified(); + } + + public void generateNether(Random random, int chunkX, int chunkZ, World world) + { + int xSpawn, ySpawn, zSpawn; + + int xPos = chunkX * 16 + 8; + int zPos = chunkZ * 16 + 8; + + BlockPos chunkPos = new BlockPos(xPos, 0, zPos); + + BlockPos position; + + Biome biome = world.getChunkFromBlockCoords(chunkPos).getBiome(chunkPos, world.getBiomeProvider()); + + if (biome == null) + { + return; + } + + if (BiomeDictionary.hasType(biome, Type.NETHER)) + { + if (Config.generateThornvines && random.nextInt(Config.thornSpawnRarity) == 0) + { + ySpawn = 108; + + for (int i = 0; i < 20; i++) + { + IBlockState vine = this.thornvinesGen.getRandomizedVine(random); + xSpawn = xPos + random.nextInt(16); + zSpawn = zPos + random.nextInt(16); + int size = random.nextInt(25) + 1; + int height = ySpawn - (random.nextInt(size) + random.nextInt(size) + random.nextInt(size)); + + for (int yHeight = ySpawn; yHeight > height; yHeight--) + { + position = new BlockPos(xSpawn, yHeight, zSpawn); + this.thornvinesGen.generateVines(random, world, position, vine); + } + } + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/BaseGlowshroomGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/BaseGlowshroomGenerator.java new file mode 100644 index 00000000..69a948ed --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/BaseGlowshroomGenerator.java @@ -0,0 +1,22 @@ +package com.progwml6.natura.world.worldgen.glowshroom; + +import java.util.Random; + +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraftforge.fml.common.IWorldGenerator; + +public class BaseGlowshroomGenerator implements IWorldGenerator +{ + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + + } + + public void generateShroom(Random random, World world, BlockPos pos) + { + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/nether/BlueGlowshroomGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/nether/BlueGlowshroomGenerator.java new file mode 100644 index 00000000..62c70866 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/nether/BlueGlowshroomGenerator.java @@ -0,0 +1,159 @@ +package com.progwml6.natura.world.worldgen.glowshroom.nether; + +import java.util.Random; + +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.shrooms.BlockNetherLargeGlowshroom; +import com.progwml6.natura.nether.block.shrooms.BlockNetherLargeGlowshroom.EnumType; +import com.progwml6.natura.world.worldgen.glowshroom.BaseGlowshroomGenerator; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockPos.MutableBlockPos; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; + +public class BlueGlowshroomGenerator extends BaseGlowshroomGenerator +{ + public final IBlockState glowshroom; + + public BlueGlowshroomGenerator(IBlockState glowshroom) + { + this.glowshroom = glowshroom; + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + } + + @Override + public void generateShroom(Random random, World world, BlockPos pos) + { + int height = random.nextInt(3) + 4; + + boolean flag = true; + + if (pos.getY() >= 1 && pos.getY() + height + 1 < 256) + { + for (int j = pos.getY(); j <= pos.getY() + 1 + height; ++j) + { + int k = 3; + + if (j <= pos.getY() + 3) + { + k = 0; + } + + MutableBlockPos mutableblockpos = new MutableBlockPos(); + + for (int l = pos.getX() - k; l <= pos.getX() + k && flag; ++l) + { + for (int i1 = pos.getZ() - k; i1 <= pos.getZ() + k && flag; ++i1) + { + if (j >= 0 && j < 256) + { + IBlockState state = world.getBlockState(mutableblockpos.setPos(l, j, i1)); + + if (!state.getBlock().isAir(state, world, mutableblockpos) && !state.getBlock().isLeaves(state, world, mutableblockpos)) + { + flag = false; + } + } + else + { + flag = false; + } + } + } + } + if (!flag) + { + } + else + { + Block block1 = world.getBlockState(pos.down()).getBlock(); + + if (block1 != Blocks.MYCELIUM && block1 != Blocks.NETHERRACK && block1 != Blocks.SOUL_SAND && block1 != NaturaNether.netherTaintedSoil) + { + } + else + { + int k2 = pos.getY() + height - 3; + + for (int l2 = k2; l2 <= pos.getY() + height; ++l2) + { + int j3 = 1; + + if (l2 < pos.getY() + height) + { + ++j3; + } + + int k3 = pos.getX() - j3; + int l3 = pos.getX() + j3; + int j1 = pos.getZ() - j3; + int k1 = pos.getZ() + j3; + + for (int l1 = k3; l1 <= l3; ++l1) + { + for (int i2 = j1; i2 <= k1; ++i2) + { + int j2 = 5; + + if (l1 == k3) + { + --j2; + } + else if (l1 == l3) + { + ++j2; + } + + if (i2 == j1) + { + j2 -= 3; + } + else if (i2 == k1) + { + j2 += 3; + } + + EnumType enumtype = EnumType.byMetadata(j2); + + if (enumtype == EnumType.CENTER && l2 < pos.getY() + height) + { + enumtype = EnumType.ALL_INSIDE; + } + + if (pos.getY() >= pos.getY() + height - 1 || enumtype != EnumType.ALL_INSIDE) + { + BlockPos blockpos = new BlockPos(l1, l2, i2); + IBlockState state = world.getBlockState(blockpos); + + if (state.getBlock().canBeReplacedByLeaves(state, world, blockpos)) + { + world.setBlockState(blockpos, this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, enumtype), 2); + } + } + } + } + } + + for (int i3 = 0; i3 < height; ++i3) + { + IBlockState iblockstate = world.getBlockState(pos.up(i3)); + + if (iblockstate.getBlock().canBeReplacedByLeaves(iblockstate, world, pos.up(i3))) + { + world.setBlockState(pos.up(i3), this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, EnumType.STEM), 2); + } + } + } + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/nether/GreenGlowshroomGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/nether/GreenGlowshroomGenerator.java new file mode 100644 index 00000000..192d5a5d --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/nether/GreenGlowshroomGenerator.java @@ -0,0 +1,202 @@ +package com.progwml6.natura.world.worldgen.glowshroom.nether; + +import java.util.Random; + +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.shrooms.BlockNetherLargeGlowshroom; +import com.progwml6.natura.nether.block.shrooms.BlockNetherLargeGlowshroom.EnumType; +import com.progwml6.natura.world.worldgen.glowshroom.BaseGlowshroomGenerator; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockPos.MutableBlockPos; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; + +public class GreenGlowshroomGenerator extends BaseGlowshroomGenerator +{ + public final IBlockState glowshroom; + + public GreenGlowshroomGenerator(IBlockState glowshroom) + { + this.glowshroom = glowshroom; + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + } + + @Override + public void generateShroom(Random random, World world, BlockPos pos) + { + int height = random.nextInt(3) + 4; + + boolean flag = true; + + if (pos.getY() >= 1 && pos.getY() + height + 1 < 256) + { + for (int j = pos.getY(); j <= pos.getY() + 1 + height; ++j) + { + int k = 3; + + if (j <= pos.getY() + 3) + { + k = 0; + } + + MutableBlockPos mutableblockpos = new MutableBlockPos(); + + for (int l = pos.getX() - k; l <= pos.getX() + k && flag; ++l) + { + for (int i1 = pos.getZ() - k; i1 <= pos.getZ() + k && flag; ++i1) + { + if (j >= 0 && j < 256) + { + IBlockState state = world.getBlockState(mutableblockpos.setPos(l, j, i1)); + + if (!state.getBlock().isAir(state, world, mutableblockpos) && !state.getBlock().isLeaves(state, world, mutableblockpos)) + { + flag = false; + } + } + else + { + flag = false; + } + } + } + } + if (!flag) + { + } + else + { + Block block1 = world.getBlockState(pos.down()).getBlock(); + + if (block1 != Blocks.MYCELIUM && block1 != Blocks.NETHERRACK && block1 != Blocks.SOUL_SAND && block1 != NaturaNether.netherTaintedSoil) + { + } + else + { + int k2 = pos.getY() + height; + + for (int l2 = k2; l2 <= pos.getY() + height; ++l2) + { + int j3 = 3; + + int k3 = pos.getX() - j3; + int l3 = pos.getX() + j3; + int j1 = pos.getZ() - j3; + int k1 = pos.getZ() + j3; + + for (int l1 = k3; l1 <= l3; ++l1) + { + for (int i2 = j1; i2 <= k1; ++i2) + { + int j2 = 5; + + if (l1 == k3) + { + --j2; + } + else if (l1 == l3) + { + ++j2; + } + + if (i2 == j1) + { + j2 -= 3; + } + else if (i2 == k1) + { + j2 += 3; + } + + EnumType enumtype = EnumType.byMetadata(j2); + + if (l2 < pos.getY() + height) + { + if ((l1 == k3 || l1 == l3) && (i2 == j1 || i2 == k1)) + { + continue; + } + + if (l1 == pos.getX() - (j3 - 1) && i2 == j1) + { + enumtype = EnumType.NORTH_WEST; + } + + if (l1 == k3 && i2 == pos.getZ() - (j3 - 1)) + { + enumtype = EnumType.NORTH_WEST; + } + + if (l1 == pos.getX() + (j3 - 1) && i2 == j1) + { + enumtype = EnumType.NORTH_EAST; + } + + if (l1 == l3 && i2 == pos.getZ() - (j3 - 1)) + { + enumtype = EnumType.NORTH_EAST; + } + + if (l1 == pos.getX() - (j3 - 1) && i2 == k1) + { + enumtype = EnumType.SOUTH_WEST; + } + + if (l1 == k3 && i2 == pos.getZ() + (j3 - 1)) + { + enumtype = EnumType.SOUTH_WEST; + } + + if (l1 == pos.getX() + (j3 - 1) && i2 == k1) + { + enumtype = EnumType.SOUTH_EAST; + } + + if (l1 == l3 && i2 == pos.getZ() + (j3 - 1)) + { + enumtype = EnumType.SOUTH_EAST; + } + } + + if (enumtype == EnumType.CENTER && l2 < pos.getY() + height) + { + enumtype = EnumType.ALL_INSIDE; + } + + if (pos.getY() >= pos.getY() + height - 1 || enumtype != EnumType.ALL_INSIDE) + { + BlockPos blockpos = new BlockPos(l1, l2, i2); + IBlockState state = world.getBlockState(blockpos); + + if (state.getBlock().canBeReplacedByLeaves(state, world, blockpos)) + { + world.setBlockState(blockpos, this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, enumtype), 2); + } + } + } + } + } + + for (int i3 = 0; i3 < height; ++i3) + { + IBlockState iblockstate = world.getBlockState(pos.up(i3)); + + if (iblockstate.getBlock().canBeReplacedByLeaves(iblockstate, world, pos.up(i3))) + { + world.setBlockState(pos.up(i3), this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, EnumType.STEM), 2); + } + } + } + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/nether/PurpleGlowshroomGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/nether/PurpleGlowshroomGenerator.java new file mode 100644 index 00000000..455b5896 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/glowshroom/nether/PurpleGlowshroomGenerator.java @@ -0,0 +1,221 @@ +package com.progwml6.natura.world.worldgen.glowshroom.nether; + +import java.util.Random; + +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.nether.block.shrooms.BlockNetherLargeGlowshroom; +import com.progwml6.natura.nether.block.shrooms.BlockNetherLargeGlowshroom.EnumType; +import com.progwml6.natura.world.worldgen.glowshroom.BaseGlowshroomGenerator; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockPos.MutableBlockPos; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; + +public class PurpleGlowshroomGenerator extends BaseGlowshroomGenerator +{ + public final IBlockState glowshroom; + + public PurpleGlowshroomGenerator(IBlockState glowshroom) + { + this.glowshroom = glowshroom; + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + } + + @Override + public void generateShroom(Random random, World world, BlockPos pos) + { + int height = random.nextInt(4) + 1; + + boolean flag = true; + + if (pos.getY() >= 1 && pos.getY() + height + 1 < 256) + { + for (int j = pos.getY(); j <= pos.getY() + 1 + height; ++j) + { + int k = 3; + + if (j <= pos.getY() + 3) + { + k = 0; + } + + MutableBlockPos mutableblockpos = new MutableBlockPos(); + + for (int l = pos.getX() - k; l <= pos.getX() + k && flag; ++l) + { + for (int i1 = pos.getZ() - k; i1 <= pos.getZ() + k && flag; ++i1) + { + if (j >= 0 && j < 256) + { + IBlockState state = world.getBlockState(mutableblockpos.setPos(l, j, i1)); + + if (!state.getBlock().isAir(state, world, mutableblockpos) && !state.getBlock().isLeaves(state, world, mutableblockpos)) + { + flag = false; + } + } + else + { + flag = false; + } + } + } + } + if (!flag) + { + } + else + { + Block block1 = world.getBlockState(pos.down()).getBlock(); + + if (block1 != Blocks.MYCELIUM && block1 != Blocks.NETHERRACK && block1 != Blocks.SOUL_SAND && block1 != NaturaNether.netherTaintedSoil) + { + } + else + { + int k2 = pos.getY() + height - 1; + + for (int l2 = k2; l2 <= pos.getY() + height; ++l2) + { + int j3 = 2; + + if (l2 < pos.getY() + height) + { + ++j3; + } + + int k3 = pos.getX() - j3; + int l3 = pos.getX() + j3; + int j1 = pos.getZ() - j3; + int k1 = pos.getZ() + j3; + + for (int l1 = k3; l1 <= l3; ++l1) + { + for (int i2 = j1; i2 <= k1; ++i2) + { + int j2 = 5; + + if (l1 == k3) + { + --j2; + } + else if (l1 == l3) + { + ++j2; + } + + if (i2 == j1) + { + j2 -= 3; + } + else if (i2 == k1) + { + j2 += 3; + } + + EnumType enumtype = EnumType.byMetadata(j2); + + if (l2 < pos.getY() + height) + { + int swap = l2 < pos.getY() + height ? 2 : 1; + if ((l1 == k3 || l1 == l3) && (i2 == j1 || i2 == k1)) + { + continue; + } + + if (l2 < pos.getY() + height) + { + if ((l1 == k3 + 1 || l1 == l3 - 1) && (i2 == j1 + 1 || i2 == k1 - 1)) + { + continue; + } + } + + if (l1 == pos.getX() - (j3 - swap) && i2 == j1) + { + enumtype = EnumType.NORTH_WEST; + } + + if (l1 == k3 && i2 == pos.getZ() - (j3 - swap)) + { + enumtype = EnumType.NORTH_WEST; + } + + if (l1 == pos.getX() + (j3 - swap) && i2 == j1) + { + enumtype = EnumType.NORTH_EAST; + } + + if (l1 == l3 && i2 == pos.getZ() - (j3 - swap)) + { + enumtype = EnumType.NORTH_EAST; + } + + if (l1 == pos.getX() - (j3 - swap) && i2 == k1) + { + enumtype = EnumType.SOUTH_WEST; + } + + if (l1 == k3 && i2 == pos.getZ() + (j3 - swap)) + { + enumtype = EnumType.SOUTH_WEST; + } + + if (l1 == pos.getX() + (j3 - swap) && i2 == k1) + { + enumtype = EnumType.SOUTH_EAST; + } + + if (l1 == l3 && i2 == pos.getZ() + (j3 - swap)) + { + enumtype = EnumType.SOUTH_EAST; + } + } + + if (enumtype == EnumType.CENTER && l2 < pos.getY() + height) + { + enumtype = EnumType.ALL_INSIDE; + } + + if (pos.getY() >= pos.getY() + height - 1 || enumtype != EnumType.ALL_INSIDE) + { + BlockPos blockpos = new BlockPos(l1, l2, i2); + IBlockState state = world.getBlockState(blockpos); + + if (state.getBlock().canBeReplacedByLeaves(state, world, blockpos)) + { + world.setBlockState(blockpos, this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, enumtype), 2); + } + } + } + } + } + + world.setBlockState(pos.add(-2, height - 1, -2), this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, EnumType.NORTH_WEST), 2); + world.setBlockState(pos.add(2, height - 1, -2), this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, EnumType.NORTH_EAST), 2); + world.setBlockState(pos.add(-2, height - 1, 2), this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, EnumType.SOUTH_WEST), 2); + world.setBlockState(pos.add(2, height - 1, 2), this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, EnumType.SOUTH_EAST), 2); + + for (int i3 = 0; i3 < height; ++i3) + { + IBlockState iblockstate = world.getBlockState(pos.up(i3)); + + if (iblockstate.getBlock().canBeReplacedByLeaves(iblockstate, world, pos.up(i3))) + { + world.setBlockState(pos.up(i3), this.glowshroom.withProperty(BlockNetherLargeGlowshroom.VARIANT, EnumType.STEM), 2); + } + } + } + } + } + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/retrogen/TickHandlerWorldRetrogen.java b/src/main/java/com/progwml6/natura/world/worldgen/retrogen/TickHandlerWorldRetrogen.java index 5964be7b..4de503fc 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/retrogen/TickHandlerWorldRetrogen.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/retrogen/TickHandlerWorldRetrogen.java @@ -4,11 +4,19 @@ import java.util.Random; import com.google.common.collect.LinkedListMultimap; +import com.progwml6.natura.Natura; import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.overworld.NaturaOverworld; import com.progwml6.natura.world.NaturaWorld; -import com.progwml6.natura.world.worldgen.BerryBushGenerator; import com.progwml6.natura.world.worldgen.CloudGenerator; -import com.progwml6.natura.world.worldgen.TreeGenerator; +import com.progwml6.natura.world.worldgen.CropGenerator; +import com.progwml6.natura.world.worldgen.GlowshroomGenerator; +import com.progwml6.natura.world.worldgen.NetherBerryBushesGenerator; +import com.progwml6.natura.world.worldgen.NetherTreesGenerator; +import com.progwml6.natura.world.worldgen.OverworldBerryBushesGenerator; +import com.progwml6.natura.world.worldgen.OverworldTreesGenerator; +import com.progwml6.natura.world.worldgen.VineGenerator; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; @@ -20,13 +28,44 @@ public class TickHandlerWorldRetrogen { - private final TreeGenerator treeGenerator = new TreeGenerator(); + public static TickHandlerWorldRetrogen INSTANCE = new TickHandlerWorldRetrogen(); + + // Overworld + //@formatter:off + private OverworldTreesGenerator overworldTreesGenerator; + private OverworldBerryBushesGenerator overworldBerryBushesGenerator; + private CloudGenerator cloudGenerator; + private CropGenerator cropGenerator; + + // Nether + private NetherTreesGenerator netherTreesGenerator; + private NetherBerryBushesGenerator netherBerryBushesGenerator; + private GlowshroomGenerator glowshroomGenerator; + private VineGenerator vineGenerator; + //@formatter:on - private final BerryBushGenerator berryBushGenerator = new BerryBushGenerator(); + private final LinkedListMultimap chunkRegenList = LinkedListMultimap.create(); - private final CloudGenerator cloudGenerator = new CloudGenerator(); + public TickHandlerWorldRetrogen() + { + // Overworld + if (Natura.pulseManager.isPulseLoaded(NaturaOverworld.PulseId)) + { + overworldTreesGenerator = new OverworldTreesGenerator(); + overworldBerryBushesGenerator = new OverworldBerryBushesGenerator(); + cloudGenerator = new CloudGenerator(); + cropGenerator = new CropGenerator(); + } - private final LinkedListMultimap chunkRegenList = LinkedListMultimap.create(); + // Nether + if (Natura.pulseManager.isPulseLoaded(NaturaNether.PulseId)) + { + netherTreesGenerator = new NetherTreesGenerator(); + netherBerryBushesGenerator = new NetherBerryBushesGenerator(); + glowshroomGenerator = new GlowshroomGenerator(); + vineGenerator = new VineGenerator(); + } + } @SubscribeEvent public void onWorldTick(WorldTickEvent event) @@ -54,11 +93,23 @@ public void onWorldTick(WorldTickEvent event) long zSeed = random.nextLong() >> 2 + 1L; random.setSeed(xSeed * coords.xCoord + zSeed * coords.zCoord ^ worldSeed); - this.treeGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); - this.berryBushGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); - if (Config.enableCloudBlocks) + if (Natura.pulseManager.isPulseLoaded(NaturaOverworld.PulseId)) + { + this.overworldTreesGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); + this.overworldBerryBushesGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); + if (Config.enableCloudBlocks) + { + this.cloudGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); + } + this.cropGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); + } + + if (Natura.pulseManager.isPulseLoaded(NaturaNether.PulseId)) { - this.cloudGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); + this.netherTreesGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); + this.netherBerryBushesGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); + this.glowshroomGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); + this.vineGenerator.retroGen(random, coords.xCoord, coords.zCoord, world); } } } diff --git a/src/main/java/com/progwml6/natura/world/worldgen/saguaro/SaguaroGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/saguaro/SaguaroGenerator.java new file mode 100644 index 00000000..55a49916 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/saguaro/SaguaroGenerator.java @@ -0,0 +1,263 @@ +package com.progwml6.natura.world.worldgen.saguaro; + +import java.util.Random; + +import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.overworld.NaturaOverworld; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.WorldType; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraftforge.fml.common.IWorldGenerator; + +public class SaguaroGenerator implements IWorldGenerator +{ + private Random rand; + + private World world; + + private BlockPos basePos = BlockPos.ORIGIN; + + public final IBlockState saguaro; + + public final boolean findGround; + + public final boolean isBaby; + + public SaguaroGenerator(IBlockState saguaro, boolean findGround, boolean isBaby) + { + this.saguaro = saguaro; + this.findGround = findGround; + this.isBaby = isBaby; + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + + } + + public void generateSaguaro(Random random, World worldIn, BlockPos position) + { + this.world = worldIn; + + if (this.findGround) + { + this.basePos = this.findGround(worldIn, position); + } + else + { + this.basePos = position; + } + + this.rand = new Random(random.nextLong()); + + if (!this.validSaguaroLocation()) + { + this.world = null; //Fix vanilla Mem leak, holds latest world + } + else + { + this.generateSaguaro(); + this.world = null; //Fix vanilla Mem leak, holds latest world + } + } + + private boolean validSaguaroLocation() + { + BlockPos down = this.basePos.down(); + + IBlockState currentState = this.world.getBlockState(this.basePos); + Block currentBlock = currentState.getBlock(); + + IBlockState stateBelow = world.getBlockState(down); + Block blockBelow = stateBelow.getBlock(); + + if (!this.world.isAirBlock(this.basePos)) + { + if (currentBlock == NaturaOverworld.saguaroBaby) + { + if (blockBelow == null || !blockBelow.canSustainPlant(stateBelow, this.world, down, net.minecraft.util.EnumFacing.UP, NaturaOverworld.saguaro)) + { + return false; + } + } + else + { + return false; + } + } + else + { + if (blockBelow == null || !blockBelow.canSustainPlant(stateBelow, this.world, down, net.minecraft.util.EnumFacing.UP, NaturaOverworld.saguaro)) + { + return false; + } + } + + return true; + } + + void generateSaguaro() + { + if (this.rand.nextInt(20) == 0) + { + this.generateCactusTree(); + } + else + { + this.generateSmallCactus(); + } + } + + void generateCactusTree() + { + for (int height = 0; height < 6; height++) + { + this.setBlock(this.basePos.up(height)); + } + + this.setBlock(this.basePos.up(2).east()); + this.setBlock(this.basePos.up(2).west()); + this.setBlock(this.basePos.up(2).south()); + this.setBlock(this.basePos.up(2).north()); + + for (int height = 0; height < 2; height++) + { + BlockPos pos = this.basePos.up(height + 2); + this.setBlock(pos.east(2)); + this.setBlock(pos.west(2)); + this.setBlock(pos.south(2)); + this.setBlock(pos.north(2)); + + pos = this.basePos.up(height + 3); + this.setBlock(pos.east(3)); + this.setBlock(pos.west(3)); + this.setBlock(pos.south(3)); + this.setBlock(pos.north(3)); + + pos = this.basePos.up(height + 5); + this.setBlock(pos.east()); + this.setBlock(pos.west()); + this.setBlock(pos.south()); + this.setBlock(pos.north()); + } + } + + void generateSmallCactus() + { + int height = this.rand.nextInt(4) + 3; + + for (int i = 0; i < height; i++) + { + this.setBlock(this.basePos.up(i)); + } + + int branchY = height >= 5 ? 2 : 1; + + int size; + + BlockPos pos = this.basePos.up(branchY); + + if (this.rand.nextBoolean()) + { + size = this.rand.nextInt(height - branchY) + branchY - this.rand.nextInt(3); + + for (int branch = 0; branch < size; branch++) + { + this.setBlock(pos.up(branch).east()); + } + + } + + if (this.rand.nextBoolean()) + { + size = this.rand.nextInt(height - branchY) + branchY - this.rand.nextInt(3); + + for (int branch = 0; branch < size; branch++) + { + this.setBlock(pos.up(branch).west()); + } + } + + if (this.rand.nextBoolean()) + { + size = this.rand.nextInt(height - branchY) + branchY - this.rand.nextInt(3); + + for (int branch = 0; branch < size; branch++) + { + this.setBlock(pos.up(branch).south()); + } + } + + if (this.rand.nextBoolean()) + { + size = this.rand.nextInt(height - branchY) + branchY - this.rand.nextInt(3); + + for (int branch = 0; branch < size; branch++) + { + this.setBlock(pos.up(branch).north()); + } + } + } + + void setBlock(BlockPos pos) + { + if (!this.world.getBlockState(pos).isOpaqueCube()) + { + this.world.setBlockState(pos, this.saguaro, 2); + } + } + + BlockPos findGround(World world, BlockPos pos) + { + if (world.getWorldType() == WorldType.FLAT && this.isBaby) + { + boolean foundGround = false; + + int height = Config.flatSeaLevel + 64; + + do + { + height--; + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + Block underBlock = world.getBlockState(position).getBlock(); + + if (underBlock == Blocks.SAND || height < Config.flatSeaLevel) + { + foundGround = true; + } + } + while (!foundGround); + + return new BlockPos(pos.getX(), height + 1, pos.getZ()); + } + else + { + boolean foundGround = false; + + int height = Config.seaLevel + 64; + + do + { + height--; + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + Block underBlock = world.getBlockState(position).getBlock(); + + if (underBlock == Blocks.SAND || height < Config.seaLevel) + { + foundGround = true; + } + } + while (!foundGround); + + return new BlockPos(pos.getX(), height + 1, pos.getZ()); + } + } + +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/BloodwoodTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/BloodwoodTreeGenerator.java new file mode 100644 index 00000000..14091dbb --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/BloodwoodTreeGenerator.java @@ -0,0 +1,275 @@ +package com.progwml6.natura.world.worldgen.trees.nether; + +import java.util.Random; + +import com.progwml6.natura.nether.NaturaNether; +import com.progwml6.natura.world.worldgen.trees.BaseTreeGenerator; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; + +public class BloodwoodTreeGenerator extends BaseTreeGenerator +{ + public final IBlockState full; + + public final IBlockState trunk1; + + public final IBlockState trunk2; + + public final IBlockState trunk3; + + public final IBlockState trunk4; + + public final IBlockState leaves; + + public BloodwoodTreeGenerator(IBlockState full, IBlockState trunk1, IBlockState trunk2, IBlockState trunk3, IBlockState trunk4, IBlockState leaves) + { + this.full = full; + this.trunk1 = trunk1; + this.trunk2 = trunk2; + this.trunk3 = trunk3; + this.trunk4 = trunk4; + this.leaves = leaves; + } + + BlockPos findCeiling(World world, BlockPos pos) + { + int returnHeight = 0; + + int height = pos.getY(); + + do + { + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + + Block block = world.getBlockState(position).getBlock(); + if ((block == Blocks.NETHERRACK || block == Blocks.SOUL_SAND || block == NaturaNether.netherTaintedSoil) && world.getBlockState(position.down()).isFullBlock()) + { + returnHeight = height - 1; + break; + } + height++; + } + while (height <= 120); + + return new BlockPos(pos.getX(), returnHeight, pos.getZ()); + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + } + + @Override + public void generateTree(Random random, World world, BlockPos pos) + { + int treeHeight = random.nextInt(8) + 8; + + pos = this.findCeiling(world, pos); + if (pos.getY() < 0) + { + return; + } + + for (int heightIter = 0; heightIter < treeHeight; heightIter++) + { + Block localBlock = world.getBlockState(pos.add(0, -heightIter, 0)).getBlock(); + if (localBlock == Blocks.AIR || localBlock == NaturaNether.netherLeaves) + { + this.setBlockAndMetadata(world, pos.add(0, -heightIter, 0), this.trunk1); + this.setBlockAndMetadata(world, pos.add(1, -heightIter, 0), this.trunk2); + this.setBlockAndMetadata(world, pos.add(0, -heightIter, 1), this.trunk3); + this.setBlockAndMetadata(world, pos.add(1, -heightIter, 1), this.trunk4); + } + } + + this.genBranch(world, random, pos, -treeHeight, 1); + this.genBranch(world, random, pos.add(1, 0, 0), -treeHeight, 2); + this.genBranch(world, random, pos.add(0, 0, 1), -treeHeight, 3); + this.genBranch(world, random, pos.add(1, 0, 1), -treeHeight, 4); + + this.genStraightBranch(world, random, pos, -treeHeight, 1); + this.genStraightBranch(world, random, pos.add(1, 0, 0), -treeHeight, 2); + this.genStraightBranch(world, random, pos.add(0, 0, 1), -treeHeight, 3); + this.genStraightBranch(world, random, pos.add(1, 0, 1), -treeHeight, 4); + } + + private void genBranch(World world, Random random, BlockPos pos, int height, int direction) + { + int posX = pos.getX(); + int posY = pos.getY() + height; + int posZ = pos.getZ(); + byte offsetX = 0; + byte offsetZ = 0; + + switch (direction) + { + case 1: + offsetX = 1; + offsetZ = 1; + break; + + case 2: + offsetX = -1; + offsetZ = 1; + break; + + case 3: + offsetX = 1; + offsetZ = -1; + break; + + case 4: + offsetX = -1; + offsetZ = -1; + break; + } + + int heightShift = random.nextInt(6); + + for (int bIter = 4; bIter > 0; bIter--) + { + if (heightShift % 3 != 0) + { + posX += offsetX; + } + + if (heightShift % 3 != 1) + { + posZ += offsetZ; + } + + int branch = heightShift % 3 - 1; + + posY += branch; + + BlockPos blockpos = new BlockPos(posX, posY, posZ); + + this.generateNode(world, random, blockpos); + + heightShift = random.nextInt(6); + } + } + + private void genStraightBranch(World world, Random random, BlockPos pos, int height, int direction) + { + int posX = pos.getX(); + int posY = pos.getY() + height; + int posZ = pos.getZ(); + + byte xShift = 0; + byte zShift = 0; + + switch (direction) + { + case 1: + xShift = 1; + zShift = 0; + break; + + case 2: + xShift = 0; + zShift = 1; + break; + + case 3: + xShift = -1; + zShift = 0; + break; + + case 4: + xShift = 0; + zShift = -1; + break; + } + + int heightShift = random.nextInt(6); + + for (int j2 = 4; j2 > 0; j2--) + { + if (xShift == 0) + { + posX = (posX + random.nextInt(3)) - 1; + posZ += zShift; + } + + if (zShift == 0) + { + posX += xShift; + posZ = (posZ + random.nextInt(3)) - 1; + } + + int branch = heightShift % 3 - 1; + + posY += branch; + + BlockPos blockpos = new BlockPos(posX, posY, posZ); + + this.generateNode(world, random, blockpos); + + heightShift = random.nextInt(6); + } + } + + public boolean generateNode(World world, Random random, BlockPos pos) + { + this.setBlockAndMetadata(world, pos, this.full); + + for (int xIter = pos.getX() - 1; xIter <= pos.getX() + 1; xIter++) + { + for (int zIter = pos.getZ() - 1; zIter <= pos.getZ() + 1; zIter++) + { + BlockPos newPos = new BlockPos(xIter, pos.getY(), zIter); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + + if (block != NaturaNether.netherLeaves && !state.isFullBlock()) + { + this.setBlockAndMetadata(world, newPos, this.leaves); + } + } + } + + for (int xIter = pos.getX() - 1; xIter <= pos.getX() + 1; xIter++) + { + for (int zIter = pos.getZ() - 2; zIter <= pos.getZ() + 2; zIter++) + { + BlockPos newPos = new BlockPos(xIter, pos.getY(), zIter); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + + if (block != NaturaNether.netherLeaves && !state.isFullBlock()) + { + this.setBlockAndMetadata(world, newPos, this.leaves); + } + } + } + + for (int xIter = pos.getX() - 2; xIter <= pos.getX() + 2; xIter++) + { + for (int zIter = pos.getZ() - 1; zIter <= pos.getZ() + 1; zIter++) + { + BlockPos newPos = new BlockPos(xIter, pos.getY() + 1, zIter); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + + if (block != NaturaNether.netherLeaves && !state.isFullBlock()) + { + this.setBlockAndMetadata(world, newPos, this.leaves); + } + } + } + + return true; + } + + protected void setBlockAndMetadata(World world, BlockPos pos, IBlockState stateNew) + { + world.setBlockState(pos, stateNew, 2); + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/DarkwoodTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/DarkwoodTreeGenerator.java index 84956262..794c273a 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/DarkwoodTreeGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/DarkwoodTreeGenerator.java @@ -207,7 +207,7 @@ protected void placeTrunk(World world, BlockPos pos, int height) { this.setBlockAndMetadata(world, pos, this.log); } - + pos = pos.up(); height--; }*/ diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/FusewoodTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/FusewoodTreeGenerator.java index 0c0101b1..cbdab6d5 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/FusewoodTreeGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/FusewoodTreeGenerator.java @@ -5,11 +5,11 @@ import com.progwml6.natura.nether.NaturaNether; import com.progwml6.natura.world.worldgen.trees.BaseTreeGenerator; -import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockPos.MutableBlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; @@ -39,24 +39,26 @@ public FusewoodTreeGenerator(int treeHeight, IBlockState log, IBlockState leaves BlockPos findGround(World world, BlockPos pos) { - boolean foundGround = false; - int height = pos.getY(); + int returnHeight = 0; - BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + int y = pos.getY() - 1; do { - position = position.down(); - Block underBlock = world.getBlockState(position).getBlock(); + BlockPos position = new BlockPos(pos.getX(), y, pos.getZ()); + IBlockState state = world.getBlockState(position); - if (underBlock == Blocks.NETHERRACK || underBlock == Blocks.SOUL_SAND || underBlock == NaturaNether.netherTaintedSoil || position.getY() < 0) + if (state.getBlock() == Blocks.NETHERRACK || state.getBlock() == Blocks.SOUL_SAND || state.getBlock() == NaturaNether.netherTaintedSoil || position.getY() < 0) { - foundGround = true; + returnHeight = y + 1; + break; } + + y--; } - while (!foundGround); + while (y > 0); - return position.up(); + return new BlockPos(pos.getX(), returnHeight, pos.getZ()); } @Override @@ -65,10 +67,16 @@ public void generate(Random random, int chunkX, int chunkZ, World world, IChunkG } + public boolean isReplaceable(World world, BlockPos pos) + { + IBlockState state = world.getBlockState(pos); + return state.getBlock() != Blocks.AIR && !state.getBlock().isLeaves(state, world, pos) && state.getBlock() != Blocks.NETHERRACK && state.getBlock() != Blocks.SOUL_SAND && state.getBlock() != NaturaNether.netherTaintedSoil && !state.getBlock().isWood(world, pos); + } + @Override - public void generateTree(Random random, World world, BlockPos pos) + public void generateTree(Random rand, World worldIn, BlockPos position) { - int height = random.nextInt(3) + this.minTreeHeight; + int height = rand.nextInt(3) + this.minTreeHeight; if (height < 4) { height = 4; @@ -76,65 +84,62 @@ public void generateTree(Random random, World world, BlockPos pos) if (this.seekHeight) { - pos = this.findGround(world, pos); - if (pos.getY() < 0) + position = this.findGround(worldIn, position); + if (position.getY() < 0) { return; } } - int yPos = pos.getY(); - - if (yPos >= 1 && yPos + height + 1 <= 256) + if (position.getY() >= 1 && position.getY() + height + 1 <= 256) { - if (!this.checkClear(world, pos.getX(), yPos, pos.getY(), height)) + if (!this.checkClear(worldIn, position, height)) { return; } - IBlockState state = world.getBlockState(pos.down()); - Block soil = state.getBlock(); - boolean isSoil = (soil != null && soil.canSustainPlant(state, world, pos.down(), EnumFacing.UP, NaturaNether.netherSapling) || soil == Blocks.NETHERRACK); + BlockPos down = position.down(); + + IBlockState state = worldIn.getBlockState(down); + boolean isSoil = (state.getBlock() != null && state.getBlock().canSustainPlant(state, worldIn, down, EnumFacing.UP, NaturaNether.netherSapling) || state.getBlock() == Blocks.NETHERRACK); - if (isSoil && yPos < 256 - height - 1) + if (isSoil && position.getY() < 256 - height - 1) { - soil.onPlantGrow(state, world, pos.down(), pos); + state.getBlock().onPlantGrow(state, worldIn, down, position); - this.placeCanopy(world, random, pos, height); - this.placeTrunk(world, pos, height); + this.placeCanopy(worldIn, rand, position, height); + this.placeTrunk(worldIn, position, height); } } } - boolean checkClear(World world, int xPos, int yPos, int zPos, int treeHeight) + boolean checkClear(World worldIn, BlockPos position, int height) { boolean flag = true; - for (int y = yPos; y <= yPos + 1 + treeHeight; ++y) + for (int j = position.getY(); j <= position.getY() + 1 + height; ++j) { int range = 1; - if (y == yPos) + if (j == position.getY()) { range = 0; } - if (y >= yPos + 1 + treeHeight - 2) + if (j >= position.getY() + 1 + height - 2) { range = 2; } - for (int x = xPos - range; x <= xPos + range && flag; ++x) + MutableBlockPos mutableblockpos = new MutableBlockPos(); + + for (int l = position.getX() - range; l <= position.getX() + range && flag; ++l) { - for (int z = zPos - range; z <= zPos + range && flag; ++z) + for (int i1 = position.getZ() - range; i1 <= position.getZ() + range && flag; ++i1) { - if (y >= 0 && y < 256) + if (j >= 0 && j < 256) { - BlockPos blockpos = new BlockPos(x, y, z); - IBlockState state = world.getBlockState(blockpos); - Block block = state.getBlock(); - - if (!block.isAir(state, world, blockpos) && !block.isLeaves(state, world, blockpos) && block != Blocks.NETHERRACK && block != Blocks.SOUL_SAND && block != NaturaNether.netherTaintedSoil && !block.isWood(world, blockpos)) + if (this.isReplaceable(worldIn, mutableblockpos.setPos(l, j, i1))) { flag = false; } @@ -146,32 +151,33 @@ boolean checkClear(World world, int xPos, int yPos, int zPos, int treeHeight) } } } + return flag; } - protected void placeCanopy(World world, Random random, BlockPos pos, int height) + protected void placeCanopy(World worldIn, Random rand, BlockPos position, int height) { - for (int y = pos.getY() - 3 + height; y <= pos.getY() + height; ++y) + for (int y = position.getY() - 3 + height; y <= position.getY() + height; ++y) { - int subract = y - (pos.getY() + height); + int subract = y - (position.getY() + height); int subract2 = 1 - subract / 2; - for (int x = pos.getX() - subract2; x <= pos.getX() + subract2; ++x) + for (int x = position.getX() - subract2; x <= position.getX() + subract2; ++x) { - int mathX = x - pos.getX(); + int mathX = x - position.getX(); - for (int z = pos.getZ() - subract2; z <= pos.getZ() + subract2; ++z) + for (int z = position.getZ() - subract2; z <= position.getZ() + subract2; ++z) { - int mathZ = z - pos.getZ(); + int mathZ = z - position.getZ(); - if (Math.abs(mathX) != subract2 || Math.abs(mathZ) != subract2 || random.nextInt(2) != 0 && subract != 0) + if (Math.abs(mathX) != subract2 || Math.abs(mathZ) != subract2 || rand.nextInt(2) != 0 && subract != 0) { BlockPos blockpos = new BlockPos(x, y, z); - IBlockState state = world.getBlockState(blockpos); + IBlockState state2 = worldIn.getBlockState(blockpos); - if (state.getBlock() == null || state.getBlock().canBeReplacedByLeaves(state, world, blockpos)) + if (state2.getBlock().isAir(state2, worldIn, blockpos) || state2.getBlock().isAir(state2, worldIn, blockpos)) { - world.setBlockState(blockpos, this.leaves, 2); + worldIn.setBlockState(blockpos, this.leaves, 2); } } } @@ -179,31 +185,17 @@ protected void placeCanopy(World world, Random random, BlockPos pos, int height) } } - protected void placeTrunk(World world, BlockPos pos, int height) + protected void placeTrunk(World worldIn, BlockPos position, int height) { for (int localHeight = 0; localHeight < height; ++localHeight) { - BlockPos blockpos = new BlockPos(pos.getX(), pos.getY() + localHeight, pos.getZ()); - IBlockState state = world.getBlockState(blockpos); - Block block = state.getBlock(); + BlockPos upN = position.up(localHeight); + IBlockState state2 = worldIn.getBlockState(upN); - if (block.isAir(state, world, blockpos) || block == null || block.isLeaves(state, world, blockpos)) + if (state2.getBlock().isAir(state2, worldIn, upN) || state2.getBlock().isLeaves(state2, worldIn, upN)) { - world.setBlockState(blockpos, this.log, 2); + worldIn.setBlockState(position.up(localHeight), this.log, 2); } } - - /*while (height >= 0) - { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - if (block.isAir(state, world, pos) || block.isReplaceable(world, pos) || block.isLeaves(state, world, pos)) - { - this.setBlockAndMetadata(world, pos, this.log); - } - - pos = pos.up(); - height--; - }*/ } } diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/GhostwoodTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/GhostwoodTreeGenerator.java index 2d199d68..c216509e 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/GhostwoodTreeGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/nether/GhostwoodTreeGenerator.java @@ -51,10 +51,13 @@ public class GhostwoodTreeGenerator extends BaseTreeGenerator public final IBlockState leaves; - public GhostwoodTreeGenerator(IBlockState log, IBlockState leaves) + public final boolean seekHeight; + + public GhostwoodTreeGenerator(IBlockState log, IBlockState leaves, boolean seekHeight) { this.log = log; this.leaves = leaves; + this.seekHeight = seekHeight; } /** @@ -234,9 +237,9 @@ else if (j == k) */ void generateLeaves() { - for (GhostwoodTreeGenerator.FoliageCoordinates SakuraTreeGenerator$foliagecoordinates : this.foliageCoords) + for (GhostwoodTreeGenerator.FoliageCoordinates foliagecoordinates : this.foliageCoords) { - this.generateLeafNode(SakuraTreeGenerator$foliagecoordinates); + this.generateLeafNode(foliagecoordinates); } } @@ -271,14 +274,14 @@ void generateTrunk() */ void generateLeafNodeBases() { - for (GhostwoodTreeGenerator.FoliageCoordinates SakuraTreeGenerator$foliagecoordinates : this.foliageCoords) + for (GhostwoodTreeGenerator.FoliageCoordinates foliagecoordinates : this.foliageCoords) { - int i = SakuraTreeGenerator$foliagecoordinates.getBranchBase(); + int i = foliagecoordinates.getBranchBase(); BlockPos blockpos = new BlockPos(this.basePos.getX(), i, this.basePos.getZ()); - if (!blockpos.equals(SakuraTreeGenerator$foliagecoordinates) && this.leafNodeNeedsBase(i - this.basePos.getY())) + if (!blockpos.equals(foliagecoordinates) && this.leafNodeNeedsBase(i - this.basePos.getY())) { - this.limb(blockpos, SakuraTreeGenerator$foliagecoordinates, this.log); + this.limb(blockpos, foliagecoordinates, this.log); } } } @@ -402,7 +405,16 @@ public void generate(Random random, int chunkX, int chunkZ, World world, IChunkG public void generateTree(Random random, World worldIn, BlockPos position) { this.world = worldIn; - this.basePos = position; + + if (this.seekHeight) + { + this.basePos = this.findGround(worldIn, position); + } + else + { + this.basePos = position; + } + this.rand = new Random(random.nextLong()); if (this.heightLimit == 0) diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/EucalyptusTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/EucalyptusTreeGenerator.java index 93d0b2e7..49072d7a 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/EucalyptusTreeGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/EucalyptusTreeGenerator.java @@ -163,24 +163,6 @@ BlockPos findGround(World world, BlockPos pos) return new BlockPos(pos.getX(), returnHeight, pos.getZ()); } - /*@SuppressWarnings("deprecation") - BlockPos findGround(World world, BlockPos pos) - { - do - { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - if ((block == Blocks.DIRT || block == Blocks.GRASS) && !world.getBlockState(pos.up()).getBlock().isOpaqueCube(state)) - { - return pos.up(); - } - pos = pos.down(); - } - while (pos.getY() > 0); - - return pos; - }*/ - private void genBranch(World world, Random random, BlockPos pos, int height, int direction) { int posX = pos.getX(); diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/HopseedTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/HopseedTreeGenerator.java index f139a5e9..f8b8ad5c 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/HopseedTreeGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/HopseedTreeGenerator.java @@ -11,7 +11,9 @@ import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockPos.MutableBlockPos; import net.minecraft.world.World; +import net.minecraft.world.WorldType; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; @@ -27,18 +29,21 @@ public class HopseedTreeGenerator extends BaseTreeGenerator public final boolean seekHeight; - public HopseedTreeGenerator(int treeHeight, int treeRange, IBlockState log, IBlockState leaves, boolean seekHeight) + public final boolean isSapling; + + public HopseedTreeGenerator(int treeHeight, int treeRange, IBlockState log, IBlockState leaves, boolean seekHeight, boolean isSapling) { this.minTreeHeight = treeHeight; this.treeHeightRange = treeRange; this.log = log; this.leaves = leaves; this.seekHeight = seekHeight; + this.isSapling = isSapling; } public HopseedTreeGenerator(int treeHeight, int treeRange, IBlockState log, IBlockState leaves) { - this(treeHeight, treeRange, log, leaves, true); + this(treeHeight, treeRange, log, leaves, true, false); } @Override @@ -79,7 +84,7 @@ public void generateTree(Random random, World worldIn, BlockPos position) k = 2; } - BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + MutableBlockPos mutableblockpos = new MutableBlockPos(); for (int l = position.getX() - k; l <= position.getX() + k && flag; ++l) { @@ -87,19 +92,9 @@ public void generateTree(Random random, World worldIn, BlockPos position) { if (j >= 0 && j < 256) { - IBlockState iblockstate = worldIn.getBlockState(blockpos$mutableblockpos.setPos(l, j, i1)); - Block block = iblockstate.getBlock(); - - if (!iblockstate.getBlock().isAir(iblockstate, worldIn, blockpos$mutableblockpos.setPos(l, j, i1)) && !iblockstate.getBlock().isLeaves(iblockstate, worldIn, blockpos$mutableblockpos.setPos(l, j, i1))) + if (!this.isReplaceable(worldIn, mutableblockpos.setPos(l, j, i1))) { - if (block != Blocks.WATER && block != Blocks.FLOWING_WATER) - { - flag = false; - } - else if (j > position.getY()) - { - flag = false; - } + flag = false; } } else @@ -115,48 +110,61 @@ else if (j > position.getY()) } else { + BlockPos downPosition = position.down(); + + IBlockState state = worldIn.getBlockState(downPosition); - IBlockState state = worldIn.getBlockState(position.down()); - Block soil = state.getBlock(); - boolean isSoil = (soil != null && soil.canSustainPlant(state, worldIn, position.down(), EnumFacing.UP, NaturaOverworld.overworldSapling2)); + boolean isSoil = (state.getBlock() != null && state.getBlock().canSustainPlant(state, worldIn, downPosition, EnumFacing.UP, NaturaOverworld.overworldSapling2)); - if (isSoil) + if (isSoil && position.getY() < 256 - height - 1) { - soil.onPlantGrow(state, worldIn, position.down(), position); + this.onPlantGrow(worldIn, downPosition, position); + this.onPlantGrow(worldIn, downPosition.east(), position); + this.onPlantGrow(worldIn, downPosition.south(), position); + this.onPlantGrow(worldIn, downPosition.south().east(), position); this.growLogs(worldIn, position); + this.growLeaves(worldIn, random, position, height); for (int l = 0; l < height; ++l) { - BlockPos blockpos = new BlockPos(position.getX(), position.getY() + l, position.getZ()); + BlockPos blockpos = position.up(l); + + IBlockState newState = worldIn.getBlockState(blockpos); - if (worldIn.getBlockState(blockpos).getBlock().isAir(worldIn.getBlockState(blockpos), worldIn, blockpos) || worldIn.getBlockState(blockpos).getBlock().canPlaceBlockAt(worldIn, blockpos) || worldIn.getBlockState(blockpos) == this.leaves) + if (newState.getBlock() == Blocks.AIR || newState.getBlock() == null || newState.getBlock().isLeaves(newState, worldIn, blockpos)) { - this.setBlockAndMetadata(worldIn, blockpos, this.leaves); + worldIn.setBlockState(blockpos, this.log, 0); } if (l < height - 1) { - blockpos = new BlockPos(position.getX() + 1, position.getY() + l, position.getZ()); + blockpos = position.add(1, l, 0); - if (worldIn.getBlockState(blockpos).getBlock().isAir(worldIn.getBlockState(blockpos), worldIn, blockpos) || worldIn.getBlockState(blockpos).getBlock().canPlaceBlockAt(worldIn, blockpos) || worldIn.getBlockState(blockpos) == this.leaves) + newState = worldIn.getBlockState(blockpos); + + if (newState.getBlock() == Blocks.AIR || newState.getBlock() == null || newState.getBlock().isLeaves(newState, worldIn, blockpos)) { - this.setBlockAndMetadata(worldIn, blockpos, this.leaves); + worldIn.setBlockState(blockpos, this.log, 0); } - blockpos = new BlockPos(position.getX() + 1, position.getY() + l, position.getZ() + 1); + blockpos = position.add(1, l, 1); + + newState = worldIn.getBlockState(blockpos); - if (worldIn.getBlockState(blockpos).getBlock().isAir(worldIn.getBlockState(blockpos), worldIn, blockpos) || worldIn.getBlockState(blockpos).getBlock().canPlaceBlockAt(worldIn, blockpos) || worldIn.getBlockState(blockpos) == this.leaves) + if (newState.getBlock() == Blocks.AIR || newState.getBlock() == null || newState.getBlock().isLeaves(newState, worldIn, blockpos)) { - this.setBlockAndMetadata(worldIn, blockpos, this.leaves); + worldIn.setBlockState(blockpos, this.log, 0); } - blockpos = new BlockPos(position.getX(), position.getY() + l, position.getZ() + 1); + blockpos = position.add(0, l, 1); + + newState = worldIn.getBlockState(blockpos); - if (worldIn.getBlockState(blockpos).getBlock().isAir(worldIn.getBlockState(blockpos), worldIn, blockpos) || worldIn.getBlockState(blockpos).getBlock().canPlaceBlockAt(worldIn, blockpos) || worldIn.getBlockState(blockpos) == this.leaves) + if (newState.getBlock() == Blocks.AIR || newState.getBlock() == null || newState.getBlock().isLeaves(newState, worldIn, blockpos)) { - this.setBlockAndMetadata(worldIn, blockpos, this.leaves); + worldIn.setBlockState(blockpos, this.log, 0); } } } @@ -167,25 +175,58 @@ else if (j > position.getY()) BlockPos findGround(World world, BlockPos pos) { - boolean foundGround = false; + if (world.getWorldType() == WorldType.FLAT && this.isSapling) + { + int returnHeight = 0; + + boolean foundGround = false; - int height = Config.seaLevel + 64; + int height = Config.flatSeaLevel + 64; - do + do + { + height--; + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + + Block underBlock = world.getBlockState(position).getBlock(); + + if (underBlock == Blocks.DIRT || underBlock == Blocks.GRASS || height < Config.flatSeaLevel) + { + returnHeight = height + 1; + + foundGround = true; + } + } + while (!foundGround); + + return new BlockPos(pos.getX(), returnHeight, pos.getZ()); + } + else { - height--; - BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + int returnHeight = 0; - Block underBlock = world.getBlockState(position).getBlock(); + boolean foundGround = false; - if (underBlock == Blocks.DIRT || underBlock == Blocks.GRASS || height < Config.seaLevel) + int height = Config.seaLevel + 64; + + do { - foundGround = true; + height--; + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + + Block underBlock = world.getBlockState(position).getBlock(); + + if (underBlock == Blocks.DIRT || underBlock == Blocks.GRASS || height < Config.seaLevel) + { + returnHeight = height + 1; + + foundGround = true; + } } - } - while (!foundGround); + while (!foundGround); - return new BlockPos(pos.getX(), height, pos.getZ()); + return new BlockPos(pos.getX(), returnHeight, pos.getZ()); + } } private void growLogs(World worldIn, BlockPos position) @@ -232,9 +273,24 @@ protected void setBlockAndMetadata(World world, BlockPos pos, IBlockState stateN { IBlockState state = world.getBlockState(pos); Block block = state.getBlock(); + if (block.isAir(state, world, pos) || block.canPlaceBlockAt(world, pos) || world.getBlockState(pos) == this.leaves) { world.setBlockState(pos, stateNew, 2); } } + + public boolean isReplaceable(World world, BlockPos pos) + { + IBlockState state = world.getBlockState(pos); + + return state.getBlock().isAir(state, world, pos) || state.getBlock().isLeaves(state, world, pos) || state.getBlock().isWood(world, pos); + } + + private void onPlantGrow(World world, BlockPos pos, BlockPos source) + { + IBlockState state = world.getBlockState(pos); + + state.getBlock().onPlantGrow(state, world, pos, source); + } } diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/OverworldTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/OverworldTreeGenerator.java index 485226b9..28adee5e 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/OverworldTreeGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/OverworldTreeGenerator.java @@ -12,6 +12,7 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import net.minecraft.world.WorldType; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; @@ -27,18 +28,21 @@ public class OverworldTreeGenerator extends BaseTreeGenerator public final boolean seekHeight; - public OverworldTreeGenerator(int treeHeight, int treeRange, IBlockState log, IBlockState leaves, boolean seekHeight) + public final boolean isSapling; + + public OverworldTreeGenerator(int treeHeight, int treeRange, IBlockState log, IBlockState leaves, boolean seekHeight, boolean isSapling) { this.minTreeHeight = treeHeight; this.treeHeightRange = treeRange; this.log = log; this.leaves = leaves; this.seekHeight = seekHeight; + this.isSapling = isSapling; } public OverworldTreeGenerator(int treeHeight, int treeRange, IBlockState log, IBlockState leaves) { - this(treeHeight, treeRange, log, leaves, true); + this(treeHeight, treeRange, log, leaves, true, false); } @Override @@ -119,23 +123,47 @@ BlockPos findGround(World world, BlockPos pos) int height = pos.getY(); - do + if (world.getWorldType() == WorldType.FLAT && this.isSapling) { - BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + do + { + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); - Block block = world.getBlockState(position).getBlock(); + Block block = world.getBlockState(position).getBlock(); - if ((block == Blocks.DIRT || block == Blocks.GRASS) && !world.getBlockState(position.up()).isFullBlock()) - { - returnHeight = height + 1; - break; + if ((block == Blocks.DIRT || block == Blocks.GRASS) && !world.getBlockState(position.up()).isFullBlock()) + { + returnHeight = height + 1; + break; + } + + height--; } + while (height > Config.flatSeaLevel); - height--; + return new BlockPos(pos.getX(), returnHeight, pos.getZ()); } - while (height > Config.seaLevel); + else + { + + do + { + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); - return new BlockPos(pos.getX(), returnHeight, pos.getZ()); + Block block = world.getBlockState(position).getBlock(); + + if ((block == Blocks.DIRT || block == Blocks.GRASS) && !world.getBlockState(position.up()).isFullBlock()) + { + returnHeight = height + 1; + break; + } + + height--; + } + while (height > Config.seaLevel); + + return new BlockPos(pos.getX(), returnHeight, pos.getZ()); + } } protected void placeCanopy(World world, Random random, BlockPos pos, int height) @@ -181,18 +209,5 @@ protected void placeTrunk(World world, BlockPos pos, int height) world.setBlockState(blockpos, this.log, 2); } } - - /*while (height >= 0) - { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - if (block.isAir(state, world, pos) || block.isReplaceable(world, pos) || block.isLeaves(state, world, pos)) - { - this.setBlockAndMetadata(world, pos, this.log); - } - - pos = pos.up(); - height--; - }*/ } } diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/RedwoodTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/RedwoodTreeGenerator.java new file mode 100644 index 00000000..8ca34c53 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/RedwoodTreeGenerator.java @@ -0,0 +1,2383 @@ +package com.progwml6.natura.world.worldgen.trees.overworld; + +import java.util.List; +import java.util.Random; + +import com.google.common.collect.Lists; +import com.progwml6.natura.common.config.Config; +import com.progwml6.natura.world.worldgen.trees.BaseTreeGenerator; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.WorldType; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; + +public class RedwoodTreeGenerator extends BaseTreeGenerator +{ + private Random rand; + + private World world; + + private BlockPos basePos = BlockPos.ORIGIN; + + int heightLimit; + + int height; + + double heightAttenuation = 0.618D; + + double branchSlope = 0.381D; + + double scaleWidth = 1.0D; + + double leafDensity = 1.0D; + + int trunkSize = 1; + + int heightLimitLimit = 12; + + /** Sets the distance limit for how far away the generator will populate leaves from the base leaf node. */ + int leafDistanceLimit = 4; + + List foliageCoords; + + public final IBlockState bark; + + public final IBlockState heart; + + public final IBlockState root; + + public final IBlockState leaves; + + public final boolean useHeight; + + public final boolean isSapling; + + public RedwoodTreeGenerator(IBlockState bark, IBlockState heart, IBlockState root, IBlockState leaves, boolean useHeight, boolean isSapling) + { + this.bark = bark; + this.heart = heart; + this.root = root; + + this.leaves = leaves; + this.useHeight = useHeight; + this.isSapling = isSapling; + } + + public RedwoodTreeGenerator(IBlockState log, IBlockState heart, IBlockState root, IBlockState leaves) + { + this(log, heart, root, leaves, true, true); + } + + /** + * Generates a list of leaf nodes for the tree, to be populated by generateLeaves. + */ + void generateLeafNodeList() + { + this.height = (int) (this.heightLimit * this.heightAttenuation); + + if (this.height >= this.heightLimit) + { + this.height = this.heightLimit - 1; + } + + int i = (int) (1.382D + Math.pow(this.leafDensity * this.heightLimit / 13.0D, 2.0D)); + + if (i < 1) + { + i = 1; + } + + int j = this.basePos.getY() + this.height; + int k = this.heightLimit - this.leafDistanceLimit; + this.foliageCoords = Lists. newArrayList(); + this.foliageCoords.add(new FoliageCoordinates(this.basePos.up(k), j)); + + for (; k >= 0; --k) + { + float f = this.layerSize(k); + + if (f >= 0.0F) + { + for (int l = 0; l < i; ++l) + { + double d0 = this.scaleWidth * f * (this.rand.nextFloat() + 0.328D); + double d1 = this.rand.nextFloat() * 2.0F * Math.PI; + double d2 = d0 * Math.sin(d1) + 0.5D; + double d3 = d0 * Math.cos(d1) + 0.5D; + BlockPos blockpos = this.basePos.add(d2, -1, d3); + BlockPos blockpos1 = blockpos.up(this.leafDistanceLimit); + + if (this.checkBlockLine(blockpos, blockpos1) == -1) + { + int i1 = this.basePos.getX() - blockpos.getX(); + int j1 = this.basePos.getZ() - blockpos.getZ(); + double d4 = blockpos.getY() - Math.sqrt(i1 * i1 + j1 * j1) * this.branchSlope; + int k1 = d4 > j ? j : (int) d4; + BlockPos blockpos2 = new BlockPos(this.basePos.getX(), k1, this.basePos.getZ()); + + if (this.checkBlockLine(blockpos2, blockpos) == -1) + { + this.foliageCoords.add(new FoliageCoordinates(blockpos, blockpos2.getY())); + } + } + } + } + } + } + + void crosSection(BlockPos pos, float size, IBlockState state) + { + int i = (int) (size + 0.618D); + + for (int j = -i; j <= i; ++j) + { + for (int k = -i; k <= i; ++k) + { + if (Math.pow(Math.abs(j) + 0.5D, 2.0D) + Math.pow(Math.abs(k) + 0.5D, 2.0D) <= size * size) + { + BlockPos blockpos = pos.add(j, 0, k); + IBlockState stateAtPos = this.world.getBlockState(blockpos); + + if (stateAtPos.getBlock().isAir(stateAtPos, this.world, blockpos) || stateAtPos.getBlock().isLeaves(stateAtPos, this.world, blockpos)) + { + this.setBlockAndMetadata(this.world, blockpos, state); + } + } + } + } + } + + /** + * Gets the rough size of a layer of the tree. + */ + float layerSize(int y) + { + if (y < this.heightLimit * 0.3F) + { + return -1.0F; + } + else + { + float f = this.heightLimit / 2.0F; + float f1 = f - y; + float f2 = MathHelper.sqrt(f * f - f1 * f1); + + if (f1 == 0.0F) + { + f2 = f; + } + else if (Math.abs(f1) >= f) + { + return 0.0F; + } + + return f2 * 0.5F; + } + } + + float leafSize(int y) + { + return y >= 0 && y < this.leafDistanceLimit ? (y != 0 && y != this.leafDistanceLimit - 1 ? 3.0F : 2.0F) : -1.0F; + } + + /** + * Generates the leaves surrounding an individual entry in the leafNodes list. + */ + void generateLeafNode(BlockPos pos) + { + for (int i = 0; i < this.leafDistanceLimit; ++i) + { + this.crosSection(pos.up(i), this.leafSize(i), this.leaves); + } + } + + void limb(BlockPos pos1, BlockPos pos2, IBlockState state) + { + BlockPos blockpos = pos2.add(-pos1.getX(), -pos1.getY(), -pos1.getZ()); + int i = this.getGreatestDistance(blockpos); + float f = (float) blockpos.getX() / (float) i; + float f1 = (float) blockpos.getY() / (float) i; + float f2 = (float) blockpos.getZ() / (float) i; + + for (int j = 0; j <= i; ++j) + { + BlockPos blockpos1 = pos1.add(0.5F + j * f, 0.5F + j * f1, 0.5F + j * f2); + this.setBlockAndMetadata(this.world, blockpos1, state); + } + } + + /** + * Returns the absolute greatest distance in the BlockPos object. + */ + private int getGreatestDistance(BlockPos posIn) + { + int i = MathHelper.abs(posIn.getX()); + int j = MathHelper.abs(posIn.getY()); + int k = MathHelper.abs(posIn.getZ()); + return k > i && k > j ? k : (j > i ? j : i); + } + + /** + * Generates the leaf portion of the tree as specified by the leafNodes list. + */ + void generateLeaves() + { + for (FoliageCoordinates foliagecoordinates : this.foliageCoords) + { + this.generateLeafNode(foliagecoordinates); + } + } + + /** + * Indicates whether or not a leaf node requires additional wood to be added to preserve integrity. + */ + boolean leafNodeNeedsBase(int p_76493_1_) + { + return p_76493_1_ >= this.heightLimit * 0.2D; + } + + /** + * Generates additional wood blocks to fill out the bases of different leaf nodes that would otherwise degrade. + */ + void generateLeafNodeBases() + { + for (FoliageCoordinates foliagecoordinates : this.foliageCoords) + { + int i = foliagecoordinates.getBranchBase(); + BlockPos blockpos = new BlockPos(this.basePos.getX(), i, this.basePos.getZ()); + + if (!blockpos.equals(foliagecoordinates) && this.leafNodeNeedsBase(i - this.basePos.getY())) + { + this.limb(blockpos, foliagecoordinates, this.bark); + } + } + } + + /** + * Checks a line of blocks in the world from the first coordinate to triplet to the second, returning the distance + * (in blocks) before a non-air, non-leaf block is encountered and/or the end is encountered. + */ + int checkBlockLine(BlockPos posOne, BlockPos posTwo) + { + BlockPos blockpos = posTwo.add(-posOne.getX(), -posOne.getY(), -posOne.getZ()); + int i = this.getGreatestDistance(blockpos); + float f = (float) blockpos.getX() / (float) i; + float f1 = (float) blockpos.getY() / (float) i; + float f2 = (float) blockpos.getZ() / (float) i; + + if (i == 0) + { + return -1; + } + else + { + for (int j = 0; j <= i; ++j) + { + BlockPos blockpos1 = posOne.add(0.5F + j * f, 0.5F + j * f1, 0.5F + j * f2); + + if (!this.isReplaceable(this.world, blockpos1)) + { + return j; + } + } + + return -1; + } + } + + protected void setBlockAndMetadata(World world, BlockPos pos, IBlockState stateNew) + { + world.setBlockState(pos, stateNew, 2); + } + + public boolean isReplaceable(World world, BlockPos pos) + { + IBlockState state = world.getBlockState(pos); + return state.getBlock().isAir(state, world, pos) || state.getBlock().isLeaves(state, world, pos) || state.getBlock().isWood(world, pos) || this.canGrowInto(state.getBlock()); + } + + /** + * returns whether or not a tree can grow into a block + * For example, a tree will not grow into stone + */ + protected boolean canGrowInto(Block blockType) + { + Material material = blockType.getDefaultState().getMaterial(); + return material == Material.AIR || material == Material.LEAVES || blockType == Blocks.GRASS || blockType == Blocks.DIRT || blockType == Blocks.LOG || blockType == Blocks.LOG2 || blockType == Blocks.SAPLING || blockType == Blocks.VINE; + } + + BlockPos findGround(World world, BlockPos pos) + { + if (world.getWorldType() == WorldType.FLAT && this.isSapling) + { + boolean foundGround = false; + + int height = Config.flatSeaLevel + 64; + + do + { + height--; + + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + + Block underBlock = world.getBlockState(position).getBlock(); + + if (underBlock == Blocks.DIRT || underBlock == Blocks.GRASS || height < Config.flatSeaLevel) + { + foundGround = true; + } + } + while (!foundGround); + + return new BlockPos(pos.getX(), height, pos.getZ()); + } + else + { + boolean foundGround = false; + + int height = Config.seaLevel + 64; + + do + { + height--; + + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + + Block underBlock = world.getBlockState(position).getBlock(); + + if (underBlock == Blocks.DIRT || underBlock == Blocks.GRASS || height < Config.seaLevel) + { + foundGround = true; + } + } + while (!foundGround); + + return new BlockPos(pos.getX(), height, pos.getZ()); + } + } + + public boolean isValidSpawn(World world, BlockPos pos) + { + Block block = world.getBlockState(pos).getBlock(); + + boolean ground = block == Blocks.DIRT || block == Blocks.GRASS; + boolean transparent = !world.getBlockState(pos.up()).isFullBlock(); + + return ground && transparent; + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + } + + @Override + public void generateTree(Random random, World world, BlockPos pos) + { + BlockPos groundPosition = pos; + + if (!this.useHeight) + { + groundPosition = this.findGround(world, pos); + + if (!this.isValidSpawn(world, groundPosition)) + { + return; + } + } + + int treeHeight = random.nextInt(60) + 80; + + this.world = world; + this.basePos = groundPosition; + this.rand = new Random(random.nextLong()); + this.heightLimit = 5 + this.rand.nextInt(this.heightLimitLimit); + + if (treeHeight > 120) + { + for (int currentHeight = 0; currentHeight < treeHeight; currentHeight++) + { + if (currentHeight < treeHeight * 1 / 10) + { + this.genRing13(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 2 / 10) + { + this.genRing12(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 3 / 10) + { + this.genRing11(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 4 / 10) + { + this.genRing10(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 5 / 10) + { + this.genRing9(world, random, groundPosition.up(currentHeight)); + + this.growLowBranch(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 6 / 10) + { + this.genRing8(world, random, groundPosition.up(currentHeight)); + + this.growLowBranch(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 7 / 10) + { + this.genRing7(world, random, groundPosition.up(currentHeight)); + + this.growMiddleBranch(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 8 / 10) + { + this.genRing6(world, random, groundPosition.up(currentHeight)); + + this.growMiddleBranch(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 9 / 10) + { + this.genRing5(world, random, groundPosition.up(currentHeight)); + + this.growHighBranch(world, random, groundPosition.up(currentHeight)); + } + else + { + this.genRing3(world, random, groundPosition.up(currentHeight)); + + this.growHighBranch(world, random, groundPosition.up(currentHeight)); + } + } + + this.growBigRoots(world, random, groundPosition.down()); + + this.growTop(world, random, groundPosition.up(this.height)); + } + else if (treeHeight > 100) + { + for (int currentHeight = 0; currentHeight < treeHeight; currentHeight++) + { + if (currentHeight < treeHeight * 1 / 8) + { + this.genRing11(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 2 / 8) + { + this.genRing10(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 3 / 8) + { + this.genRing9(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 4 / 8) + { + this.genRing8(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 5 / 8) + { + this.genRing7(world, random, groundPosition.up(currentHeight)); + + this.growMiddleBranch(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 6 / 8) + { + this.genRing6(world, random, groundPosition.up(currentHeight)); + + this.growMiddleBranch(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 7 / 8) + { + this.genRing5(world, random, groundPosition.up(currentHeight)); + + this.growHighBranch(world, random, groundPosition.up(currentHeight)); + } + else + { + this.genRing3(world, random, groundPosition.up(currentHeight)); + + this.growHighBranch(world, random, groundPosition.up(currentHeight)); + } + } + + this.growMediumRoots(world, random, groundPosition.down()); + + this.growTop(world, random, groundPosition.up(this.height)); + } + else + { + for (int currentHeight = 0; currentHeight < treeHeight; currentHeight++) + { + if (currentHeight < treeHeight * 1 / 6) + { + this.genRing9(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 2 / 6) + { + this.genRing8(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 3 / 6) + { + this.genRing7(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 4 / 6) + { + this.genRing6(world, random, groundPosition.up(currentHeight)); + + this.growMiddleBranch(world, random, groundPosition.up(currentHeight)); + } + else if (currentHeight < treeHeight * 5 / 6) + { + this.genRing5(world, random, groundPosition.up(currentHeight)); + + this.growHighBranch(world, random, groundPosition.up(currentHeight)); + } + else + { + this.genRing3(world, random, groundPosition.up(currentHeight)); + + this.growHighBranch(world, random, groundPosition.up(currentHeight)); + } + } + + this.growSmallRoots(world, random, groundPosition.down()); + + this.growTop(world, random, groundPosition.up(this.height)); + } + } + + public boolean growTop(World world, Random random, BlockPos pos) + { + this.basePos = pos.up(4); + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateLeafNodeBases(); + + this.basePos = pos.up(4); + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateLeafNodeBases(); + + this.basePos = pos; + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateLeafNodeBases(); + + this.basePos = pos; + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateLeafNodeBases(); + + return false; + } + + public boolean growHighBranch(World world, Random random, BlockPos pos) + { + int xPos = pos.getX(); + int yPos = pos.getY(); + int zPos = pos.getZ(); + + for (int iter = 0; iter < 3; iter++) + { + this.basePos = new BlockPos((xPos + random.nextInt(21)) - 10, yPos, (zPos + random.nextInt(21)) - 10); + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateLeafNodeBases(); + } + + return false; + } + + public boolean growMiddleBranch(World world, Random random, BlockPos pos) + { + int xPos = pos.getX(); + int yPos = pos.getY(); + int zPos = pos.getZ(); + + for (int iter = 0; iter < 6; iter++) + { + this.basePos = new BlockPos((xPos + random.nextInt(31)) - 15, yPos, (zPos + random.nextInt(31)) - 15); + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateLeafNodeBases(); + } + + return false; + } + + public boolean growLowBranch(World world, Random random, BlockPos pos) + { + int xPos = pos.getX(); + int yPos = pos.getY(); + int zPos = pos.getZ(); + + this.basePos = new BlockPos((xPos + random.nextInt(17)) - 8, yPos, (zPos + random.nextInt(17)) - 8); + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateLeafNodeBases(); + + if (random.nextInt(2) == 0) + { + this.basePos = new BlockPos((xPos + random.nextInt(17)) - 8, yPos, (zPos + random.nextInt(17)) - 8); + + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateLeafNodeBases(); + } + + this.basePos = new BlockPos((xPos + random.nextInt(17)) - 8, yPos, (zPos + random.nextInt(17)) - 8); + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateLeafNodeBases(); + + return false; + } + + //TODO: CHANGE EVERYTHING BELOW. + + public boolean growSmallRoots(World world, Random random, BlockPos pos) + { + this.genRing9(world, random, pos); + + this.smallRoot1(world, random, pos.down(1)); + this.smallRoot1(world, random, pos.down(2)); + this.smallRoot1(world, random, pos.down(3)); + + this.smallRoot2(world, random, pos.down(4)); + this.smallRoot2(world, random, pos.down(5)); + + this.smallRoot3(world, random, pos.down(6)); + this.smallRoot3(world, random, pos.down(7)); + this.smallRoot3(world, random, pos.down(8)); + this.smallRoot3(world, random, pos.down(9)); + + this.smallRoot4(world, random, pos.down(10)); + this.smallRoot4(world, random, pos.down(11)); + + return true; + } + + public boolean growMediumRoots(World world, Random random, BlockPos pos) + { + this.genRing11(world, random, pos); + + this.mediumRoot1(world, random, pos.down(1)); + this.mediumRoot1(world, random, pos.down(2)); + this.mediumRoot1(world, random, pos.down(3)); + + this.mediumRoot2(world, random, pos.down(4)); + this.mediumRoot2(world, random, pos.down(5)); + + this.mediumRoot3(world, random, pos.down(6)); + this.mediumRoot3(world, random, pos.down(7)); + this.mediumRoot3(world, random, pos.down(8)); + this.mediumRoot3(world, random, pos.down(9)); + + this.mediumRoot4(world, random, pos.down(10)); + this.mediumRoot4(world, random, pos.down(11)); + + this.mediumRoot5(world, random, pos.down(12)); + this.mediumRoot5(world, random, pos.down(13)); + this.mediumRoot5(world, random, pos.down(14)); + + return true; + } + + public boolean growBigRoots(World world, Random random, BlockPos pos) + { + this.genRing13(world, random, pos); + + this.bigRoot1(world, random, pos.down(1)); + this.bigRoot1(world, random, pos.down(2)); + this.bigRoot1(world, random, pos.down(3)); + + this.bigRoot2(world, random, pos.down(4)); + this.bigRoot2(world, random, pos.down(5)); + + this.bigRoot3(world, random, pos.down(6)); + this.bigRoot3(world, random, pos.down(7)); + this.bigRoot3(world, random, pos.down(8)); + this.bigRoot3(world, random, pos.down(9)); + + this.bigRoot4(world, random, pos.down(10)); + this.bigRoot4(world, random, pos.down(11)); + + this.bigRoot5(world, random, pos.down(12)); + this.bigRoot5(world, random, pos.down(13)); + this.bigRoot5(world, random, pos.down(14)); + + this.bigRoot6(world, random, pos.down(15)); + this.bigRoot6(world, random, pos.down(16)); + this.bigRoot6(world, random, pos.down(17)); + this.bigRoot6(world, random, pos.down(18)); + + return true; + } + + public boolean smallRoot1(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.root); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.root); + } + + return true; + } + + public boolean smallRoot2(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.root); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.root); + } + + return true; + } + + public boolean smallRoot3(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + } + + return true; + } + + public boolean smallRoot4(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.root); + } + + return true; + } + + public boolean mediumRoot1(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-5, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, 1), this.root); + + this.setBlockAndMetadata(world, pos.add(-4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(5, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, 1), this.root); + } + + return true; + } + + public boolean mediumRoot2(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.root); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.root); + + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.root); + } + + return true; + } + + public boolean mediumRoot3(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.root); + } + + return true; + } + + public boolean mediumRoot4(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + } + + return true; + } + + public boolean mediumRoot5(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + } + + return true; + } + + public boolean bigRoot1(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-6, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-6, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-6, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-6, 0, 2), this.root); + + this.setBlockAndMetadata(world, pos.add(-5, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(-4, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -6), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 5), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 6), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -6), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 5), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 6), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -6), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 5), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 6), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -6), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 5), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 6), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(4, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(5, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(6, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(6, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(6, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(6, 0, 2), this.root); + } + + return true; + } + + public boolean bigRoot2(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-5, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-5, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(-4, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -6), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 5), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 6), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -6), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 5), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 6), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -6), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 5), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 6), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -6), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 5), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 6), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(4, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(5, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, -1), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, 1), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(5, 0, 4), this.root); + } + + return true; + } + + public boolean bigRoot3(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, -2), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 2), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 3), this.root); + } + + return true; + } + + public boolean bigRoot4(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-4, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -5), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 5), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(4, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(4, 0, 3), this.root); + } + + return true; + } + + public boolean bigRoot5(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.root); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.root); + } + + return true; + } + + public boolean bigRoot6(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.root); + + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.root); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.root); + } + + return true; + } + + public boolean genRing13(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-6, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-6, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-6, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-6, 0, 1), this.bark); + this.setBlockAndMetadata(world, pos.add(-6, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(-5, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-5, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-5, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-5, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, 3), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(-4, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 4), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, 5), this.bark); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 5), this.bark); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 5), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -5), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 5), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -5), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 5), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, -5), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 5), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(2, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 5), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(3, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 5), this.bark); + + this.setBlockAndMetadata(world, pos.add(4, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 4), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, 5), this.bark); + + this.setBlockAndMetadata(world, pos.add(5, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(5, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(5, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(5, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, 3), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(6, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(6, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(6, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(6, 0, 1), this.bark); + this.setBlockAndMetadata(world, pos.add(6, 0, 2), this.bark); + } + + return true; + } + + public boolean genRing12(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-6, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-6, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-6, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(-5, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-5, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-5, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-5, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(-4, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 5), this.bark); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -5), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 5), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -5), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 5), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -5), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 5), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, -5), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 5), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(2, 0, -6), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -5), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 5), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 6), this.bark); + + this.setBlockAndMetadata(world, pos.add(3, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 5), this.bark); + + this.setBlockAndMetadata(world, pos.add(4, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(5, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(5, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(5, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(5, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(6, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(6, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(6, 0, 1), this.bark); + } + + return true; + } + + public boolean genRing11(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-5, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-5, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(-4, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-4, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 5), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 5), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -5), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 5), this.bark); + + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(3, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(4, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(4, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(5, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(5, 0, 1), this.bark); + } + + return true; + } + + public boolean genRing10(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-4, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(2, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(4, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, 2), this.bark); + } + + return true; + } + + public boolean genRing9(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-4, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-4, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(-3, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -4), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 4), this.bark); + + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(3, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(4, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(4, 0, 1), this.bark); + } + + return true; + } + + public boolean genRing8(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-3, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(2, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(3, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, 2), this.bark); + } + + return true; + } + + public boolean genRing7(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-3, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-3, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -3), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 3), this.bark); + + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(3, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(3, 0, 1), this.bark); + } + + return true; + } + + public boolean genRing6(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-2, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(2, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, 2), this.bark); + } + + return true; + } + + public boolean genRing5(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(0, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.heart); + this.setBlockAndMetadata(world, pos.add(1, 0, 2), this.bark); + + this.setBlockAndMetadata(world, pos.add(2, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(2, 0, 1), this.bark); + } + + return true; + } + + public boolean genRing4(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-2, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-2, 0, 0), this.bark); + + this.setBlockAndMetadata(world, pos.add(-1, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.heart); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -2), this.bark); + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.heart); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.bark); + } + + return true; + } + + public boolean genRing3s(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.bark); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.bark); + } + + return true; + } + + public boolean genRing3(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.bark); + + this.setBlockAndMetadata(world, pos, this.heart); + + this.setBlockAndMetadata(world, pos.add(0, 0, 1), this.bark); + + this.setBlockAndMetadata(world, pos.add(1, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, 0), this.bark); + this.setBlockAndMetadata(world, pos.add(1, 0, 1), this.bark); + } + + return true; + } + + public boolean genRing2(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos.add(-1, 0, -1), this.bark); + this.setBlockAndMetadata(world, pos.add(-1, 0, 0), this.bark); + + this.setBlockAndMetadata(world, pos.add(0, 0, -1), this.bark); + + this.setBlockAndMetadata(world, pos, this.bark); + } + + return true; + } + + public boolean genRing1(World world, Random random, BlockPos pos) + { + if (world.getBlockState(pos).getBlock() != Blocks.BEDROCK && pos.getY() > 0) + { + this.setBlockAndMetadata(world, pos, this.bark); + } + + return true; + } + + //TODO: CHANGE EVERYTHING ABOVE. + + static class FoliageCoordinates extends BlockPos + { + private final int branchBase; + + public FoliageCoordinates(BlockPos pos, int branchBase) + { + super(pos.getX(), pos.getY(), pos.getZ()); + this.branchBase = branchBase; + } + + public int getBranchBase() + { + return this.branchBase; + } + } +} diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/SakuraTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/SakuraTreeGenerator.java index 9259fb8d..5220738c 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/SakuraTreeGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/SakuraTreeGenerator.java @@ -15,6 +15,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; +import net.minecraft.world.WorldType; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; @@ -53,9 +54,12 @@ public class SakuraTreeGenerator extends BaseTreeGenerator public final boolean findGround; - public SakuraTreeGenerator(IBlockState log, IBlockState leaves, boolean findGround) + public final boolean isSapling; + + public SakuraTreeGenerator(IBlockState log, IBlockState leaves, boolean findGround, boolean isSapling) { this.findGround = findGround; + this.isSapling = isSapling; this.log = log; this.leaves = leaves; } @@ -369,24 +373,48 @@ protected void setBlockAndMetadata(World world, BlockPos pos, IBlockState stateN BlockPos findGround(World world, BlockPos pos) { - boolean foundGround = false; + if (world.getWorldType() == WorldType.FLAT && this.isSapling) + { + boolean foundGround = false; + + int height = Config.flatSeaLevel + 64; + + do + { + height--; + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + Block underBlock = world.getBlockState(position).getBlock(); - int height = Config.seaLevel + 64; + if (underBlock == Blocks.DIRT || underBlock == Blocks.GRASS || height < Config.flatSeaLevel) + { + foundGround = true; + } + } + while (!foundGround); - do + return new BlockPos(pos.getX(), height + 1, pos.getZ()); + } + else { - height--; - BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); - Block underBlock = world.getBlockState(position).getBlock(); + boolean foundGround = false; - if (underBlock == Blocks.DIRT || underBlock == Blocks.GRASS || height < Config.seaLevel) + int height = Config.seaLevel + 64; + + do { - foundGround = true; + height--; + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + Block underBlock = world.getBlockState(position).getBlock(); + + if (underBlock == Blocks.DIRT || underBlock == Blocks.GRASS || height < Config.seaLevel) + { + foundGround = true; + } } - } - while (!foundGround); + while (!foundGround); - return new BlockPos(pos.getX(), height + 1, pos.getZ()); + return new BlockPos(pos.getX(), height + 1, pos.getZ()); + } } public boolean isReplaceable(World world, BlockPos pos) @@ -407,7 +435,7 @@ public void generateTree(Random random, World worldIn, BlockPos position) if (this.findGround) { - this.basePos = findGround(worldIn, position); + this.basePos = this.findGround(worldIn, position); } else { diff --git a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/WillowTreeGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/WillowTreeGenerator.java index 0e1d608a..acd381e9 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/WillowTreeGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/trees/overworld/WillowTreeGenerator.java @@ -12,6 +12,7 @@ import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import net.minecraft.world.WorldType; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; @@ -27,18 +28,21 @@ public class WillowTreeGenerator extends BaseTreeGenerator public final boolean seekHeight; - public WillowTreeGenerator(int treeHeight, int treeRange, IBlockState log, IBlockState leaves, boolean seekHeight) + public final boolean isSapling; + + public WillowTreeGenerator(int treeHeight, int treeRange, IBlockState log, IBlockState leaves, boolean seekHeight, boolean isSapling) { this.minTreeHeight = treeHeight; this.treeHeightRange = treeRange; this.log = log; this.leaves = leaves; this.seekHeight = seekHeight; + this.isSapling = isSapling; } public WillowTreeGenerator(int treeHeight, int treeRange, IBlockState log, IBlockState leaves) { - this(treeHeight, treeRange, log, leaves, true); + this(treeHeight, treeRange, log, leaves, true, false); } @Override @@ -218,23 +222,46 @@ BlockPos findGround(World world, BlockPos pos) int height = pos.getY(); - do + if (world.getWorldType() == WorldType.FLAT && this.isSapling) { - BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); + do + { + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); - Block block = world.getBlockState(position).getBlock(); + Block block = world.getBlockState(position).getBlock(); - if ((block == Blocks.DIRT || block == Blocks.GRASS || block == Blocks.SAND) && !world.getBlockState(position.up()).isFullBlock()) - { - returnHeight = height + 1; - break; + if ((block == Blocks.DIRT || block == Blocks.GRASS || block == Blocks.SAND) && !world.getBlockState(position.up()).isFullBlock()) + { + returnHeight = height + 1; + break; + } + + height--; } + while (height > Config.flatSeaLevel); - height--; + return new BlockPos(pos.getX(), returnHeight, pos.getZ()); } - while (height > Config.seaLevel); + else + { + do + { + BlockPos position = new BlockPos(pos.getX(), height, pos.getZ()); - return new BlockPos(pos.getX(), returnHeight, pos.getZ()); + Block block = world.getBlockState(position).getBlock(); + + if ((block == Blocks.DIRT || block == Blocks.GRASS || block == Blocks.SAND) && !world.getBlockState(position.up()).isFullBlock()) + { + returnHeight = height + 1; + break; + } + + height--; + } + while (height > Config.seaLevel); + + return new BlockPos(pos.getX(), returnHeight, pos.getZ()); + } } private void addDownLeaves(World worldIn, BlockPos pos) diff --git a/src/main/java/com/progwml6/natura/world/worldgen/vine/ThornvinesGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/vine/ThornvinesGenerator.java new file mode 100644 index 00000000..219e7d10 --- /dev/null +++ b/src/main/java/com/progwml6/natura/world/worldgen/vine/ThornvinesGenerator.java @@ -0,0 +1,55 @@ +package com.progwml6.natura.world.worldgen.vine; + +import java.util.Random; + +import com.progwml6.natura.nether.NaturaNether; + +import net.minecraft.block.BlockVine; +import net.minecraft.block.properties.PropertyBool; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraftforge.fml.common.IWorldGenerator; + +public class ThornvinesGenerator implements IWorldGenerator +{ + public final IBlockState vine; + + public ThornvinesGenerator(IBlockState vine) + { + this.vine = vine; + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) + { + + } + + public void generateVines(Random random, World world, BlockPos pos, IBlockState vine) + { + if (world.getBlockState(pos).getBlock() == Blocks.AIR) + { + world.setBlockState(pos, vine, 2); + } + } + + public IBlockState getRandomizedVine(Random random) + { + IBlockState state = NaturaNether.netherThornVines.getDefaultState(); + PropertyBool[] sides = new PropertyBool[] { BlockVine.NORTH, BlockVine.EAST, BlockVine.SOUTH, BlockVine.WEST }; + for (PropertyBool side : sides) + { + state = state.withProperty(side, false); + } + for (int i = random.nextInt(3) + 1; i > 0; i--) + { + state = state.withProperty(sides[random.nextInt(sides.length)], true); + } + + return state; + } +} diff --git a/src/main/resources/assets/natura/blockstates/amaranth_button.json b/src/main/resources/assets/natura/blockstates/amaranth_button.json new file mode 100644 index 00000000..fea3fe66 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/amaranth_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/amaranth_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/amaranth_fence.json b/src/main/resources/assets/natura/blockstates/amaranth_fence.json new file mode 100644 index 00000000..219abcdd --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/amaranth_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/amaranth_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/amaranth_fence_gate.json b/src/main/resources/assets/natura/blockstates/amaranth_fence_gate.json new file mode 100644 index 00000000..bf048e75 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/amaranth_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/amaranth_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/amaranth_pressure_plate.json b/src/main/resources/assets/natura/blockstates/amaranth_pressure_plate.json new file mode 100644 index 00000000..560db2a4 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/amaranth_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/amaranth_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/amaranth_trap_door.json b/src/main/resources/assets/natura/blockstates/amaranth_trap_door.json new file mode 100644 index 00000000..1c3c4733 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/amaranth_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/overworld/amaranth_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/barley_crop.json b/src/main/resources/assets/natura/blockstates/barley_crop.json new file mode 100644 index 00000000..6554981c --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/barley_crop.json @@ -0,0 +1,31 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "crop" + }, + "variants": { + "age": { + "0": { + "textures": { + "crop": "natura:blocks/crops/barley/barley_stage_0" + } + }, + "1": { + "textures": { + "crop": "natura:blocks/crops/barley/barley_stage_1" + } + }, + "2": { + "textures": { + "crop": "natura:blocks/crops/barley/barley_stage_2" + } + }, + "3": { + "textures": { + "crop": "natura:blocks/crops/barley/barley_stage_3" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/blaze_rail.json b/src/main/resources/assets/natura/blockstates/blaze_rail.json new file mode 100644 index 00000000..54438753 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/blaze_rail.json @@ -0,0 +1,18 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block" + }, + "variants": { + "shape=north_south": { "model": "rail_flat", "textures": { "rail": "natura:blocks/rail/blaze_rail_normal" } }, + "shape=east_west": { "model": "rail_flat", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_normal" } }, + "shape=ascending_east": { "model": "rail_raised_ne", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_normal" } }, + "shape=ascending_west": { "model": "rail_raised_sw", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_normal" } }, + "shape=ascending_north": { "model": "rail_raised_ne", "textures": { "rail": "natura:blocks/rail/blaze_rail_normal" } }, + "shape=ascending_south": { "model": "rail_raised_sw", "textures": { "rail": "natura:blocks/rail/blaze_rail_normal" } }, + "shape=south_east": { "model": "rail_curved", "textures": { "rail": "natura:blocks/rail/blaze_rail_normal_turned" } }, + "shape=south_west": { "model": "rail_curved", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_normal_turned" } }, + "shape=north_west": { "model": "rail_curved", "y": 180, "textures": { "rail": "natura:blocks/rail/blaze_rail_normal_turned" } }, + "shape=north_east": { "model": "rail_curved", "y": 270, "textures": { "rail": "natura:blocks/rail/blaze_rail_normal_turned" } } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/blaze_rail_activator.json b/src/main/resources/assets/natura/blockstates/blaze_rail_activator.json new file mode 100644 index 00000000..8857c8e6 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/blaze_rail_activator.json @@ -0,0 +1,20 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block" + }, + "variants": { + "powered=false,shape=north_south": { "model": "rail_flat", "textures": { "rail": "natura:blocks/rail/blaze_rail_activator" } }, + "powered=false,shape=east_west": { "model": "rail_flat", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_activator" } }, + "powered=false,shape=ascending_east": { "model": "rail_raised_ne", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_activator" } }, + "powered=false,shape=ascending_west": { "model": "rail_raised_sw", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_activator" } }, + "powered=false,shape=ascending_north": { "model": "rail_raised_ne", "textures": { "rail": "natura:blocks/rail/blaze_rail_activator" } }, + "powered=false,shape=ascending_south": { "model": "rail_raised_sw", "textures": { "rail": "natura:blocks/rail/blaze_rail_activator" } }, + "powered=true,shape=north_south": { "model": "rail_flat", "textures": { "rail": "natura:blocks/rail/blaze_rail_activator_powered" } }, + "powered=true,shape=east_west": { "model": "rail_flat", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_activator_powered" } }, + "powered=true,shape=ascending_east": { "model": "rail_raised_ne", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_activator_powered" } }, + "powered=true,shape=ascending_west": { "model": "rail_raised_sw", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_activator_powered" } }, + "powered=true,shape=ascending_north": { "model": "rail_raised_ne", "textures": { "rail": "natura:blocks/rail/blaze_rail_activator_powered" } }, + "powered=true,shape=ascending_south": { "model": "rail_raised_sw", "textures": { "rail": "natura:blocks/rail/blaze_rail_activator_powered" } } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/blaze_rail_detector.json b/src/main/resources/assets/natura/blockstates/blaze_rail_detector.json new file mode 100644 index 00000000..7ac3b264 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/blaze_rail_detector.json @@ -0,0 +1,20 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block" + }, + "variants": { + "powered=false,shape=north_south": { "model": "rail_flat", "textures": { "rail": "natura:blocks/rail/blaze_rail_detector" } }, + "powered=false,shape=east_west": { "model": "rail_flat", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_detector" } }, + "powered=false,shape=ascending_east": { "model": "rail_raised_ne", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_detector" } }, + "powered=false,shape=ascending_west": { "model": "rail_raised_sw", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_detector" } }, + "powered=false,shape=ascending_north": { "model": "rail_raised_ne", "textures": { "rail": "natura:blocks/rail/blaze_rail_detector" } }, + "powered=false,shape=ascending_south": { "model": "rail_raised_sw", "textures": { "rail": "natura:blocks/rail/blaze_rail_detector" } }, + "powered=true,shape=north_south": { "model": "rail_flat", "textures": { "rail": "natura:blocks/rail/blaze_rail_detector_powered" } }, + "powered=true,shape=east_west": { "model": "rail_flat", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_detector_powered" } }, + "powered=true,shape=ascending_east": { "model": "rail_raised_ne", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_detector_powered" } }, + "powered=true,shape=ascending_west": { "model": "rail_raised_sw", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_detector_powered" } }, + "powered=true,shape=ascending_north": { "model": "rail_raised_ne", "textures": { "rail": "natura:blocks/rail/blaze_rail_detector_powered" } }, + "powered=true,shape=ascending_south": { "model": "rail_raised_sw", "textures": { "rail": "natura:blocks/rail/blaze_rail_detector_powered" } } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/blaze_rail_golden.json b/src/main/resources/assets/natura/blockstates/blaze_rail_golden.json new file mode 100644 index 00000000..a3e2069e --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/blaze_rail_golden.json @@ -0,0 +1,20 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block" + }, + "variants": { + "powered=false,shape=north_south": { "model": "rail_flat", "textures": { "rail": "natura:blocks/rail/blaze_rail_golden" } }, + "powered=false,shape=east_west": { "model": "rail_flat", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_golden" } }, + "powered=false,shape=ascending_east": { "model": "rail_raised_ne", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_golden" } }, + "powered=false,shape=ascending_west": { "model": "rail_raised_sw", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_golden" } }, + "powered=false,shape=ascending_north": { "model": "rail_raised_ne", "textures": { "rail": "natura:blocks/rail/blaze_rail_golden" } }, + "powered=false,shape=ascending_south": { "model": "rail_raised_sw", "textures": { "rail": "natura:blocks/rail/blaze_rail_golden" } }, + "powered=true,shape=north_south": { "model": "rail_flat", "textures": { "rail": "natura:blocks/rail/blaze_rail_golden_powered" } }, + "powered=true,shape=east_west": { "model": "rail_flat", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_golden_powered" } }, + "powered=true,shape=ascending_east": { "model": "rail_raised_ne", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_golden_powered" } }, + "powered=true,shape=ascending_west": { "model": "rail_raised_sw", "y": 90, "textures": { "rail": "natura:blocks/rail/blaze_rail_golden_powered" } }, + "powered=true,shape=ascending_north": { "model": "rail_raised_ne", "textures": { "rail": "natura:blocks/rail/blaze_rail_golden_powered" } }, + "powered=true,shape=ascending_south": { "model": "rail_raised_sw", "textures": { "rail": "natura:blocks/rail/blaze_rail_golden_powered" } } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/bloodwood_button.json b/src/main/resources/assets/natura/blockstates/bloodwood_button.json new file mode 100644 index 00000000..6d5f927b --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/bloodwood_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/bloodwood_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/bloodwood_fence.json b/src/main/resources/assets/natura/blockstates/bloodwood_fence.json new file mode 100644 index 00000000..cbb8bcb4 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/bloodwood_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/bloodwood_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/bloodwood_fence_gate.json b/src/main/resources/assets/natura/blockstates/bloodwood_fence_gate.json new file mode 100644 index 00000000..feeae0ea --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/bloodwood_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/bloodwood_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/bloodwood_pressure_plate.json b/src/main/resources/assets/natura/blockstates/bloodwood_pressure_plate.json new file mode 100644 index 00000000..a836d27d --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/bloodwood_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/bloodwood_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/bloodwood_trap_door.json b/src/main/resources/assets/natura/blockstates/bloodwood_trap_door.json new file mode 100644 index 00000000..a42a0f7b --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/bloodwood_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/nether/bloodwood_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/bluebells_flower.json b/src/main/resources/assets/natura/blockstates/bluebells_flower.json new file mode 100644 index 00000000..7fd5b318 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/bluebells_flower.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block" + }, + "variants": { + "normal": { + "model": "cross", + "textures": { + "cross": "natura:blocks/flower/bluebells_flowers" + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/cotton_crop.json b/src/main/resources/assets/natura/blockstates/cotton_crop.json new file mode 100644 index 00000000..4f39dcef --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/cotton_crop.json @@ -0,0 +1,36 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "crop" + }, + "variants": { + "age": { + "0": { + "textures": { + "crop": "natura:blocks/crops/cotton/cotton_stage_0" + } + }, + "1": { + "textures": { + "crop": "natura:blocks/crops/cotton/cotton_stage_1" + } + }, + "2": { + "textures": { + "crop": "natura:blocks/crops/cotton/cotton_stage_2" + } + }, + "3": { + "textures": { + "crop": "natura:blocks/crops/cotton/cotton_stage_3" + } + }, + "4": { + "textures": { + "crop": "natura:blocks/crops/cotton/cotton_stage_4" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/darkwood_button.json b/src/main/resources/assets/natura/blockstates/darkwood_button.json new file mode 100644 index 00000000..d9009957 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/darkwood_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/darkwood_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/darkwood_fence.json b/src/main/resources/assets/natura/blockstates/darkwood_fence.json new file mode 100644 index 00000000..c1e9fa4b --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/darkwood_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/darkwood_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/darkwood_fence_gate.json b/src/main/resources/assets/natura/blockstates/darkwood_fence_gate.json new file mode 100644 index 00000000..753db5db --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/darkwood_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/darkwood_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/darkwood_pressure_plate.json b/src/main/resources/assets/natura/blockstates/darkwood_pressure_plate.json new file mode 100644 index 00000000..99d654f3 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/darkwood_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/darkwood_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/darkwood_trap_door.json b/src/main/resources/assets/natura/blockstates/darkwood_trap_door.json new file mode 100644 index 00000000..f50cdaf6 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/darkwood_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/nether/darkwood_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/edibles.json b/src/main/resources/assets/natura/blockstates/edibles.json index a9ce6dc4..5d3cb3bc 100644 --- a/src/main/resources/assets/natura/blockstates/edibles.json +++ b/src/main/resources/assets/natura/blockstates/edibles.json @@ -14,6 +14,8 @@ "blightberry": [{ "textures": { "layer0": "natura:items/food/blightberry" }}], "duskberry": [{ "textures": { "layer0": "natura:items/food/duskberry" }}], "skyberry": [{ "textures": { "layer0": "natura:items/food/skyberry" }}], - "stingberry": [{ "textures": { "layer0": "natura:items/food/stingberry" }}] + "stingberry": [{ "textures": { "layer0": "natura:items/food/stingberry" }}], + "potashapple": [{ "textures": { "layer0": "natura:items/food/potashapple" }}], + "cactusjuice": [{ "textures": { "layer0": "natura:items/food/cactusjuice" }}] } } diff --git a/src/main/resources/assets/natura/blockstates/eucalyptus_button.json b/src/main/resources/assets/natura/blockstates/eucalyptus_button.json new file mode 100644 index 00000000..47f1294a --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/eucalyptus_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/eucalyptus_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/eucalyptus_fence.json b/src/main/resources/assets/natura/blockstates/eucalyptus_fence.json new file mode 100644 index 00000000..2aa60d8a --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/eucalyptus_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/eucalyptus_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/eucalyptus_fence_gate.json b/src/main/resources/assets/natura/blockstates/eucalyptus_fence_gate.json new file mode 100644 index 00000000..ce85550d --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/eucalyptus_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/eucalyptus_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/eucalyptus_pressure_plate.json b/src/main/resources/assets/natura/blockstates/eucalyptus_pressure_plate.json new file mode 100644 index 00000000..3d93a113 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/eucalyptus_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/eucalyptus_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/eucalyptus_trap_door.json b/src/main/resources/assets/natura/blockstates/eucalyptus_trap_door.json new file mode 100644 index 00000000..42ffba69 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/eucalyptus_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/overworld/eucalyptus_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/fusewood_button.json b/src/main/resources/assets/natura/blockstates/fusewood_button.json new file mode 100644 index 00000000..6297717b --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/fusewood_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/fusewood_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/fusewood_fence.json b/src/main/resources/assets/natura/blockstates/fusewood_fence.json new file mode 100644 index 00000000..084c056e --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/fusewood_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/fusewood_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/fusewood_fence_gate.json b/src/main/resources/assets/natura/blockstates/fusewood_fence_gate.json new file mode 100644 index 00000000..792abfce --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/fusewood_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/fusewood_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/fusewood_pressure_plate.json b/src/main/resources/assets/natura/blockstates/fusewood_pressure_plate.json new file mode 100644 index 00000000..3a9b85db --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/fusewood_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/fusewood_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/fusewood_trap_door.json b/src/main/resources/assets/natura/blockstates/fusewood_trap_door.json new file mode 100644 index 00000000..c21517a4 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/fusewood_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/nether/fusewood_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/ghostwood_button.json b/src/main/resources/assets/natura/blockstates/ghostwood_button.json new file mode 100644 index 00000000..c89eae14 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/ghostwood_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/ghostwood_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/ghostwood_fence.json b/src/main/resources/assets/natura/blockstates/ghostwood_fence.json new file mode 100644 index 00000000..bebfc0b7 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/ghostwood_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/ghostwood_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/ghostwood_fence_gate.json b/src/main/resources/assets/natura/blockstates/ghostwood_fence_gate.json new file mode 100644 index 00000000..8af46b8d --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/ghostwood_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/ghostwood_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/ghostwood_pressure_plate.json b/src/main/resources/assets/natura/blockstates/ghostwood_pressure_plate.json new file mode 100644 index 00000000..4f892621 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/ghostwood_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/nether/ghostwood_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/ghostwood_trap_door.json b/src/main/resources/assets/natura/blockstates/ghostwood_trap_door.json new file mode 100644 index 00000000..532f3934 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/ghostwood_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/nether/ghostwood_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/hopseed_button.json b/src/main/resources/assets/natura/blockstates/hopseed_button.json new file mode 100644 index 00000000..c183b3c0 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/hopseed_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/hopseed_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/hopseed_fence.json b/src/main/resources/assets/natura/blockstates/hopseed_fence.json new file mode 100644 index 00000000..ab31ceb0 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/hopseed_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/hopseed_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/hopseed_fence_gate.json b/src/main/resources/assets/natura/blockstates/hopseed_fence_gate.json new file mode 100644 index 00000000..0036340c --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/hopseed_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/hopseed_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/hopseed_pressure_plate.json b/src/main/resources/assets/natura/blockstates/hopseed_pressure_plate.json new file mode 100644 index 00000000..5bb84832 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/hopseed_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/hopseed_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/hopseed_trap_door.json b/src/main/resources/assets/natura/blockstates/hopseed_trap_door.json new file mode 100644 index 00000000..c2471c08 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/hopseed_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/overworld/hopseed_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/lit_netherrack_furnace.json b/src/main/resources/assets/natura/blockstates/lit_netherrack_furnace.json new file mode 100644 index 00000000..95ad30f8 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/lit_netherrack_furnace.json @@ -0,0 +1,31 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "orientable", + "textures": { + "top": "natura:blocks/furnace/netherrack_furnace_top", + "front": "natura:blocks/furnace/netherrack_furnace_on", + "side": "natura:blocks/furnace/netherrack_furnace_side" + } + }, + "variants": { + "facing": { + "north": { + "model": "orientable" + }, + "east": { + "model": "orientable", + "y": 90 + }, + "south": { + "model": "orientable", + "y": 180 + }, + "west": { + "model": "orientable", + "y": 270 + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/maple_button.json b/src/main/resources/assets/natura/blockstates/maple_button.json new file mode 100644 index 00000000..c09369f0 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/maple_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/maple_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/maple_fence.json b/src/main/resources/assets/natura/blockstates/maple_fence.json new file mode 100644 index 00000000..87e88921 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/maple_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/maple_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/maple_fence_gate.json b/src/main/resources/assets/natura/blockstates/maple_fence_gate.json new file mode 100644 index 00000000..2d9d4b9d --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/maple_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/maple_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/maple_pressure_plate.json b/src/main/resources/assets/natura/blockstates/maple_pressure_plate.json new file mode 100644 index 00000000..09e5a066 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/maple_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/maple_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/maple_trap_door.json b/src/main/resources/assets/natura/blockstates/maple_trap_door.json new file mode 100644 index 00000000..50589673 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/maple_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/overworld/maple_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/nether_blue_large_glowshroom.json b/src/main/resources/assets/natura/blockstates/nether_blue_large_glowshroom.json new file mode 100644 index 00000000..93bbb57c --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_blue_large_glowshroom.json @@ -0,0 +1,143 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block" + }, + "variants": { + "variant": { + "north_west": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "down": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "up": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "north": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "east": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "south": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "west": "natura:blocks/glowshroom/blue/blue_glowshroom_skin" + } + }, + "north": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "down": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "up": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "north": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "east": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "south": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "west": "natura:blocks/glowshroom/blue/blue_glowshroom_inside" + } + }, + "north_east": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "down": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "up": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "north": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "east": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "south": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "west": "natura:blocks/glowshroom/blue/blue_glowshroom_inside" + } + }, + "west": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "down": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "up": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "north": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "east": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "south": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "west": "natura:blocks/glowshroom/blue/blue_glowshroom_skin" + } + }, + "center": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "down": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "up": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "north": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "east": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "south": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "west": "natura:blocks/glowshroom/blue/blue_glowshroom_inside" + } + }, + "east": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "down": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "up": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "north": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "east": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "south": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "west": "natura:blocks/glowshroom/blue/blue_glowshroom_inside" + } + }, + "south_west": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "down": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "up": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "north": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "east": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "south": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "west": "natura:blocks/glowshroom/blue/blue_glowshroom_skin" + } + }, + "south": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "down": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "up": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "north": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "east": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "south": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "west": "natura:blocks/glowshroom/blue/blue_glowshroom_inside" + } + }, + "south_east": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "down": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "up": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "north": "natura:blocks/glowshroom/blue/blue_glowshroom_inside", + "east": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "south": "natura:blocks/glowshroom/blue/blue_glowshroom_skin", + "west": "natura:blocks/glowshroom/blue/blue_glowshroom_inside" + } + }, + "stem": { + "model": "cube_column", + "textures": { + "side": "natura:blocks/glowshroom/blue/blue_glowshroom_stem", + "end": "natura:blocks/glowshroom/blue/blue_glowshroom_inside" + } + }, + "all_stem": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/glowshroom/blue/blue_glowshroom_stem" + } + }, + "all_outside": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/glowshroom/blue/blue_glowshroom_skin" + } + }, + "all_inside": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/glowshroom/blue/blue_glowshroom_inside" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_bookshelves.json b/src/main/resources/assets/natura/blockstates/nether_bookshelves.json new file mode 100644 index 00000000..5e8390ef --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_bookshelves.json @@ -0,0 +1,40 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "cube_column", + "textures": { + "end": "natura:blocks/planks/nether/ghostwood_planks", + "side": "natura:blocks/bookshelves/overworld/ghostwood_bookshelf", + "particle": "#side" + } + }, + "variants": { + "type": { + "ghostwood": { + "textures": { + "end": "natura:blocks/planks/nether/ghostwood_planks", + "side": "natura:blocks/bookshelves/nether/ghostwood_bookshelf" + } + }, + "bloodwood": { + "textures": { + "end": "natura:blocks/planks/nether/bloodwood_planks", + "side": "natura:blocks/bookshelves/nether/bloodwood_bookshelf" + } + }, + "darkwood": { + "textures": { + "end": "natura:blocks/planks/nether/darkwood_planks", + "side": "natura:blocks/bookshelves/nether/darkwood_bookshelf" + } + }, + "fusewood": { + "textures": { + "end": "natura:blocks/planks/nether/fusewood_planks", + "side": "natura:blocks/bookshelves/nether/fusewood_bookshelf" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_button.json b/src/main/resources/assets/natura/blockstates/nether_button.json new file mode 100644 index 00000000..55356a71 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "blocks/netherrack" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_door_bloodwood.json b/src/main/resources/assets/natura/blockstates/nether_door_bloodwood.json new file mode 100644 index 00000000..02d14b26 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_door_bloodwood.json @@ -0,0 +1,46 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "door_bottom_rh": "natura:blocks/doors/bloodwood/bloodwood_door_bottom", + "door_bottom": "natura:blocks/doors/bloodwood/bloodwood_door_bottom", + "door_top_rh": "natura:blocks/doors/bloodwood/bloodwood_door_top", + "door_top": "natura:blocks/doors/bloodwood/bloodwood_door_top" + } + }, + "variants": { + "facing=east,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom" }, + "facing=south,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=west,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=north,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=east,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh" }, + "facing=south,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=west,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=north,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=east,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=south,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=west,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=north,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh" }, + "facing=east,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=south,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom" }, + "facing=west,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=north,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=east,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top" }, + "facing=south,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 90 }, + "facing=west,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 180 }, + "facing=north,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 270 }, + "facing=east,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh" }, + "facing=south,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=west,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=north,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=east,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=south,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=west,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=north,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh" }, + "facing=east,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 270 }, + "facing=south,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top" }, + "facing=west,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 90 }, + "facing=north,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 180 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_door_ghostwood.json b/src/main/resources/assets/natura/blockstates/nether_door_ghostwood.json new file mode 100644 index 00000000..f8fb6455 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_door_ghostwood.json @@ -0,0 +1,46 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "door_bottom_rh": "natura:blocks/doors/ghostwood/ghostwood_door_bottom", + "door_bottom": "natura:blocks/doors/ghostwood/ghostwood_door_bottom", + "door_top_rh": "natura:blocks/doors/ghostwood/ghostwood_door_top", + "door_top": "natura:blocks/doors/ghostwood/ghostwood_door_top" + } + }, + "variants": { + "facing=east,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom" }, + "facing=south,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=west,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=north,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=east,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh" }, + "facing=south,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=west,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=north,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=east,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=south,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=west,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=north,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh" }, + "facing=east,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=south,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom" }, + "facing=west,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=north,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=east,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top" }, + "facing=south,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 90 }, + "facing=west,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 180 }, + "facing=north,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 270 }, + "facing=east,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh" }, + "facing=south,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=west,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=north,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=east,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=south,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=west,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=north,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh" }, + "facing=east,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 270 }, + "facing=south,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top" }, + "facing=west,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 90 }, + "facing=north,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 180 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_doors.json b/src/main/resources/assets/natura/blockstates/nether_doors.json new file mode 100644 index 00000000..159ac21f --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_doors.json @@ -0,0 +1,11 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-item", + "model": "forge:item-layer" + }, + "variants": { + "ghostwood_door": [{ "textures": { "layer0": "natura:items/doors/ghostwood_door" }}], + "bloodwood_door": [{ "textures": { "layer0": "natura:items/doors/bloodwood_door" }}] + } +} diff --git a/src/main/resources/assets/natura/blockstates/nether_glowshroom.json b/src/main/resources/assets/natura/blockstates/nether_glowshroom.json new file mode 100644 index 00000000..003804e9 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_glowshroom.json @@ -0,0 +1,26 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "cross" + }, + "variants": { + "type": { + "green": { + "textures": { + "cross": "natura:blocks/glowshroom/green/green_glowshroom" + } + }, + "blue": { + "textures": { + "cross": "natura:blocks/glowshroom/blue/blue_glowshroom" + } + }, + "purple": { + "textures": { + "cross": "natura:blocks/glowshroom/purple/purple_glowshroom" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_green_large_glowshroom.json b/src/main/resources/assets/natura/blockstates/nether_green_large_glowshroom.json new file mode 100644 index 00000000..d5dfccf1 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_green_large_glowshroom.json @@ -0,0 +1,143 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block" + }, + "variants": { + "variant": { + "north_west": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "down": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "up": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "north": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "east": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "south": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "west": "natura:blocks/glowshroom/green/green_glowshroom_skin" + } + }, + "north": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "down": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "up": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "north": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "east": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "south": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "west": "natura:blocks/glowshroom/green/green_glowshroom_inside" + } + }, + "north_east": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "down": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "up": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "north": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "east": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "south": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "west": "natura:blocks/glowshroom/green/green_glowshroom_inside" + } + }, + "west": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "down": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "up": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "north": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "east": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "south": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "west": "natura:blocks/glowshroom/green/green_glowshroom_skin" + } + }, + "center": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "down": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "up": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "north": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "east": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "south": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "west": "natura:blocks/glowshroom/green/green_glowshroom_inside" + } + }, + "east": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "down": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "up": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "north": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "east": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "south": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "west": "natura:blocks/glowshroom/green/green_glowshroom_inside" + } + }, + "south_west": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "down": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "up": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "north": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "east": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "south": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "west": "natura:blocks/glowshroom/green/green_glowshroom_skin" + } + }, + "south": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "down": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "up": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "north": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "east": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "south": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "west": "natura:blocks/glowshroom/green/green_glowshroom_inside" + } + }, + "south_east": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "down": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "up": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "north": "natura:blocks/glowshroom/green/green_glowshroom_inside", + "east": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "south": "natura:blocks/glowshroom/green/green_glowshroom_skin", + "west": "natura:blocks/glowshroom/green/green_glowshroom_inside" + } + }, + "stem": { + "model": "cube_column", + "textures": { + "side": "natura:blocks/glowshroom/green/green_glowshroom_stem", + "end": "natura:blocks/glowshroom/green/green_glowshroom_inside" + } + }, + "all_stem": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/glowshroom/green/green_glowshroom_stem" + } + }, + "all_outside": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/glowshroom/green/green_glowshroom_skin" + } + }, + "all_inside": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/glowshroom/green/green_glowshroom_inside" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_lever.json b/src/main/resources/assets/natura/blockstates/nether_lever.json new file mode 100644 index 00000000..9898f4a8 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_lever.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "particle": "blocks/netherrack", + "base": "blocks/netherrack", + "lever": "natura:blocks/lever/nether_lever" + } + }, + "variants": { + "facing=down_z,powered=false": { "model": "lever_off", "x": 180, "y": 180 }, + "facing=down_x,powered=false": { "model": "lever_off", "x": 180, "y": 90 }, + "facing=up_z,powered=false": { "model": "lever_off" }, + "facing=up_x,powered=false": { "model": "lever_off", "y": 270 }, + "facing=east,powered=false": { "model": "lever_off", "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "lever_off", "x": 90, "y": 270 }, + "facing=south,powered=false" : { "model": "lever_off", "x": 90, "y": 180 }, + "facing=north,powered=false" : { "model": "lever_off", "x": 90 }, + "facing=down_z,powered=true" : { "model": "lever", "x": 180, "y": 180 }, + "facing=down_x,powered=true" : { "model": "lever", "x": 180, "y": 90 }, + "facing=up_z,powered=true": { "model": "lever" }, + "facing=up_x,powered=true": { "model": "lever", "y": 270 }, + "facing=east,powered=true": { "model": "lever", "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "lever", "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "lever", "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "lever", "x": 90 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_logs.json b/src/main/resources/assets/natura/blockstates/nether_logs.json index b0e85904..ec030d73 100644 --- a/src/main/resources/assets/natura/blockstates/nether_logs.json +++ b/src/main/resources/assets/natura/blockstates/nether_logs.json @@ -1,12 +1,7 @@ { "forge_marker": 1, "defaults": { - "transform": "forge:default-block", - "model": "cube_all", - "textures": { - "all": "natura:blocks/logs/nether/ghostwood_log", - "particle": "#all" - } + "transform": "forge:default-block" }, "variants": { "type": { diff --git a/src/main/resources/assets/natura/blockstates/nether_logs2.json b/src/main/resources/assets/natura/blockstates/nether_logs2.json new file mode 100644 index 00000000..3f30b6ea --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_logs2.json @@ -0,0 +1,177 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "particle": "#bark", + "bark": "natura:blocks/logs/nether/bloodwood_bark", + "heart_small": "natura:blocks/logs/nether/bloodwood_heart_small", + "upper_left": "natura:blocks/logs/nether/bloodwood_upper_left", + "upper_right": "natura:blocks/logs/nether/bloodwood_upper_right", + "side_left": "natura:blocks/logs/nether/bloodwood_side_left", + "side_right": "natura:blocks/logs/nether/bloodwood_side_right", + "lower_left": "natura:blocks/logs/nether/bloodwood_lower_left", + "lower_right": "natura:blocks/logs/nether/bloodwood_lower_right" + } + }, + "variants": { + "meta": { + "0": { + "model": "cube", + "textures": { + "down": "#upper_left", + "up": "#upper_left", + "north": "#bark", + "south": "#side_left", + "west": "#bark", + "east": "#side_right" + } + }, + "1": { + "model": "cube", + "textures": { + "down": "#upper_right", + "up": "#upper_right", + "north": "#bark", + "south": "#side_right", + "west": "#side_left", + "east": "#bark" + } + }, + "2": { + "model": "cube", + "textures": { + "down": "#lower_left", + "up": "#lower_left", + "north": "#side_right", + "south": "#bark", + "west": "#bark", + "east": "#side_left" + } + }, + "3": { + "model": "cube", + "textures": { + "down": "#lower_right", + "up": "#lower_right", + "north": "#side_left", + "south": "#bark", + "west": "#side_right", + "east": "#bark" + } + }, + "4": { + "model": "cube", + "textures": { + "down": "#side_left", + "up": "#bark", + "north": "#side_right", + "south": "#bark", + "west": "#upper_right", + "east": "#upper_left" + } + }, + "5": { + "model": "cube", + "textures": { + "down": "#side_right", + "up": "#bark", + "north": "#bark", + "south": "#side_left", + "west": "#upper_left", + "east": "#upper_right" + } + }, + "6": { + "model": "cube", + "textures": { + "down": "#bark", + "up": "#side_right", + "north": "#side_left", + "south": "#bark", + "west": "#lower_right", + "east": "#lower_left" + } + }, + "7": { + "model": "cube", + "textures": { + "down": "#bark", + "up": "#side_left", + "north": "#bark", + "south": "#side_right", + "west": "#lower_left", + "east": "#lower_right" + } + }, + "8": { + "model": "cube", + "textures": { + "down": "#side_left", + "up": "#bark", + "north": "#upper_right", + "south": "#upper_left", + "west": "#bark", + "east": "#side_right" + } + }, + "9": { + "model": "cube", + "textures": { + "down": "#side_right", + "up": "#bark", + "north": "#upper_left", + "south": "#upper_right", + "west": "#side_left", + "east": "#bark" + } + }, + "10": { + "model": "cube", + "textures": { + "down": "#bark", + "up": "#side_left", + "north": "#lower_right", + "south": "#lower_left", + "west": "#bark", + "east": "#side_left" + } + }, + "11": { + "model": "cube", + "textures": { + "down": "#bark", + "up": "#side_right", + "north": "#lower_left", + "south": "#lower_right", + "west": "#side_right", + "east": "#bark" + } + }, + "12": { + "model": "cube_all", + "textures": { + "all": "#bark" + } + }, + "13": { + "model": "cube_all", + "textures": { + "all": "#bark" + } + }, + "14": { + "model": "cube_all", + "textures": { + "all": "#bark" + } + }, + "15": { + "model": "cube_all", + "textures": { + "all": "#bark" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_pressure_plate.json b/src/main/resources/assets/natura/blockstates/nether_pressure_plate.json new file mode 100644 index 00000000..5268db70 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "blocks/netherrack" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_purple_large_glowshroom.json b/src/main/resources/assets/natura/blockstates/nether_purple_large_glowshroom.json new file mode 100644 index 00000000..89c74b6d --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_purple_large_glowshroom.json @@ -0,0 +1,143 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block" + }, + "variants": { + "variant": { + "north_west": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "down": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "up": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "north": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "east": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "south": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "west": "natura:blocks/glowshroom/purple/purple_glowshroom_skin" + } + }, + "north": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "down": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "up": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "north": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "east": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "south": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "west": "natura:blocks/glowshroom/purple/purple_glowshroom_inside" + } + }, + "north_east": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "down": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "up": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "north": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "east": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "south": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "west": "natura:blocks/glowshroom/purple/purple_glowshroom_inside" + } + }, + "west": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "down": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "up": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "north": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "east": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "south": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "west": "natura:blocks/glowshroom/purple/purple_glowshroom_skin" + } + }, + "center": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "down": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "up": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "north": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "east": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "south": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "west": "natura:blocks/glowshroom/purple/purple_glowshroom_inside" + } + }, + "east": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "down": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "up": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "north": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "east": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "south": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "west": "natura:blocks/glowshroom/purple/purple_glowshroom_inside" + } + }, + "south_west": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "down": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "up": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "north": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "east": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "south": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "west": "natura:blocks/glowshroom/purple/purple_glowshroom_skin" + } + }, + "south": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "down": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "up": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "north": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "east": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "south": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "west": "natura:blocks/glowshroom/purple/purple_glowshroom_inside" + } + }, + "south_east": { + "model": "cube", + "textures": { + "particle": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "down": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "up": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "north": "natura:blocks/glowshroom/purple/purple_glowshroom_inside", + "east": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "south": "natura:blocks/glowshroom/purple/purple_glowshroom_skin", + "west": "natura:blocks/glowshroom/purple/purple_glowshroom_inside" + } + }, + "stem": { + "model": "cube_column", + "textures": { + "side": "natura:blocks/glowshroom/purple/purple_glowshroom_stem", + "end": "natura:blocks/glowshroom/purple/purple_glowshroom_inside" + } + }, + "all_stem": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/glowshroom/purple/purple_glowshroom_stem" + } + }, + "all_outside": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/glowshroom/purple/purple_glowshroom_skin" + } + }, + "all_inside": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/glowshroom/purple/purple_glowshroom_inside" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_sapling.json b/src/main/resources/assets/natura/blockstates/nether_sapling.json index 2c482101..ad07a24a 100644 --- a/src/main/resources/assets/natura/blockstates/nether_sapling.json +++ b/src/main/resources/assets/natura/blockstates/nether_sapling.json @@ -11,11 +11,6 @@ "cross": "natura:blocks/saplings/nether/ghostwood_sapling" } }, - "bloodwood": { - "textures": { - "cross": "natura:blocks/saplings/nether/bloodwood_sapling" - } - }, "fusewood": { "textures": { "cross": "natura:blocks/saplings/nether/fusewood_sapling" diff --git a/src/main/resources/assets/natura/blockstates/nether_sapling2.json b/src/main/resources/assets/natura/blockstates/nether_sapling2.json new file mode 100644 index 00000000..dfc6f7a8 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_sapling2.json @@ -0,0 +1,16 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "cross" + }, + "variants": { + "foliage": { + "bloodwood": { + "textures": { + "cross": "natura:blocks/saplings/nether/bloodwood_sapling" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_thorn_vine.json b/src/main/resources/assets/natura/blockstates/nether_thorn_vine.json new file mode 100644 index 00000000..0e477894 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_thorn_vine.json @@ -0,0 +1,71 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "vine": "natura:blocks/vine/thornvine" + } + }, + "variants": { + "north": { + "true": { + "submodel": { + "northSide": { + "model": "natura:natura_vine_north", + "y": 0 + } + } + }, + "false": {} + }, + "east": { + "true": { + "submodel": { + "eastSide": { + "model": "natura:natura_vine_north", + "y": 90 + } + } + }, + "false": {} + }, + "south": { + "true": { + "submodel": { + "southSide": { + "model": "natura:natura_vine_north", + "y": 180 + } + } + }, + "false": {} + }, + "west": { + "true": { + "submodel": { + "westSide": { + "model": "natura:natura_vine_north", + "y": 270 + } + } + }, + "false": {} + }, + "up": { + "true": { + "submodel": { + "upSide": { + "model": "natura:natura_vine_up" + } + } + }, + "false": {} + }, + "east=false,north=false,south=false,up=false,west=false": { + "model": "leaves", + "textures": { + "all": "#vine" + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/nether_workbenches.json b/src/main/resources/assets/natura/blockstates/nether_workbenches.json new file mode 100644 index 00000000..88e446b4 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/nether_workbenches.json @@ -0,0 +1,52 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "cube", + "textures": { + "particle": "#front", + "down": "#bottom", + "up": "#top", + "north": "#front", + "east": "#side", + "south": "#side", + "west": "#front" + } + }, + "variants": { + "type": { + "ghostwood": { + "textures": { + "front": "natura:blocks/workbenches/nether/ghostwood_workbench_face", + "side": "natura:blocks/workbenches/nether/ghostwood_workbench_side", + "top": "natura:blocks/workbenches/nether/ghostwood_workbench_top", + "bottom": "natura:blocks/planks/nether/ghostwood_planks" + } + }, + "bloodwood": { + "textures": { + "front": "natura:blocks/workbenches/nether/bloodwood_workbench_face", + "side": "natura:blocks/workbenches/nether/bloodwood_workbench_side", + "top": "natura:blocks/workbenches/nether/bloodwood_workbench_top", + "bottom": "natura:blocks/planks/nether/bloodwood_planks" + } + }, + "darkwood": { + "textures": { + "front": "natura:blocks/workbenches/nether/darkwood_workbench_face", + "side": "natura:blocks/workbenches/nether/darkwood_workbench_side", + "top": "natura:blocks/workbenches/nether/darkwood_workbench_top", + "bottom": "natura:blocks/planks/nether/darkwood_planks" + } + }, + "fusewood": { + "textures": { + "front": "natura:blocks/workbenches/nether/fusewood_workbench_face", + "side": "natura:blocks/workbenches/nether/fusewood_workbench_side", + "top": "natura:blocks/workbenches/nether/fusewood_workbench_top", + "bottom": "natura:blocks/planks/nether/fusewood_planks" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/netherrack_furnace.json b/src/main/resources/assets/natura/blockstates/netherrack_furnace.json new file mode 100644 index 00000000..cca040ee --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/netherrack_furnace.json @@ -0,0 +1,31 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "orientable", + "textures": { + "top": "natura:blocks/furnace/netherrack_furnace_top", + "front": "natura:blocks/furnace/netherrack_furnace_off", + "side": "natura:blocks/furnace/netherrack_furnace_side" + } + }, + "variants": { + "facing": { + "north": { + "model": "orientable" + }, + "east": { + "model": "orientable", + "y": 90 + }, + "south": { + "model": "orientable", + "y": 180 + }, + "west": { + "model": "orientable", + "y": 270 + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/overworld_bookshelves.json b/src/main/resources/assets/natura/blockstates/overworld_bookshelves.json new file mode 100644 index 00000000..35d3a14b --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_bookshelves.json @@ -0,0 +1,70 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "cube_column", + "textures": { + "end": "natura:blocks/planks/overworld/maple_planks", + "side": "natura:blocks/bookshelves/overworld/maple_bookshelf", + "particle": "#side" + } + }, + "variants": { + "type": { + "maple": { + "textures": { + "end": "natura:blocks/planks/overworld/maple_planks", + "side": "natura:blocks/bookshelves/overworld/maple_bookshelf" + } + }, + "silverbell": { + "textures": { + "end": "natura:blocks/planks/overworld/silverbell_planks", + "side": "natura:blocks/bookshelves/overworld/silverbell_bookshelf" + } + }, + "amaranth": { + "textures": { + "end": "natura:blocks/planks/overworld/amaranth_planks", + "side": "natura:blocks/bookshelves/overworld/amaranth_bookshelf" + } + }, + "tiger": { + "textures": { + "end": "natura:blocks/planks/overworld/tiger_planks", + "side": "natura:blocks/bookshelves/overworld/tiger_bookshelf" + } + }, + "willow": { + "textures": { + "end": "natura:blocks/planks/overworld/willow_planks", + "side": "natura:blocks/bookshelves/overworld/willow_bookshelf" + } + }, + "eucalyptus": { + "textures": { + "end": "natura:blocks/planks/overworld/eucalyptus_planks", + "side": "natura:blocks/bookshelves/overworld/eucalyptus_bookshelf" + } + }, + "hopseed": { + "textures": { + "end": "natura:blocks/planks/overworld/hopseed_planks", + "side": "natura:blocks/bookshelves/overworld/hopseed_bookshelf" + } + }, + "sakura": { + "textures": { + "end": "natura:blocks/planks/overworld/sakura_planks", + "side": "natura:blocks/bookshelves/overworld/sakura_bookshelf" + } + }, + "redwood": { + "textures": { + "end": "natura:blocks/planks/overworld/redwood_planks", + "side": "natura:blocks/bookshelves/overworld/redwood_bookshelf" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/overworld_door_eucalyptus.json b/src/main/resources/assets/natura/blockstates/overworld_door_eucalyptus.json new file mode 100644 index 00000000..b91349ae --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_door_eucalyptus.json @@ -0,0 +1,46 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "door_bottom_rh": "natura:blocks/doors/eucalyptus/eucalyptus_door_bottom", + "door_bottom": "natura:blocks/doors/eucalyptus/eucalyptus_door_bottom", + "door_top_rh": "natura:blocks/doors/eucalyptus/eucalyptus_door_top", + "door_top": "natura:blocks/doors/eucalyptus/eucalyptus_door_top" + } + }, + "variants": { + "facing=east,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom" }, + "facing=south,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=west,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=north,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=east,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh" }, + "facing=south,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=west,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=north,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=east,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=south,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=west,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=north,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh" }, + "facing=east,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=south,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom" }, + "facing=west,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=north,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=east,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top" }, + "facing=south,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 90 }, + "facing=west,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 180 }, + "facing=north,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 270 }, + "facing=east,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh" }, + "facing=south,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=west,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=north,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=east,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=south,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=west,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=north,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh" }, + "facing=east,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 270 }, + "facing=south,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top" }, + "facing=west,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 90 }, + "facing=north,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 180 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/overworld_door_hopseed.json b/src/main/resources/assets/natura/blockstates/overworld_door_hopseed.json new file mode 100644 index 00000000..322a96b4 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_door_hopseed.json @@ -0,0 +1,46 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "door_bottom_rh": "natura:blocks/doors/hopseed/hopseed_door_bottom", + "door_bottom": "natura:blocks/doors/hopseed/hopseed_door_bottom", + "door_top_rh": "natura:blocks/doors/hopseed/hopseed_door_top", + "door_top": "natura:blocks/doors/hopseed/hopseed_door_top" + } + }, + "variants": { + "facing=east,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom" }, + "facing=south,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=west,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=north,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=east,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh" }, + "facing=south,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=west,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=north,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=east,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=south,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=west,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=north,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh" }, + "facing=east,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=south,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom" }, + "facing=west,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=north,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=east,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top" }, + "facing=south,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 90 }, + "facing=west,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 180 }, + "facing=north,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 270 }, + "facing=east,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh" }, + "facing=south,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=west,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=north,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=east,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=south,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=west,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=north,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh" }, + "facing=east,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 270 }, + "facing=south,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top" }, + "facing=west,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 90 }, + "facing=north,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 180 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/overworld_door_redwood.json b/src/main/resources/assets/natura/blockstates/overworld_door_redwood.json new file mode 100644 index 00000000..2816b21b --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_door_redwood.json @@ -0,0 +1,46 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "door_bottom_rh": "natura:blocks/doors/redwood/normal/redwood_door_bottom", + "door_bottom": "natura:blocks/doors/redwood/normal/redwood_door_bottom", + "door_top_rh": "natura:blocks/doors/redwood/normal/redwood_door_top", + "door_top": "natura:blocks/doors/redwood/normal/redwood_door_top" + } + }, + "variants": { + "facing=east,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom" }, + "facing=south,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=west,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=north,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=east,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh" }, + "facing=south,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=west,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=north,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=east,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=south,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=west,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=north,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh" }, + "facing=east,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=south,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom" }, + "facing=west,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=north,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=east,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top" }, + "facing=south,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 90 }, + "facing=west,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 180 }, + "facing=north,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 270 }, + "facing=east,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh" }, + "facing=south,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=west,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=north,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=east,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=south,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=west,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=north,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh" }, + "facing=east,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 270 }, + "facing=south,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top" }, + "facing=west,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 90 }, + "facing=north,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 180 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/overworld_door_redwood_bark.json b/src/main/resources/assets/natura/blockstates/overworld_door_redwood_bark.json new file mode 100644 index 00000000..ce550a13 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_door_redwood_bark.json @@ -0,0 +1,47 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "door_bottom_rh": "natura:blocks/doors/redwood/bark/redwood_bark_door_bottom", + "door_bottom": "natura:blocks/doors/redwood/bark/redwood_bark_door_bottom", + "door_top_rh": "natura:blocks/doors/redwood/bark/redwood_bark_door_top", + "door_top": "natura:blocks/doors/redwood/bark/redwood_bark_door_top" + } + }, + "variants": { + "inventory": [{}], + "facing=east,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom" }, + "facing=south,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=west,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=north,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=east,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh" }, + "facing=south,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=west,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=north,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=east,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=south,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=west,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=north,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh" }, + "facing=east,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=south,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom" }, + "facing=west,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=north,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=east,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top" }, + "facing=south,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 90 }, + "facing=west,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 180 }, + "facing=north,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 270 }, + "facing=east,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh" }, + "facing=south,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=west,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=north,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=east,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=south,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=west,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=north,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh" }, + "facing=east,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 270 }, + "facing=south,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top" }, + "facing=west,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 90 }, + "facing=north,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 180 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/overworld_door_sakura.json b/src/main/resources/assets/natura/blockstates/overworld_door_sakura.json new file mode 100644 index 00000000..520e6b20 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_door_sakura.json @@ -0,0 +1,46 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "door_bottom_rh": "natura:blocks/doors/sakura/sakura_door_bottom", + "door_bottom": "natura:blocks/doors/sakura/sakura_door_bottom", + "door_top_rh": "natura:blocks/doors/sakura/sakura_door_top", + "door_top": "natura:blocks/doors/sakura/sakura_door_top" + } + }, + "variants": { + "facing=east,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom" }, + "facing=south,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=west,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=north,half=lower,hinge=left,open=false": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=east,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh" }, + "facing=south,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=west,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=north,half=lower,hinge=right,open=false": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=east,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 90 }, + "facing=south,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 180 }, + "facing=west,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh", "y": 270 }, + "facing=north,half=lower,hinge=left,open=true": { "model": "natura:natura_door_bottom_rh" }, + "facing=east,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 270 }, + "facing=south,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom" }, + "facing=west,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 90 }, + "facing=north,half=lower,hinge=right,open=true": { "model": "natura:natura_door_bottom", "y": 180 }, + "facing=east,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top" }, + "facing=south,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 90 }, + "facing=west,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 180 }, + "facing=north,half=upper,hinge=left,open=false": { "model": "natura:natura_door_top", "y": 270 }, + "facing=east,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh" }, + "facing=south,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=west,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=north,half=upper,hinge=right,open=false": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=east,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 90 }, + "facing=south,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 180 }, + "facing=west,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh", "y": 270 }, + "facing=north,half=upper,hinge=left,open=true": { "model": "natura:natura_door_top_rh" }, + "facing=east,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 270 }, + "facing=south,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top" }, + "facing=west,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 90 }, + "facing=north,half=upper,hinge=right,open=true": { "model": "natura:natura_door_top", "y": 180 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/overworld_doors.json b/src/main/resources/assets/natura/blockstates/overworld_doors.json new file mode 100644 index 00000000..4730200f --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_doors.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-item", + "model": "forge:item-layer" + }, + "variants": { + "eucalyptus_door": [{ "textures": { "layer0": "natura:items/doors/eucalyptus_door" }}], + "hopseed_door": [{ "textures": { "layer0": "natura:items/doors/hopseed_door" }}], + "sakura_door": [{ "textures": { "layer0": "natura:items/doors/sakura_door" }}], + "redwood_door": [{ "textures": { "layer0": "natura:items/doors/redwood_door" }}], + "redwood_bark_door": [{ "textures": { "layer0": "natura:items/doors/redwood_bark_door" }}] + } +} diff --git a/src/main/resources/assets/natura/blockstates/overworld_logs.json b/src/main/resources/assets/natura/blockstates/overworld_logs.json index 1ad1b65f..0c028ac4 100644 --- a/src/main/resources/assets/natura/blockstates/overworld_logs.json +++ b/src/main/resources/assets/natura/blockstates/overworld_logs.json @@ -1,12 +1,7 @@ { "forge_marker": 1, "defaults": { - "transform": "forge:default-block", - "model": "cube_all", - "textures": { - "all": "natura:blocks/logs/overworld/maple_log", - "particle": "#all" - } + "transform": "forge:default-block" }, "variants": { "type": { diff --git a/src/main/resources/assets/natura/blockstates/overworld_seed_bags.json b/src/main/resources/assets/natura/blockstates/overworld_seed_bags.json new file mode 100644 index 00000000..3cc3a442 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_seed_bags.json @@ -0,0 +1,11 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-item", + "model": "forge:item-layer" + }, + "variants": { + "cotton_seed_bag": [{ "textures": { "layer0": "natura:items/bags/cotton_seed_bag" }}], + "barley_seed_bag": [{ "textures": { "layer0": "natura:items/bags/barley_seed_bag" }}] + } +} diff --git a/src/main/resources/assets/natura/blockstates/overworld_seeds.json b/src/main/resources/assets/natura/blockstates/overworld_seeds.json new file mode 100644 index 00000000..4b566e84 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_seeds.json @@ -0,0 +1,11 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-item", + "model": "forge:item-layer" + }, + "variants": { + "barley_seeds": [{ "textures": { "layer0": "natura:items/seeds/barley_seeds" }}], + "cotton_seeds": [{ "textures": { "layer0": "natura:items/seeds/cotton_seeds" }}] + } +} diff --git a/src/main/resources/assets/natura/blockstates/overworld_workbenches.json b/src/main/resources/assets/natura/blockstates/overworld_workbenches.json new file mode 100644 index 00000000..5f22e704 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/overworld_workbenches.json @@ -0,0 +1,92 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "model": "cube", + "textures": { + "particle": "#front", + "down": "#bottom", + "up": "#top", + "north": "#front", + "east": "#side", + "south": "#side", + "west": "#front" + } + }, + "variants": { + "type": { + "maple": { + "textures": { + "front": "natura:blocks/workbenches/overworld/maple_workbench_face", + "side": "natura:blocks/workbenches/overworld/maple_workbench_side", + "top": "natura:blocks/workbenches/overworld/maple_workbench_top", + "bottom": "natura:blocks/planks/overworld/maple_planks" + } + }, + "silverbell": { + "textures": { + "front": "natura:blocks/workbenches/overworld/silverbell_workbench_face", + "side": "natura:blocks/workbenches/overworld/silverbell_workbench_side", + "top": "natura:blocks/workbenches/overworld/silverbell_workbench_top", + "bottom": "natura:blocks/planks/overworld/silverbell_planks" + } + }, + "amaranth": { + "textures": { + "front": "natura:blocks/workbenches/overworld/amaranth_workbench_face", + "side": "natura:blocks/workbenches/overworld/amaranth_workbench_side", + "top": "natura:blocks/workbenches/overworld/amaranth_workbench_top", + "bottom": "natura:blocks/planks/overworld/amaranth_planks" + } + }, + "tiger": { + "textures": { + "front": "natura:blocks/workbenches/overworld/tiger_workbench_face", + "side": "natura:blocks/workbenches/overworld/tiger_workbench_side", + "top": "natura:blocks/workbenches/overworld/tiger_workbench_top", + "bottom": "natura:blocks/planks/overworld/tiger_planks" + } + }, + "willow": { + "textures": { + "front": "natura:blocks/workbenches/overworld/willow_workbench_face", + "side": "natura:blocks/workbenches/overworld/willow_workbench_side", + "top": "natura:blocks/workbenches/overworld/willow_workbench_top", + "bottom": "natura:blocks/planks/overworld/willow_planks" + } + }, + "eucalyptus": { + "textures": { + "front": "natura:blocks/workbenches/overworld/eucalyptus_workbench_face", + "side": "natura:blocks/workbenches/overworld/eucalyptus_workbench_side", + "top": "natura:blocks/workbenches/overworld/eucalyptus_workbench_top", + "bottom": "natura:blocks/planks/overworld/eucalyptus_planks" + } + }, + "hopseed": { + "textures": { + "front": "natura:blocks/workbenches/overworld/hopseed_workbench_face", + "side": "natura:blocks/workbenches/overworld/hopseed_workbench_side", + "top": "natura:blocks/workbenches/overworld/hopseed_workbench_top", + "bottom": "natura:blocks/planks/overworld/hopseed_planks" + } + }, + "sakura": { + "textures": { + "front": "natura:blocks/workbenches/overworld/sakura_workbench_face", + "side": "natura:blocks/workbenches/overworld/sakura_workbench_side", + "top": "natura:blocks/workbenches/overworld/sakura_workbench_top", + "bottom": "natura:blocks/planks/overworld/sakura_planks" + } + }, + "redwood": { + "textures": { + "front": "natura:blocks/workbenches/overworld/redwood_workbench_face", + "side": "natura:blocks/workbenches/overworld/redwood_workbench_side", + "top": "natura:blocks/workbenches/overworld/redwood_workbench_top", + "bottom": "natura:blocks/planks/overworld/redwood_planks" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/redwood_button.json b/src/main/resources/assets/natura/blockstates/redwood_button.json new file mode 100644 index 00000000..32a5fcec --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/redwood_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/redwood_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/redwood_fence.json b/src/main/resources/assets/natura/blockstates/redwood_fence.json new file mode 100644 index 00000000..b8a0c39b --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/redwood_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/redwood_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/redwood_fence_gate.json b/src/main/resources/assets/natura/blockstates/redwood_fence_gate.json new file mode 100644 index 00000000..c9423e14 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/redwood_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/redwood_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/redwood_pressure_plate.json b/src/main/resources/assets/natura/blockstates/redwood_pressure_plate.json new file mode 100644 index 00000000..b98c8795 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/redwood_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/redwood_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/redwood_trap_door.json b/src/main/resources/assets/natura/blockstates/redwood_trap_door.json new file mode 100644 index 00000000..1606d57b --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/redwood_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/overworld/redwood_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/saguaro.json b/src/main/resources/assets/natura/blockstates/saguaro.json new file mode 100644 index 00000000..6cb0a59a --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/saguaro.json @@ -0,0 +1,40 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "side": "natura:blocks/saguaro/saguaro_side", + "top": "natura:blocks/saguaro/saguaro_top", + "bottom": "natura:blocks/saguaro/saguaro_bottom", + "particle": "#side" + }, + "model": "natura:natura_saguaro", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "natura:natura_saguaro_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "natura:natura_saguaro_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "natura:natura_saguaro_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "natura:natura_saguaro_side", "y": 270, "uvlock": true}, + "false": {} + }, + "up": { + "true": {"submodel": "natura:natura_saguaro_top", "uvlock": true}, + "false": {} + }, + "down": { + "true": {"submodel": "natura:natura_saguaro_bottom", "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/saguaro_baby.json b/src/main/resources/assets/natura/blockstates/saguaro_baby.json new file mode 100644 index 00000000..5288be50 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/saguaro_baby.json @@ -0,0 +1,25 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "particle": "#all" + } + }, + "variants": { + "age": { + "0": { + "model": "natura:natura_saguaro_baby", + "textures": { + "all": "natura:blocks/saguaro/saguaro_side" + } + }, + "1": { + "model": "natura:natura_saguaro_baby", + "textures": { + "all": "natura:blocks/saguaro/saguaro_side" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/saguaro_fruit.json b/src/main/resources/assets/natura/blockstates/saguaro_fruit.json new file mode 100644 index 00000000..527fbf8c --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/saguaro_fruit.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "all": "natura:blocks/saguaro/saguaro_fruit", + "particle": "#all" + } + }, + "variants": { + "facing": { + "south": { + "model": "natura:natura_saguaro_fruit" + }, + "west": { + "model": "natura:natura_saguaro_fruit", + "y": 90 + }, + "north": { + "model": "natura:natura_saguaro_fruit", + "y": 180 + }, + "east": { + "model": "natura:natura_saguaro_fruit", + "y": 270 + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/sakura_button.json b/src/main/resources/assets/natura/blockstates/sakura_button.json new file mode 100644 index 00000000..4ecf1ba7 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/sakura_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/sakura_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/sakura_fence.json b/src/main/resources/assets/natura/blockstates/sakura_fence.json new file mode 100644 index 00000000..a2f8e90e --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/sakura_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/sakura_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/sakura_fence_gate.json b/src/main/resources/assets/natura/blockstates/sakura_fence_gate.json new file mode 100644 index 00000000..5d3e52fa --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/sakura_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/sakura_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/sakura_pressure_plate.json b/src/main/resources/assets/natura/blockstates/sakura_pressure_plate.json new file mode 100644 index 00000000..64f226f7 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/sakura_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/sakura_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/sakura_trap_door.json b/src/main/resources/assets/natura/blockstates/sakura_trap_door.json new file mode 100644 index 00000000..d41823dd --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/sakura_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/overworld/sakura_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/seed_bags.json b/src/main/resources/assets/natura/blockstates/seed_bags.json new file mode 100644 index 00000000..6197a151 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/seed_bags.json @@ -0,0 +1,13 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-item", + "model": "forge:item-layer" + }, + "variants": { + "wheat_seed_bag": [{ "textures": { "layer0": "natura:items/bags/wheat_seed_bag" }}], + "carrots_seed_bag": [{ "textures": { "layer0": "natura:items/bags/carrots_seed_bag" }}], + "potatoes_seed_bag": [{ "textures": { "layer0": "natura:items/bags/potatoes_seed_bag" }}], + "nether_wart_seed_bag": [{ "textures": { "layer0": "natura:items/bags/nether_wart_seed_bag" }}] + } +} diff --git a/src/main/resources/assets/natura/blockstates/silverbell_button.json b/src/main/resources/assets/natura/blockstates/silverbell_button.json new file mode 100644 index 00000000..6188f242 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/silverbell_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/silverbell_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/silverbell_fence.json b/src/main/resources/assets/natura/blockstates/silverbell_fence.json new file mode 100644 index 00000000..331aaa95 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/silverbell_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/silverbell_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/silverbell_fence_gate.json b/src/main/resources/assets/natura/blockstates/silverbell_fence_gate.json new file mode 100644 index 00000000..26538a85 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/silverbell_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/silverbell_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/silverbell_pressure_plate.json b/src/main/resources/assets/natura/blockstates/silverbell_pressure_plate.json new file mode 100644 index 00000000..61a9eb2d --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/silverbell_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/silverbell_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/silverbell_trap_door.json b/src/main/resources/assets/natura/blockstates/silverbell_trap_door.json new file mode 100644 index 00000000..74cd28a2 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/silverbell_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/overworld/silverbell_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/sticks.json b/src/main/resources/assets/natura/blockstates/sticks.json new file mode 100644 index 00000000..39270d49 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/sticks.json @@ -0,0 +1,22 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-item", + "model": "forge:item-layer" + }, + "variants": { + "maple_stick": [{ "textures": { "layer0": "natura:items/sticks/maple_stick" }}], + "silverbell_stick": [{ "textures": { "layer0": "natura:items/sticks/silverbell_stick" }}], + "amaranth_stick": [{ "textures": { "layer0": "natura:items/sticks/amaranth_stick" }}], + "tiger_stick": [{ "textures": { "layer0": "natura:items/sticks/tiger_stick" }}], + "willow_stick": [{ "textures": { "layer0": "natura:items/sticks/willow_stick" }}], + "eucalyptus_stick": [{ "textures": { "layer0": "natura:items/sticks/eucalyptus_stick" }}], + "hopseed_stick": [{ "textures": { "layer0": "natura:items/sticks/hopseed_stick" }}], + "sakura_stick": [{ "textures": { "layer0": "natura:items/sticks/sakura_stick" }}], + "redwood_stick": [{ "textures": { "layer0": "natura:items/sticks/redwood_stick" }}], + "ghostwood_stick": [{ "textures": { "layer0": "natura:items/sticks/ghostwood_stick" }}], + "darkwood_stick": [{ "textures": { "layer0": "natura:items/sticks/darkwood_stick" }}], + "fusewood_stick": [{ "textures": { "layer0": "natura:items/sticks/fusewood_stick" }}], + "bloodwood_stick": [{ "textures": { "layer0": "natura:items/sticks/bloodwood_stick" }}] + } +} diff --git a/src/main/resources/assets/natura/blockstates/tiger_button.json b/src/main/resources/assets/natura/blockstates/tiger_button.json new file mode 100644 index 00000000..748eaa73 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/tiger_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/tiger_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/tiger_fence.json b/src/main/resources/assets/natura/blockstates/tiger_fence.json new file mode 100644 index 00000000..b156a355 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/tiger_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/tiger_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/tiger_fence_gate.json b/src/main/resources/assets/natura/blockstates/tiger_fence_gate.json new file mode 100644 index 00000000..2e1311a0 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/tiger_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/tiger_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/tiger_pressure_plate.json b/src/main/resources/assets/natura/blockstates/tiger_pressure_plate.json new file mode 100644 index 00000000..c34bd96b --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/tiger_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/tiger_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/tiger_trap_door.json b/src/main/resources/assets/natura/blockstates/tiger_trap_door.json new file mode 100644 index 00000000..6c03f483 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/tiger_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/overworld/tiger_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/willow_button.json b/src/main/resources/assets/natura/blockstates/willow_button.json new file mode 100644 index 00000000..39013676 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/willow_button.json @@ -0,0 +1,23 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/willow_planks" + } + }, + "variants": { + "facing=up,powered=false": { "model": "button", "uvlock": true }, + "facing=down,powered=false": { "model": "button", "uvlock": true, "x": 180 }, + "facing=east,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=false": { "model": "button", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=false": { "model": "button", "uvlock": true, "x": 90 }, + "facing=up,powered=true": { "model": "button_pressed", "uvlock": true }, + "facing=down,powered=true": { "model": "button_pressed", "uvlock": true, "x": 180 }, + "facing=east,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 90 }, + "facing=west,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 270 }, + "facing=south,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90, "y": 180 }, + "facing=north,powered=true": { "model": "button_pressed", "uvlock": true, "x": 90 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/willow_fence.json b/src/main/resources/assets/natura/blockstates/willow_fence.json new file mode 100644 index 00000000..8865f791 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/willow_fence.json @@ -0,0 +1,29 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/willow_planks" + }, + "model": "fence_post", + "uvlock": true + }, + "variants": { + "north": { + "true": {"submodel": "fence_side", "uvlock": true}, + "false": {} + }, + "south": { + "true": {"submodel": "fence_side", "y": 180, "uvlock": true}, + "false": {} + }, + "east": { + "true": {"submodel": "fence_side", "y": 90, "uvlock": true}, + "false": {} + }, + "west": { + "true": {"submodel": "fence_side", "y": 270, "uvlock": true}, + "false": {} + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/willow_fence_gate.json b/src/main/resources/assets/natura/blockstates/willow_fence_gate.json new file mode 100644 index 00000000..b217b31f --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/willow_fence_gate.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/willow_planks" + } + }, + "variants": { + "facing=south,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true }, + "facing=west,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=false": { "model": "fence_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true }, + "facing=west,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=false,open=true": { "model": "fence_gate_open", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true }, + "facing=west,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=false": { "model": "wall_gate_closed", "uvlock": true, "y": 270 }, + "facing=south,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true }, + "facing=west,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 90 }, + "facing=north,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 180 }, + "facing=east,in_wall=true,open=true": { "model": "wall_gate_open", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/blockstates/willow_pressure_plate.json b/src/main/resources/assets/natura/blockstates/willow_pressure_plate.json new file mode 100644 index 00000000..1ff935d8 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/willow_pressure_plate.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/planks/overworld/willow_planks" + } + }, + "variants": { + "powered": { + "false": { + "model": "pressure_plate_up" + }, + "true": { + "model": "pressure_plate_down" + } + } + } +} diff --git a/src/main/resources/assets/natura/blockstates/willow_trap_door.json b/src/main/resources/assets/natura/blockstates/willow_trap_door.json new file mode 100644 index 00000000..1090ae28 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/willow_trap_door.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "texture": "natura:blocks/trap_door/overworld/willow_trap_door" + } + }, + "variants": { + "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, + "facing=north,half=top,open=false": { "model": "trapdoor_top" }, + "facing=south,half=top,open=false": { "model": "trapdoor_top" }, + "facing=east,half=top,open=false": { "model": "trapdoor_top" }, + "facing=west,half=top,open=false": { "model": "trapdoor_top" }, + "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, + "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, + "facing=north,half=top,open=true": { "model": "trapdoor_open" }, + "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, + "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, + "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 } + } +} diff --git a/src/main/resources/assets/natura/lang/en_US.lang b/src/main/resources/assets/natura/lang/en_US.lang index 692deb9c..a16fe64d 100644 --- a/src/main/resources/assets/natura/lang/en_US.lang +++ b/src/main/resources/assets/natura/lang/en_US.lang @@ -1,8 +1,6 @@ -################ -# Blocks # -################ - -tile.natura.blaze_hopper.name=Blaze Hopper +########################## +# Overworld Blocks # +########################## tile.natura.clouds.white.name=Cloud tile.natura.clouds.white.tooltip=So light and fluffy!\nSaves you when you fall @@ -88,6 +86,10 @@ tile.natura.colored_grass_slab.topiary.name=Topiary Grass Slab tile.natura.colored_grass_slab.bluegrass.name=Bluegrass Slab tile.natura.colored_grass_slab.autumnal.name=Autumnal Grass Slab +tile.natura.colored_grass_stairs_topiary.name=Topiary Grass Stairs +tile.natura.colored_grass_stairs_bluegrass.name=Bluegrass Stairs +tile.natura.colored_grass_stairs_autumnal.name=Autumnal Grass Stairs + tile.natura.overworld_planks.maple.name=Maple Planks tile.natura.overworld_planks.maple.tooltip=Somewhat Sweet tile.natura.overworld_planks.silverbell.name=Silverbell Planks @@ -145,6 +147,93 @@ tile.natura.overworld_berrybush_blackberry.tooltip=Sweet and black\nFound in wet tile.natura.overworld_berrybush_maloberry.name=Maloberry Bush tile.natura.overworld_berrybush_maloberry.tooltip=Tasty and yellow-orange\nFound in cold areas +tile.natura.bluebells_flower.name=Bluebells + +tile.natura.saguaro.name=Saguaro Cactus +tile.natura.saguaro.tooltip=Grows like a tree\nGives fruit after a rainstorm +tile.natura.saguaro_baby.name=Baby Saguaro Cactus +tile.natura.saguaro_baby.tooltip=Grows like a tree\nGives fruit after a rainstorm +tile.natura.saguaro_fruit.name=Saguaro Fruit +tile.natura.saguaro_fruit.tooltip=Grows like a tree\nGives fruit after a rainstorm + +tile.natura.maple_button.name=Maple Button +tile.natura.maple_pressure_plate.name=Maple Prssure Plate +tile.natura.maple_trap_door.name=Maple Trap Door +tile.natura.maple_fence.name=Maple Fence +tile.natura.maple_fence_gate.name=Maple Fence Gate + +tile.natura.silverbell_button.name=Silverbell Button +tile.natura.silverbell_pressure_plate.name=Silverbell Prssure Plate +tile.natura.silverbell_trap_door.name=Silverbell Trap Door +tile.natura.silverbell_fence.name=Silverbell Fence +tile.natura.silverbell_fence_gate.name=Silverbell Fence Gate + +tile.natura.amaranth_button.name=Amaranth Button +tile.natura.amaranth_pressure_plate.name=Amaranth Prssure Plate +tile.natura.amaranth_trap_door.name=Amaranth Trap Door +tile.natura.amaranth_fence.name=Amaranth Fence +tile.natura.amaranth_fence_gate.name=Amaranth Fence Gate + +tile.natura.tiger_button.name=Tiger Button +tile.natura.tiger_pressure_plate.name=Tiger Prssure Plate +tile.natura.tiger_trap_door.name=Tiger Trap Door +tile.natura.tiger_fence.name=Tiger Fence +tile.natura.tiger_fence_gate.name=Tiger Fence Gate + +tile.natura.willow_button.name=Willow Button +tile.natura.willow_pressure_plate.name=Willow Prssure Plate +tile.natura.willow_trap_door.name=Willow Trap Door +tile.natura.willow_fence.name=Willow Fence +tile.natura.willow_fence_gate.name=Willow Fence Gate + +tile.natura.eucalyptus_button.name=Eucalyptus Button +tile.natura.eucalyptus_pressure_plate.name=Eucalyptus Prssure Plate +tile.natura.eucalyptus_trap_door.name=Eucalyptus Trap Door +tile.natura.eucalyptus_fence.name=Eucalyptus Fence +tile.natura.eucalyptus_fence_gate.name=Eucalyptus Fence Gate + +tile.natura.hopseed_button.name=Hopseed Button +tile.natura.hopseed_pressure_plate.name=Hopseed Prssure Plate +tile.natura.hopseed_trap_door.name=Hopseed Trap Door +tile.natura.hopseed_fence.name=Hopseed Fence +tile.natura.hopseed_fence_gate.name=Hopseed Fence Gate + +tile.natura.sakura_button.name=Sakura Button +tile.natura.sakura_pressure_plate.name=Sakura Prssure Plate +tile.natura.sakura_trap_door.name=Sakura Trap Door +tile.natura.sakura_fence.name=Sakura Fence +tile.natura.sakura_fence_gate.name=Sakura Fence Gate + +tile.natura.redwood_button.name=Redwood Button +tile.natura.redwood_pressure_plate.name=Redwood Prssure Plate +tile.natura.redwood_trap_door.name=Redwood Trap Door +tile.natura.redwood_fence.name=Redwood Fence +tile.natura.redwood_fence_gate.name=Redwood Fence Gate + +tile.natura.overworld_bookshelves.maple.name=Maple Bookshelf +tile.natura.overworld_bookshelves.silverbell.name=Silverbell Bookshelf +tile.natura.overworld_bookshelves.amaranth.name=Amaranth Bookshelf +tile.natura.overworld_bookshelves.tiger.name=Tiger Bookshelf +tile.natura.overworld_bookshelves.willow.name=Willow Bookshelf +tile.natura.overworld_bookshelves.eucalyptus.name=Eucalyptus Bookshelf +tile.natura.overworld_bookshelves.hopseed.name=Hopseed Bookshelf +tile.natura.overworld_bookshelves.sakura.name=Sakura Bookshelf +tile.natura.overworld_bookshelves.redwood.name=Redwood Bookshelf + +tile.natura.overworld_workbenches.maple.name=Maple Workbench +tile.natura.overworld_workbenches.silverbell.name=Silverbell Workbench +tile.natura.overworld_workbenches.amaranth.name=Amaranth Workbench +tile.natura.overworld_workbenches.tiger.name=Tiger Workbench +tile.natura.overworld_workbenches.willow.name=Willow Workbench +tile.natura.overworld_workbenches.eucalyptus.name=Eucalyptus Workbench +tile.natura.overworld_workbenches.hopseed.name=Hopseed Workbench +tile.natura.overworld_workbenches.sakura.name=Sakura Workbench +tile.natura.overworld_workbenches.redwood.name=Redwood Workbench + +####################### +# Nether Blocks # +####################### + tile.natura.nether_logs.ghostwood.name=Ghostwood tile.natura.nether_logs.ghostwood.tooltip=Nether Tree\nPale as a ghost tile.natura.nether_logs.darkwood.name=Darkwood @@ -152,6 +241,9 @@ tile.natura.nether_logs.darkwood.tooltip=Nether Tree tile.natura.nether_logs.fusewood.name=Fusewood tile.natura.nether_logs.fusewood.tooltip=Nether Tree\nExplosive Personality +tile.natura.nether_logs2.name=Bloodwood +tile.natura.nether_logs2.tooltip=Fire-resistant tree + tile.natura.nether_leaves.ghostwood.name=Ghostwood Leaves tile.natura.nether_leaves.ghostwood.tooltip=Nether Tree\nPale as a ghost tile.natura.nether_leaves.bloodwood.name=Blood Leaves @@ -168,13 +260,14 @@ tile.natura.nether_leaves2.darkwood_fruit.tooltip=Nether Tree\nContains an apple tile.natura.nether_sapling.ghostwood.name=Ghostwood Sapling tile.natura.nether_sapling.ghostwood.tooltip=Pale as a ghost -tile.natura.nether_sapling.bloodwood.name=Bloodwood Sapling -tile.natura.nether_sapling.bloodwood.tooltip=Fire-resistant planks tile.natura.nether_sapling.fusewood.name=Fusewood Sapling tile.natura.nether_sapling.fusewood.tooltip=Explosive Personality tile.natura.nether_sapling.darkwood.name=Darkwood Sapling tile.natura.nether_sapling.darkwood.tooltip=Produces chalky apples +tile.natura.nether_sapling2.bloodwood.name=Bloodwood Sapling +tile.natura.nether_sapling2.bloodwood.tooltip=Fire-resistant planks + tile.natura.nether_planks.ghostwood.name=Ghostwood Planks tile.natura.nether_planks.ghostwood.tooltip=Pale as a ghost tile.natura.nether_planks.bloodwood.name=Bloodwood Planks @@ -210,7 +303,7 @@ tile.natura.nether_heat_sand.name=Heat Sand tile.natura.nether_berrybush_blightberry.name=Blightberry Bush tile.natura.nether_berrybush_blightberry.tooltip=A little bit evil\nKiller healing -tile.natura.nether_berrybush_duskberry.name=DuskBerry Bush +tile.natura.nether_berrybush_duskberry.name=Duskberry Bush tile.natura.nether_berrybush_duskberry.tooltip=A little bit evil\nVisible night tile.natura.nether_berrybush_skyberry.name=Skyberry Bush tile.natura.nether_berrybush_skyberry.tooltip=A little bit evil\nSlow dive @@ -220,6 +313,66 @@ tile.natura.nether_berrybush_stingberry.tooltip=A little bit evil\nHit like a tr tile.natura.respawn_obelisk.inactive.name=Inactive Respawn Obelisk tile.natura.respawn_obelisk.active.name=Active Respawn Obelisk +tile.natura.nether_thorn_vines.name=Thornvines + +tile.natura.nether_glowshroom.green.name=Green Glowshroom +tile.natura.nether_glowshroom.blue.name=Blue Glowshroom +tile.natura.nether_glowshroom.purple.name=Purple Glowshroom + +tile.natura.nether_green_large_glowshroom.all_inside.name=Green Glowshroom +tile.natura.nether_blue_large_glowshroom.all_inside.name=Blue Glowshroom +tile.natura.nether_purple_large_glowshroom.all_inside.name=Purple Glowshroom + +tile.natura.nether_lever.name=Lever + +tile.natura.nether_pressure_plate.name=Pressure Plate + +tile.natura.nether_button.name=Button + +tile.natura.blaze_rail.name=Blaze Rail +tile.natura.blaze_rail_golden.name=Powered Blaze Rail +tile.natura.blaze_rail_activator.name=Activator Blaze Rail +tile.natura.blaze_rail_detector.name=Detector Blaze Rail + +tile.natura.blaze_hopper.name=Blaze Hopper + +tile.natura.netherrack_furnace.name=Nether Furnace +tile.natura.lit_netherrack_furnace.name=Nether Furnace + +tile.natura.ghostwood_button.name=Ghostwood Button +tile.natura.ghostwood_pressure_plate.name=Ghostwood Prssure Plate +tile.natura.ghostwood_trap_door.name=Ghostwood Trap Door +tile.natura.ghostwood_fence.name=Ghostwood Fence +tile.natura.ghostwood_fence_gate.name=Ghostwood Fence Gate + +tile.natura.bloodwood_button.name=Bloodwood Button +tile.natura.bloodwood_pressure_plate.name=Bloodwood Prssure Plate +tile.natura.bloodwood_trap_door.name=Bloodwood Trap Door +tile.natura.bloodwood_fence.name=Bloodwood Fence +tile.natura.bloodwood_fence_gate.name=Bloodwood Fence Gate + +tile.natura.fusewood_button.name=Fusewood Button +tile.natura.fusewood_pressure_plate.name=Fusewood Prssure Plate +tile.natura.fusewood_trap_door.name=Fusewood Trap Door +tile.natura.fusewood_fence.name=Fusewood Fence +tile.natura.fusewood_fence_gate.name=Fusewood Fence Gate + +tile.natura.darkwood_button.name=Darkwood Button +tile.natura.darkwood_pressure_plate.name=Darkwood Prssure Plate +tile.natura.darkwood_trap_door.name=Darkwood Trap Door +tile.natura.darkwood_fence.name=Darkwood Fence +tile.natura.darkwood_fence_gate.name=Darkwood Fence Gate + +tile.natura.nether_bookshelves.ghostwood.name=Ghostwood Bookshelf +tile.natura.nether_bookshelves.bloodwood.name=Bloodwood Bookshelf +tile.natura.nether_bookshelves.fusewood.name=Fusewood Bookshelf +tile.natura.nether_bookshelves.darkwood.name=Darkwood Bookshelf + +tile.natura.nether_workbenches.ghostwood.name=Maple Workbench +tile.natura.nether_workbenches.bloodwood.name=Bloodwood Workbench +tile.natura.nether_workbenches.fusewood.name=Fusewood Workbench +tile.natura.nether_workbenches.darkwood.name=Darkwood Workbench + ################ # Items # ################ @@ -247,6 +400,12 @@ item.natura.edibles.skyberry.tooltip=A little bit evil\nSlow dive item.natura.edibles.stingberry.name=Stingberry item.natura.edibles.stingberry.tooltip=A little bit evil\nHit like a truck +item.natura.edibles.potashapple.name=Potash Apple +item.natura.edibles.potashapple.tooltip=Tastes a bit like chalk + +item.natura.edibles.cactusjuice.name=Cactus Juice +item.natura.edibles.cactusjuice.tooltip=Refreshing! + item.natura.materials.barley.name=Barley item.natura.materials.barley.tooltip=Similar to wheat, it grows in the wild item.natura.materials.barley_flour.name=Barley Flour @@ -265,6 +424,20 @@ item.natura.materials.flame_string.name=Flamestring item.natura.materials.flame_string.tooltip=Somewhat more durable than string item.natura.materials.blue_dye.name=Blue Dye +item.natura.sticks.maple_stick.name=Maple Sticks +item.natura.sticks.silverbell_stick.name=Silverbell Sticks +item.natura.sticks.amaranth_stick.name=Amaranth Sticks +item.natura.sticks.tiger_stick.name=Tiger Sticks +item.natura.sticks.willow_stick.name=Willow Sticks +item.natura.sticks.eucalyptus_stick.name=Eucalyptus Sticks +item.natura.sticks.hopseed_stick.name=Hopseed Sticks +item.natura.sticks.sakura_stick.name=Sakura Sticks +item.natura.sticks.redwood_stick.name=Redwood Sticks +item.natura.sticks.ghostwood_stick.name=Ghostwood Sticks +item.natura.sticks.darkwood_stick.name=Darkwood Sticks +item.natura.sticks.fusewood_stick.name=Fusewood Sticks +item.natura.sticks.bloodwood_stick.name=Bloodwood Sticks + item.natura.empty_bowls.ghostwood_bowl.name=Empty Ghostwood Bowl item.natura.empty_bowls.bloodwood_bowl.name=Empty Bloodwood Bowl item.natura.empty_bowls.darkwood_bowl.name=Empty Darkwood Bowl @@ -284,6 +457,90 @@ item.natura.soups.fusewood_glowshroomstew.name=Glowshroom Stew item.natura.soups.berry_medley.name=Berry Medley item.natura.soups.berry_medley.tooltip=An irresistable combination of berries +item.natura.imp_armor_helmet.name=Impskin Helmet +item.natura.imp_armor_chestplate.name=Impskin Jerkin +item.natura.imp_armor_leggings.name=Impskin Leggings +item.natura.imp_armor_boots.name=Impskin Boots + +item.natura.seed_bags.wheat_seed_bag.name=Wheat Seed Bag +item.natura.seed_bags.wheat_seed_bag.tooltip=Plants in a 3x3 area +item.natura.seed_bags.potatoes_seed_bag.name=Potato Bag +item.natura.seed_bags.potatoes_seed_bag.tooltip=Plants in a 3x3 area +item.natura.seed_bags.carrots_seed_bag.name=Carrot Bag +item.natura.seed_bags.carrots_seed_bag.tooltip=Plants in a 3x3 area +item.natura.seed_bags.nether_wart_seed_bag.name=Nether Wart Bag +item.natura.seed_bags.nether_wart_seed_bag.tooltip=Plants in a 3x3 area +item.natura.bonemeal_bag.name=Bone Meal Bag +item.natura.bonemeal_bag.tooltip=Grows plants in a 3x3 area +item.natura.overworld_seed_bags.barley_seed_bag.name=Barley Seed Bag +item.natura.overworld_seed_bags.barley_seed_bag.tooltip=Plants in a 3x3 area +item.natura.overworld_seed_bags.cotton_seed_bag.name=Cotton Seed Bag +item.natura.overworld_seed_bags.cotton_seed_bag.tooltip=Plants in a 3x3 area + +item.natura.overworld_seeds.barley_seeds.name=Barley Seeds +item.natura.overworld_seeds.barley_seeds.tooltip=Similar to wheat, it grows in the wild +item.natura.overworld_seeds.cotton_seeds.name=Cotton Seeds +item.natura.overworld_seeds.cotton_seeds.tooltip=The source of all string and wool + +item.natura.overworld_doors.eucalyptus_door.name=Eucalyptus Door +item.natura.overworld_doors.eucalyptus_door.tooltip=The pink wood +item.natura.overworld_doors.hopseed_door.name=Hopseed Door +item.natura.overworld_doors.hopseed_door.tooltip=Ascended Glitch +item.natura.overworld_doors.sakura_door.name=Sakura Door +item.natura.overworld_doors.sakura_door.tooltip=Flowering Cherry +item.natura.overworld_doors.redwood_door.name=Redwood Door +item.natura.overworld_doors.redwood_door.tooltip=Giant Sequoia +item.natura.overworld_doors.redwood_bark_door.name=Redwood Bark Door +item.natura.overworld_doors.redwood_bark_door.tooltip=Secret Tunnel + +item.natura.nether_doors.ghostwood_door.name=Ghostwood Door +item.natura.nether_doors.ghostwood_door.tooltip=Pale as a ghost +item.natura.nether_doors.bloodwood_door.name=Bloodwood Door +item.natura.nether_doors.bloodwood_door.tooltip=Fire-resistant door + +item.natura.saguaro_fruit_item.name=Saguaro Fruit + +################ +# Tools # +################ + +item.natura.flint_and_blaze.name=Flint and Blaze + +item.natura.ghostwood_sword.name=Ghostwood Sword +item.natura.ghostwood_pickaxe.name=Ghostwood Pickaxe +item.natura.ghostwood_shovel.name=Ghostwood Shovel +item.natura.ghostwood_axe.name=Ghostwood Hatchet +item.natura.ghostwood_kama.name=Ghostwood Kama +item.natura.ghostwood_bow.name=Ghostwood Bow + +item.natura.bloodwood_sword.name=Bloodwood Sword +item.natura.bloodwood_pickaxe.name=Bloodwood Pickaxe +item.natura.bloodwood_shovel.name=Bloodwood Shovel +item.natura.bloodwood_axe.name=Bloodwood Hatchet +item.natura.bloodwood_kama.name=Bloodwood Kama +item.natura.bloodwood_bow.name=Bloodwood Bow + +item.natura.darkwood_sword.name=Darkwood Sword +item.natura.darkwood_pickaxe.name=Darkwood Pickaxe +item.natura.darkwood_shovel.name=Darkwood Shovel +item.natura.darkwood_axe.name=Darkwood Hatchet +item.natura.darkwood_kama.name=Darkwood Kama +item.natura.darkwood_bow.name=Darkwood Bow + +item.natura.fusewood_sword.name=Fusewood Sword +item.natura.fusewood_pickaxe.name=Fusewood Pickaxe +item.natura.fusewood_shovel.name=Fusewood Shovel +item.natura.fusewood_axe.name=Fusewood Hatchet +item.natura.fusewood_kama.name=Fusewood Kama +item.natura.fusewood_bow.name=Fusewood Bow + +item.natura.netherquartz_sword.name=Quartz Sword +item.natura.netherquartz_pickaxe.name=Quartz Pickaxe +item.natura.netherquartz_shovel.name=Quartz Shovel +item.natura.netherquartz_axe.name=Quartz Hatchet +item.natura.netherquartz_kama.name=Quartz Kama +item.natura.netherquartz_bow.name=Quartz Bow + ################# # Entities # ################# @@ -297,6 +554,13 @@ entity.natura.nitrocreeper.name=Nitro Creeper # GUIs # ################ -# Creative Tabs itemGroup.NaturaGeneral=Natura's General Items itemGroup.NaturaWorld=Natura's World Items +itemGroup.NaturaDecorative=Natura's Decorative Items + +############### +# HWYLA # +############### + +option.natura.alternatecropitem=Alternate Crop +option.natura.alternatedooritem=Alternate Door diff --git a/src/main/resources/assets/natura/models/block/natura_door_bottom.json b/src/main/resources/assets/natura/models/block/natura_door_bottom.json new file mode 100644 index 00000000..8c168601 --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_door_bottom.json @@ -0,0 +1,7 @@ +{ + "parent": "block/door_bottom", + "textures": { + "bottom": "#door_bottom", + "top": "#door_top" + } +} diff --git a/src/main/resources/assets/natura/models/block/natura_door_bottom_rh.json b/src/main/resources/assets/natura/models/block/natura_door_bottom_rh.json new file mode 100644 index 00000000..8e510379 --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_door_bottom_rh.json @@ -0,0 +1,7 @@ +{ + "parent": "block/door_bottom", + "textures": { + "bottom": "#door_bottom_rh", + "top": "#door_top_rh" + } +} diff --git a/src/main/resources/assets/natura/models/block/natura_door_top.json b/src/main/resources/assets/natura/models/block/natura_door_top.json new file mode 100644 index 00000000..1db92e8a --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_door_top.json @@ -0,0 +1,7 @@ +{ + "parent": "block/door_top", + "textures": { + "bottom": "#door_bottom", + "top": "#door_top" + } +} diff --git a/src/main/resources/assets/natura/models/block/natura_door_top_rh.json b/src/main/resources/assets/natura/models/block/natura_door_top_rh.json new file mode 100644 index 00000000..2faa9cc2 --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_door_top_rh.json @@ -0,0 +1,7 @@ +{ + "parent": "block/door_top", + "textures": { + "bottom": "#door_bottom_rh", + "top": "#door_top_rh" + } +} diff --git a/src/main/resources/assets/natura/models/block/natura_saguaro.json b/src/main/resources/assets/natura/models/block/natura_saguaro.json new file mode 100644 index 00000000..deadffb6 --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_saguaro.json @@ -0,0 +1,16 @@ +{ + "elements": [ + { + "from": [ 2.0, 2.0, 2.0 ], + "to": [ 14.0, 14.0, 14.0 ], + "faces": { + "north": { "uv": [ 2.0, 0.0, 14.0, 14.0 ], "texture": "#side" }, + "east": { "uv": [ 2.0, 0.0, 14.0, 14.0 ], "texture": "#side" }, + "south": { "uv": [ 2.0, 0.0, 14.0, 14.0 ], "texture": "#side" }, + "west": { "uv": [ 2.0, 0.0, 14.0, 14.0 ], "texture": "#side" }, + "up": { "uv": [ 2.0, 2.0, 14.0, 14.0 ], "texture": "#top" }, + "down": { "uv": [ 2.0, 2.0, 14.0, 14.0 ], "texture": "#bottom" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/models/block/natura_saguaro_baby.json b/src/main/resources/assets/natura/models/block/natura_saguaro_baby.json new file mode 100644 index 00000000..dc164bdc --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_saguaro_baby.json @@ -0,0 +1,16 @@ +{ + "elements": [ + { + "from": [ 5.0, 0.0, 5.0 ], + "to": [ 11.0, 8.0, 11.0 ], + "faces": { + "north": { "uv": [ 5.0, 8.0, 11.0, 16.0 ], "texture": "#all" }, + "east": { "uv": [ 5.0, 8.0, 11.0, 16.0 ], "texture": "#all" }, + "south": { "uv": [ 5.0, 8.0, 11.0, 16.0 ], "texture": "#all" }, + "west": { "uv": [ 5.0, 8.0, 11.0, 16.0 ], "texture": "#all" }, + "up": { "uv": [ 5.0, 5.0, 11.0, 11.0 ], "texture": "#all" }, + "down": { "uv": [ 5.0, 5.0, 11.0, 11.0 ], "texture": "#all" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/models/block/natura_saguaro_bottom.json b/src/main/resources/assets/natura/models/block/natura_saguaro_bottom.json new file mode 100644 index 00000000..c1d3be3a --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_saguaro_bottom.json @@ -0,0 +1,16 @@ +{ + "elements": [ + { + "from": [ 2.0, 0.0, 2.0 ], + "to": [ 14.0, 2.0, 14.0 ], + "faces": { + "north": { "uv": [ 2.0, 14.0, 14.0, 16.0 ], "texture": "#side" }, + "east": { "uv": [ 2.0, 14.0, 14.0, 16.0 ], "texture": "#side" }, + "south": { "uv": [ 2.0, 14.0, 14.0, 16.0 ], "texture": "#side" }, + "west": { "uv": [ 2.0, 14.0, 14.0, 16.0 ], "texture": "#side" }, + "up": { "uv": [ 2.0, 2.0, 14.0, 14.0 ], "texture": "#top" }, + "down": { "uv": [ 2.0, 2.0, 14.0, 14.0 ], "texture": "#bottom" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/models/block/natura_saguaro_fruit.json b/src/main/resources/assets/natura/models/block/natura_saguaro_fruit.json new file mode 100644 index 00000000..a720530b --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_saguaro_fruit.json @@ -0,0 +1,16 @@ +{ + "elements": [ + { + "from": [ 4.0, 3.0, 10.0 ], + "to": [ 12.0, 12.0, 18.0 ], + "faces": { + "north": { "uv": [ 8.0, 4.0, 16.0, 13.0 ], "texture": "#all" }, + "east": { "uv": [ 8.0, 4.0, 16.0, 13.0 ], "texture": "#all" }, + "south": { "uv": [ 8.0, 4.0, 16.0, 13.0 ], "texture": "#all" }, + "west": { "uv": [ 8.0, 4.0, 16.0, 13.0 ], "texture": "#all" }, + "up": { "uv": [ 0.0, 0.0, 7.0, 7.0 ], "texture": "#all" }, + "down": { "uv": [ 0.0, 0.0, 7.0, 7.0 ], "texture": "#all" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/models/block/natura_saguaro_side.json b/src/main/resources/assets/natura/models/block/natura_saguaro_side.json new file mode 100644 index 00000000..2d0d0940 --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_saguaro_side.json @@ -0,0 +1,16 @@ +{ + "elements": [ + { + "from": [ 2.0, 2.0, 0.0 ], + "to": [ 14.0, 14.0, 2.0 ], + "faces": { + "north": { "uv": [ 2.0, 2.0, 14.0, 14.0 ], "texture": "#side" }, + "east": { "uv": [ 0.0, 1.0, 2.0, 13.0 ], "texture": "#top" }, + "south": { "uv": [ 2.0, 2.0, 14.0, 14.0 ], "texture": "#side" }, + "west": { "uv": [ 0.0, 1.0, 2.0, 13.0 ], "texture": "#top" }, + "up": { "uv": [ 2.0, 0.0, 14.0, 2.0 ], "texture": "#top" }, + "down": { "uv": [ 2.0, 0.0, 14.0, 2.0 ], "texture": "#top" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/models/block/natura_saguaro_top.json b/src/main/resources/assets/natura/models/block/natura_saguaro_top.json new file mode 100644 index 00000000..d6379a90 --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_saguaro_top.json @@ -0,0 +1,16 @@ +{ + "elements": [ + { + "from": [ 2.0, 14.0, 2.0 ], + "to": [ 14.0, 16.0, 14.0 ], + "faces": { + "north": { "uv": [ 2.0, 0.0, 14.0, 2.0 ], "texture": "#side" }, + "east": { "uv": [ 2.0, 0.0, 14.0, 2.0 ], "texture": "#side" }, + "south": { "uv": [ 2.0, 0.0, 14.0, 2.0 ], "texture": "#side" }, + "west": { "uv": [ 2.0, 0.0, 14.0, 2.0 ], "texture": "#side" }, + "up": { "uv": [ 2.0, 2.0, 14.0, 14.0 ], "texture": "#top" }, + "down": { "uv": [ 2.0, 2.0, 14.0, 14.0 ], "texture": "#top" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/models/block/natura_vine_north.json b/src/main/resources/assets/natura/models/block/natura_vine_north.json new file mode 100644 index 00000000..73767280 --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_vine_north.json @@ -0,0 +1,17 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "#vine", + "vine": "natura:blocks/vine/thornvine" + }, + "elements": [ + { "from": [ 0, 0, 0.8 ], + "to": [ 16, 16, 0.8 ], + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#vine", "tintindex": 0 }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#vine", "tintindex": 0 } + } + } + ] +} diff --git a/src/main/resources/assets/natura/models/block/natura_vine_up.json b/src/main/resources/assets/natura/models/block/natura_vine_up.json new file mode 100644 index 00000000..c2197bb8 --- /dev/null +++ b/src/main/resources/assets/natura/models/block/natura_vine_up.json @@ -0,0 +1,17 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "#vine", + "vine": "natura:blocks/vine/thornvine" + }, + "elements": [ + { "from": [ 0, 15.2, 0 ], + "to": [ 16, 15.2, 16 ], + "shade": false, + "faces": { + "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#vine", "tintindex": 0 }, + "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#vine", "tintindex": 0 } + } + } + ] +} diff --git a/src/main/resources/assets/natura/models/item/amaranth_button.json b/src/main/resources/assets/natura/models/item/amaranth_button.json new file mode 100644 index 00000000..61fe1d49 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/amaranth_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/amaranth_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/amaranth_fence.json b/src/main/resources/assets/natura/models/item/amaranth_fence.json new file mode 100644 index 00000000..3ab1b739 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/amaranth_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/amaranth_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/amaranth_fence_gate.json b/src/main/resources/assets/natura/models/item/amaranth_fence_gate.json new file mode 100644 index 00000000..b275c103 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/amaranth_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/overworld/amaranth_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/amaranth_pressure_plate.json b/src/main/resources/assets/natura/models/item/amaranth_pressure_plate.json new file mode 100644 index 00000000..982a9dd9 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/amaranth_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/overworld/amaranth_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/amaranth_trap_door.json b/src/main/resources/assets/natura/models/item/amaranth_trap_door.json new file mode 100644 index 00000000..f46f6277 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/amaranth_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/overworld/amaranth_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/blaze_rail.json b/src/main/resources/assets/natura/models/item/blaze_rail.json new file mode 100644 index 00000000..bbdc808c --- /dev/null +++ b/src/main/resources/assets/natura/models/item/blaze_rail.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/rail/blaze_rail_normal" + } +} diff --git a/src/main/resources/assets/natura/models/item/blaze_rail_activator.json b/src/main/resources/assets/natura/models/item/blaze_rail_activator.json new file mode 100644 index 00000000..0fbf7c89 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/blaze_rail_activator.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/rail/blaze_rail_activator" + } +} diff --git a/src/main/resources/assets/natura/models/item/blaze_rail_detector.json b/src/main/resources/assets/natura/models/item/blaze_rail_detector.json new file mode 100644 index 00000000..787a6db5 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/blaze_rail_detector.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/rail/blaze_rail_detector" + } +} diff --git a/src/main/resources/assets/natura/models/item/blaze_rail_golden.json b/src/main/resources/assets/natura/models/item/blaze_rail_golden.json new file mode 100644 index 00000000..864b6a3b --- /dev/null +++ b/src/main/resources/assets/natura/models/item/blaze_rail_golden.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/rail/blaze_rail_golden" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_axe.json b/src/main/resources/assets/natura/models/item/bloodwood_axe.json new file mode 100644 index 00000000..25d485f1 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_axe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/hatchet/bloodwood_hatchet" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_bow.json b/src/main/resources/assets/natura/models/item/bloodwood_bow.json new file mode 100644 index 00000000..2c153e2a --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_bow.json @@ -0,0 +1,50 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/weapons/bow/bloodwood_bow" + }, + "display": { + "thirdperson_righthand": { + "rotation": [ -80, 260, -40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "thirdperson_lefthand": { + "rotation": [ -80, -280, 40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "firstperson_righthand": { + "rotation": [ 0, -90, 25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 90, -25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + } + }, + "overrides": [ + { + "predicate": { + "pulling": 1 + }, + "model": "natura:item/bloodwood_bow_pulling_0" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.65 + }, + "model": "natura:item/bloodwood_bow_pulling_1" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.9 + }, + "model": "natura:item/bloodwood_bow_pulling_2" + } + ] +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_bow_pulling_0.json b/src/main/resources/assets/natura/models/item/bloodwood_bow_pulling_0.json new file mode 100644 index 00000000..aea4bb34 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_bow_pulling_0.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/bloodwood_bow_pulling_0" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_bow_pulling_1.json b/src/main/resources/assets/natura/models/item/bloodwood_bow_pulling_1.json new file mode 100644 index 00000000..d0de610d --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_bow_pulling_1.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/bloodwood_bow_pulling_1" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_bow_pulling_2.json b/src/main/resources/assets/natura/models/item/bloodwood_bow_pulling_2.json new file mode 100644 index 00000000..1230a98c --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_bow_pulling_2.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/bloodwood_bow_pulling_2" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_button.json b/src/main/resources/assets/natura/models/item/bloodwood_button.json new file mode 100644 index 00000000..ce143375 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/nether/bloodwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_fence.json b/src/main/resources/assets/natura/models/item/bloodwood_fence.json new file mode 100644 index 00000000..01a62563 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/nether/bloodwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_fence_gate.json b/src/main/resources/assets/natura/models/item/bloodwood_fence_gate.json new file mode 100644 index 00000000..79e0a78f --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/nether/bloodwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_kama.json b/src/main/resources/assets/natura/models/item/bloodwood_kama.json new file mode 100644 index 00000000..5cd1d1f0 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_kama.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/kama/bloodwood_kama" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_pickaxe.json b/src/main/resources/assets/natura/models/item/bloodwood_pickaxe.json new file mode 100644 index 00000000..631807fe --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/pickaxe/bloodwood_pickaxe" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_pressure_plate.json b/src/main/resources/assets/natura/models/item/bloodwood_pressure_plate.json new file mode 100644 index 00000000..f4a125fb --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/nether/bloodwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_shovel.json b/src/main/resources/assets/natura/models/item/bloodwood_shovel.json new file mode 100644 index 00000000..1aacd225 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_shovel.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/shovel/bloodwood_shovel" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_sword.json b/src/main/resources/assets/natura/models/item/bloodwood_sword.json new file mode 100644 index 00000000..1ef69d7e --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_sword.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/sword/bloodwood_sword" + } +} diff --git a/src/main/resources/assets/natura/models/item/bloodwood_trap_door.json b/src/main/resources/assets/natura/models/item/bloodwood_trap_door.json new file mode 100644 index 00000000..a07f1317 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bloodwood_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/nether/bloodwood_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/bluebells_flower.json b/src/main/resources/assets/natura/models/item/bluebells_flower.json new file mode 100644 index 00000000..3e8f5444 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bluebells_flower.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/flower/bluebells_flowers" + } +} diff --git a/src/main/resources/assets/natura/models/item/bonemeal_bag.json b/src/main/resources/assets/natura/models/item/bonemeal_bag.json new file mode 100644 index 00000000..81d7d263 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bonemeal_bag.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/bags/bonemeal_bag" + } +} diff --git a/src/main/resources/assets/natura/models/item/bow.json b/src/main/resources/assets/natura/models/item/bow.json new file mode 100644 index 00000000..ead564ae --- /dev/null +++ b/src/main/resources/assets/natura/models/item/bow.json @@ -0,0 +1,28 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "minecraft:items/bow_standby" + }, + "display": { + "thirdperson_righthand": { + "rotation": [ -80, 260, -40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "thirdperson_lefthand": { + "rotation": [ -80, -280, 40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "firstperson_righthand": { + "rotation": [ 0, -90, 25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 90, -25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + } + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_axe.json b/src/main/resources/assets/natura/models/item/darkwood_axe.json new file mode 100644 index 00000000..ec4d4aa4 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_axe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/hatchet/darkwood_hatchet" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_bow.json b/src/main/resources/assets/natura/models/item/darkwood_bow.json new file mode 100644 index 00000000..a573f410 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_bow.json @@ -0,0 +1,50 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/weapons/bow/darkwood_bow" + }, + "display": { + "thirdperson_righthand": { + "rotation": [ -80, 260, -40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "thirdperson_lefthand": { + "rotation": [ -80, -280, 40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "firstperson_righthand": { + "rotation": [ 0, -90, 25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 90, -25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + } + }, + "overrides": [ + { + "predicate": { + "pulling": 1 + }, + "model": "natura:item/darkwood_bow_pulling_0" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.65 + }, + "model": "natura:item/darkwood_bow_pulling_1" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.9 + }, + "model": "natura:item/darkwood_bow_pulling_2" + } + ] +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_bow_pulling_0.json b/src/main/resources/assets/natura/models/item/darkwood_bow_pulling_0.json new file mode 100644 index 00000000..4c185078 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_bow_pulling_0.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/darkwood_bow_pulling_0" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_bow_pulling_1.json b/src/main/resources/assets/natura/models/item/darkwood_bow_pulling_1.json new file mode 100644 index 00000000..1f63d018 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_bow_pulling_1.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/darkwood_bow_pulling_1" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_bow_pulling_2.json b/src/main/resources/assets/natura/models/item/darkwood_bow_pulling_2.json new file mode 100644 index 00000000..27440749 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_bow_pulling_2.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/darkwood_bow_pulling_2" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_button.json b/src/main/resources/assets/natura/models/item/darkwood_button.json new file mode 100644 index 00000000..6ae6efb7 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/nether/darkwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_fence.json b/src/main/resources/assets/natura/models/item/darkwood_fence.json new file mode 100644 index 00000000..24f7304b --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/nether/darkwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_fence_gate.json b/src/main/resources/assets/natura/models/item/darkwood_fence_gate.json new file mode 100644 index 00000000..7025a6b2 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/nether/darkwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_kama.json b/src/main/resources/assets/natura/models/item/darkwood_kama.json new file mode 100644 index 00000000..3c0b5db7 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_kama.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/kama/darkwood_kama" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_pickaxe.json b/src/main/resources/assets/natura/models/item/darkwood_pickaxe.json new file mode 100644 index 00000000..0d1b7486 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/pickaxe/darkwood_pickaxe" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_pressure_plate.json b/src/main/resources/assets/natura/models/item/darkwood_pressure_plate.json new file mode 100644 index 00000000..0829dcf0 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/nether/darkwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_shovel.json b/src/main/resources/assets/natura/models/item/darkwood_shovel.json new file mode 100644 index 00000000..6c50a0a0 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_shovel.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/shovel/darkwood_shovel" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_sword.json b/src/main/resources/assets/natura/models/item/darkwood_sword.json new file mode 100644 index 00000000..79e02060 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_sword.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/sword/darkwood_sword" + } +} diff --git a/src/main/resources/assets/natura/models/item/darkwood_trap_door.json b/src/main/resources/assets/natura/models/item/darkwood_trap_door.json new file mode 100644 index 00000000..3c1fd398 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/darkwood_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/nether/darkwood_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/eucalyptus_button.json b/src/main/resources/assets/natura/models/item/eucalyptus_button.json new file mode 100644 index 00000000..27694ff3 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/eucalyptus_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/eucalyptus_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/eucalyptus_fence.json b/src/main/resources/assets/natura/models/item/eucalyptus_fence.json new file mode 100644 index 00000000..0f0f35d8 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/eucalyptus_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/eucalyptus_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/eucalyptus_fence_gate.json b/src/main/resources/assets/natura/models/item/eucalyptus_fence_gate.json new file mode 100644 index 00000000..4f1bb897 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/eucalyptus_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/overworld/eucalyptus_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/eucalyptus_pressure_plate.json b/src/main/resources/assets/natura/models/item/eucalyptus_pressure_plate.json new file mode 100644 index 00000000..971015ee --- /dev/null +++ b/src/main/resources/assets/natura/models/item/eucalyptus_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/overworld/eucalyptus_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/eucalyptus_trap_door.json b/src/main/resources/assets/natura/models/item/eucalyptus_trap_door.json new file mode 100644 index 00000000..6c00f6f7 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/eucalyptus_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/overworld/eucalyptus_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/flint_and_blaze.json b/src/main/resources/assets/natura/models/item/flint_and_blaze.json new file mode 100644 index 00000000..cc8f8658 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/flint_and_blaze.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/weapons/flint_and_blaze" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_axe.json b/src/main/resources/assets/natura/models/item/fusewood_axe.json new file mode 100644 index 00000000..dfd864d2 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_axe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/hatchet/fusewood_hatchet" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_bow.json b/src/main/resources/assets/natura/models/item/fusewood_bow.json new file mode 100644 index 00000000..55e1d9d7 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_bow.json @@ -0,0 +1,50 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/weapons/bow/fusewood_bow" + }, + "display": { + "thirdperson_righthand": { + "rotation": [ -80, 260, -40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "thirdperson_lefthand": { + "rotation": [ -80, -280, 40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "firstperson_righthand": { + "rotation": [ 0, -90, 25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 90, -25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + } + }, + "overrides": [ + { + "predicate": { + "pulling": 1 + }, + "model": "natura:item/fusewood_bow_pulling_0" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.65 + }, + "model": "natura:item/fusewood_bow_pulling_1" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.9 + }, + "model": "natura:item/fusewood_bow_pulling_2" + } + ] +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_bow_pulling_0.json b/src/main/resources/assets/natura/models/item/fusewood_bow_pulling_0.json new file mode 100644 index 00000000..c1417bc3 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_bow_pulling_0.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/fusewood_bow_pulling_0" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_bow_pulling_1.json b/src/main/resources/assets/natura/models/item/fusewood_bow_pulling_1.json new file mode 100644 index 00000000..aaa502cb --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_bow_pulling_1.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/fusewood_bow_pulling_1" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_bow_pulling_2.json b/src/main/resources/assets/natura/models/item/fusewood_bow_pulling_2.json new file mode 100644 index 00000000..15c52949 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_bow_pulling_2.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/fusewood_bow_pulling_2" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_button.json b/src/main/resources/assets/natura/models/item/fusewood_button.json new file mode 100644 index 00000000..3d9d7b7f --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/nether/fusewood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_fence.json b/src/main/resources/assets/natura/models/item/fusewood_fence.json new file mode 100644 index 00000000..8d0e1750 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/nether/fusewood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_fence_gate.json b/src/main/resources/assets/natura/models/item/fusewood_fence_gate.json new file mode 100644 index 00000000..84aa4fec --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/nether/fusewood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_kama.json b/src/main/resources/assets/natura/models/item/fusewood_kama.json new file mode 100644 index 00000000..4310afaf --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_kama.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/kama/fusewood_kama" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_pickaxe.json b/src/main/resources/assets/natura/models/item/fusewood_pickaxe.json new file mode 100644 index 00000000..80a5c6a1 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/pickaxe/fusewood_pickaxe" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_pressure_plate.json b/src/main/resources/assets/natura/models/item/fusewood_pressure_plate.json new file mode 100644 index 00000000..ff1d0784 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/nether/fusewood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_shovel.json b/src/main/resources/assets/natura/models/item/fusewood_shovel.json new file mode 100644 index 00000000..692059f6 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_shovel.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/shovel/fusewood_shovel" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_sword.json b/src/main/resources/assets/natura/models/item/fusewood_sword.json new file mode 100644 index 00000000..e8e0e030 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_sword.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/sword/fusewood_sword" + } +} diff --git a/src/main/resources/assets/natura/models/item/fusewood_trap_door.json b/src/main/resources/assets/natura/models/item/fusewood_trap_door.json new file mode 100644 index 00000000..2ccf1a04 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/fusewood_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/nether/fusewood_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_axe.json b/src/main/resources/assets/natura/models/item/ghostwood_axe.json new file mode 100644 index 00000000..853d836e --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_axe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/hatchet/ghostwood_hatchet" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_bow.json b/src/main/resources/assets/natura/models/item/ghostwood_bow.json new file mode 100644 index 00000000..66147a40 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_bow.json @@ -0,0 +1,50 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/weapons/bow/ghostwood_bow" + }, + "display": { + "thirdperson_righthand": { + "rotation": [ -80, 260, -40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "thirdperson_lefthand": { + "rotation": [ -80, -280, 40 ], + "translation": [ -1, -2, 2.5 ], + "scale": [ 0.9, 0.9, 0.9 ] + }, + "firstperson_righthand": { + "rotation": [ 0, -90, 25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 90, -25 ], + "translation": [ 1.13, 3.2, 1.13], + "scale": [ 0.68, 0.68, 0.68 ] + } + }, + "overrides": [ + { + "predicate": { + "pulling": 1 + }, + "model": "natura:item/ghostwood_bow_pulling_0" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.65 + }, + "model": "natura:item/ghostwood_bow_pulling_1" + }, + { + "predicate": { + "pulling": 1, + "pull": 0.9 + }, + "model": "natura:item/ghostwood_bow_pulling_2" + } + ] +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_bow_pulling_0.json b/src/main/resources/assets/natura/models/item/ghostwood_bow_pulling_0.json new file mode 100644 index 00000000..c75f1d7a --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_bow_pulling_0.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/ghostwood_bow_pulling_0" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_bow_pulling_1.json b/src/main/resources/assets/natura/models/item/ghostwood_bow_pulling_1.json new file mode 100644 index 00000000..e1746242 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_bow_pulling_1.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/ghostwood_bow_pulling_1" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_bow_pulling_2.json b/src/main/resources/assets/natura/models/item/ghostwood_bow_pulling_2.json new file mode 100644 index 00000000..aded0c57 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_bow_pulling_2.json @@ -0,0 +1,6 @@ +{ + "parent": "natura:item/bow", + "textures": { + "layer0": "natura:items/weapons/bow/ghostwood_bow_pulling_2" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_button.json b/src/main/resources/assets/natura/models/item/ghostwood_button.json new file mode 100644 index 00000000..931cfddb --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/nether/ghostwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_fence.json b/src/main/resources/assets/natura/models/item/ghostwood_fence.json new file mode 100644 index 00000000..209d8485 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/nether/ghostwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_fence_gate.json b/src/main/resources/assets/natura/models/item/ghostwood_fence_gate.json new file mode 100644 index 00000000..56ed8c06 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/nether/ghostwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_kama.json b/src/main/resources/assets/natura/models/item/ghostwood_kama.json new file mode 100644 index 00000000..8a4495d3 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_kama.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/kama/ghostwood_kama" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_pickaxe.json b/src/main/resources/assets/natura/models/item/ghostwood_pickaxe.json new file mode 100644 index 00000000..e7a95f28 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/pickaxe/ghostwood_pickaxe" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_pressure_plate.json b/src/main/resources/assets/natura/models/item/ghostwood_pressure_plate.json new file mode 100644 index 00000000..ddb88e8e --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/nether/ghostwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_shovel.json b/src/main/resources/assets/natura/models/item/ghostwood_shovel.json new file mode 100644 index 00000000..4dcca91e --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_shovel.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/shovel/ghostwood_shovel" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_sword.json b/src/main/resources/assets/natura/models/item/ghostwood_sword.json new file mode 100644 index 00000000..769c1d3f --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_sword.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/sword/ghostwood_sword" + } +} diff --git a/src/main/resources/assets/natura/models/item/ghostwood_trap_door.json b/src/main/resources/assets/natura/models/item/ghostwood_trap_door.json new file mode 100644 index 00000000..2d697469 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/ghostwood_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/nether/ghostwood_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/hopseed_button.json b/src/main/resources/assets/natura/models/item/hopseed_button.json new file mode 100644 index 00000000..de990d71 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/hopseed_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/hopseed_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/hopseed_fence.json b/src/main/resources/assets/natura/models/item/hopseed_fence.json new file mode 100644 index 00000000..dfa6dcd9 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/hopseed_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/hopseed_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/hopseed_fence_gate.json b/src/main/resources/assets/natura/models/item/hopseed_fence_gate.json new file mode 100644 index 00000000..0d2bba46 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/hopseed_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/overworld/hopseed_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/hopseed_pressure_plate.json b/src/main/resources/assets/natura/models/item/hopseed_pressure_plate.json new file mode 100644 index 00000000..3f97fc61 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/hopseed_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/overworld/hopseed_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/hopseed_trap_door.json b/src/main/resources/assets/natura/models/item/hopseed_trap_door.json new file mode 100644 index 00000000..50ab8f88 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/hopseed_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/overworld/hopseed_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/imp_armor_boots.json b/src/main/resources/assets/natura/models/item/imp_armor_boots.json new file mode 100644 index 00000000..0f5f60a9 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/imp_armor_boots.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/armor/imp_armor_boots" + } +} diff --git a/src/main/resources/assets/natura/models/item/imp_armor_chestplate.json b/src/main/resources/assets/natura/models/item/imp_armor_chestplate.json new file mode 100644 index 00000000..1dd1d08b --- /dev/null +++ b/src/main/resources/assets/natura/models/item/imp_armor_chestplate.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/armor/imp_armor_chestplate" + } +} diff --git a/src/main/resources/assets/natura/models/item/imp_armor_helmet.json b/src/main/resources/assets/natura/models/item/imp_armor_helmet.json new file mode 100644 index 00000000..15586aff --- /dev/null +++ b/src/main/resources/assets/natura/models/item/imp_armor_helmet.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/armor/imp_armor_helmet" + } +} diff --git a/src/main/resources/assets/natura/models/item/imp_armor_leggings.json b/src/main/resources/assets/natura/models/item/imp_armor_leggings.json new file mode 100644 index 00000000..7670e874 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/imp_armor_leggings.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/armor/imp_armor_leggings" + } +} diff --git a/src/main/resources/assets/natura/models/item/lit_netherrack_furnace.json b/src/main/resources/assets/natura/models/item/lit_netherrack_furnace.json new file mode 100644 index 00000000..d70df718 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/lit_netherrack_furnace.json @@ -0,0 +1,8 @@ +{ + "parent": "block/orientable", + "textures": { + "top": "natura:blocks/furnace/netherrack_furnace_top", + "front": "natura:blocks/furnace/netherrack_furnace_on", + "side": "natura:blocks/furnace/netherrack_furnace_side" + } +} diff --git a/src/main/resources/assets/natura/models/item/maple_button.json b/src/main/resources/assets/natura/models/item/maple_button.json new file mode 100644 index 00000000..44988caa --- /dev/null +++ b/src/main/resources/assets/natura/models/item/maple_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/maple_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/maple_fence.json b/src/main/resources/assets/natura/models/item/maple_fence.json new file mode 100644 index 00000000..c1ce6d91 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/maple_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/maple_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/maple_fence_gate.json b/src/main/resources/assets/natura/models/item/maple_fence_gate.json new file mode 100644 index 00000000..7095b405 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/maple_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/overworld/maple_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/maple_pressure_plate.json b/src/main/resources/assets/natura/models/item/maple_pressure_plate.json new file mode 100644 index 00000000..0b47005c --- /dev/null +++ b/src/main/resources/assets/natura/models/item/maple_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/overworld/maple_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/maple_trap_door.json b/src/main/resources/assets/natura/models/item/maple_trap_door.json new file mode 100644 index 00000000..ef977076 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/maple_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/overworld/maple_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/nether_button.json b/src/main/resources/assets/natura/models/item/nether_button.json new file mode 100644 index 00000000..1215a8cf --- /dev/null +++ b/src/main/resources/assets/natura/models/item/nether_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "blocks/netherrack" + } +} diff --git a/src/main/resources/assets/natura/models/item/nether_door_bloodwood.json b/src/main/resources/assets/natura/models/item/nether_door_bloodwood.json new file mode 100644 index 00000000..4a4eb0e2 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/nether_door_bloodwood.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/doors/bloodwood/bloodwood_door_bottom" + } +} diff --git a/src/main/resources/assets/natura/models/item/nether_door_ghostwood.json b/src/main/resources/assets/natura/models/item/nether_door_ghostwood.json new file mode 100644 index 00000000..83b4b0ea --- /dev/null +++ b/src/main/resources/assets/natura/models/item/nether_door_ghostwood.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/doors/ghostwood/ghostwood_door_bottom" + } +} diff --git a/src/main/resources/assets/natura/models/item/nether_glowshroom_blue.json b/src/main/resources/assets/natura/models/item/nether_glowshroom_blue.json new file mode 100644 index 00000000..ffe7d4fb --- /dev/null +++ b/src/main/resources/assets/natura/models/item/nether_glowshroom_blue.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/glowshroom/blue/blue_glowshroom" + } +} diff --git a/src/main/resources/assets/natura/models/item/nether_glowshroom_green.json b/src/main/resources/assets/natura/models/item/nether_glowshroom_green.json new file mode 100644 index 00000000..8053fa98 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/nether_glowshroom_green.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/glowshroom/green/green_glowshroom" + } +} diff --git a/src/main/resources/assets/natura/models/item/nether_glowshroom_purple.json b/src/main/resources/assets/natura/models/item/nether_glowshroom_purple.json new file mode 100644 index 00000000..249b1e3c --- /dev/null +++ b/src/main/resources/assets/natura/models/item/nether_glowshroom_purple.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/glowshroom/purple/purple_glowshroom" + } +} diff --git a/src/main/resources/assets/natura/models/item/nether_lever.json b/src/main/resources/assets/natura/models/item/nether_lever.json new file mode 100644 index 00000000..ec99f60e --- /dev/null +++ b/src/main/resources/assets/natura/models/item/nether_lever.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/lever/nether_lever" + } +} diff --git a/src/main/resources/assets/natura/models/item/nether_pressure_plate.json b/src/main/resources/assets/natura/models/item/nether_pressure_plate.json new file mode 100644 index 00000000..e1632777 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/nether_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "blocks/netherrack" + } +} diff --git a/src/main/resources/assets/natura/models/item/nether_thorn_vine.json b/src/main/resources/assets/natura/models/item/nether_thorn_vine.json new file mode 100644 index 00000000..6da1a6aa --- /dev/null +++ b/src/main/resources/assets/natura/models/item/nether_thorn_vine.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/vine/thornvine" + } +} diff --git a/src/main/resources/assets/natura/models/item/netherquartz_axe.json b/src/main/resources/assets/natura/models/item/netherquartz_axe.json new file mode 100644 index 00000000..4bfe570f --- /dev/null +++ b/src/main/resources/assets/natura/models/item/netherquartz_axe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/hatchet/netherquartz_hatchet" + } +} diff --git a/src/main/resources/assets/natura/models/item/netherquartz_kama.json b/src/main/resources/assets/natura/models/item/netherquartz_kama.json new file mode 100644 index 00000000..ae377f80 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/netherquartz_kama.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/kama/netherquartz_kama" + } +} diff --git a/src/main/resources/assets/natura/models/item/netherquartz_pickaxe.json b/src/main/resources/assets/natura/models/item/netherquartz_pickaxe.json new file mode 100644 index 00000000..513aa271 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/netherquartz_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/pickaxe/netherquartz_pickaxe" + } +} diff --git a/src/main/resources/assets/natura/models/item/netherquartz_shovel.json b/src/main/resources/assets/natura/models/item/netherquartz_shovel.json new file mode 100644 index 00000000..fb093538 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/netherquartz_shovel.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/shovel/netherquartz_shovel" + } +} diff --git a/src/main/resources/assets/natura/models/item/netherquartz_sword.json b/src/main/resources/assets/natura/models/item/netherquartz_sword.json new file mode 100644 index 00000000..30562551 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/netherquartz_sword.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "natura:items/weapons/sword/netherquartz_sword" + } +} diff --git a/src/main/resources/assets/natura/models/item/netherrack_furnace.json b/src/main/resources/assets/natura/models/item/netherrack_furnace.json new file mode 100644 index 00000000..f8516191 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/netherrack_furnace.json @@ -0,0 +1,8 @@ +{ + "parent": "block/orientable", + "textures": { + "top": "natura:blocks/furnace/netherrack_furnace_top", + "front": "natura:blocks/furnace/netherrack_furnace_off", + "side": "natura:blocks/furnace/netherrack_furnace_side" + } +} diff --git a/src/main/resources/assets/natura/models/item/overworld_door_eucalyptus.json b/src/main/resources/assets/natura/models/item/overworld_door_eucalyptus.json new file mode 100644 index 00000000..751a6213 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/overworld_door_eucalyptus.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/doors/eucalyptus/eucalyptus_door_bottom" + } +} diff --git a/src/main/resources/assets/natura/models/item/overworld_door_hopseed.json b/src/main/resources/assets/natura/models/item/overworld_door_hopseed.json new file mode 100644 index 00000000..72dbadc3 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/overworld_door_hopseed.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/doors/hopseed/hopseed_door_bottom" + } +} diff --git a/src/main/resources/assets/natura/models/item/overworld_door_redwood.json b/src/main/resources/assets/natura/models/item/overworld_door_redwood.json new file mode 100644 index 00000000..44d0a7b8 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/overworld_door_redwood.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/doors/redwood/normal/redwood_door_bottom" + } +} diff --git a/src/main/resources/assets/natura/models/item/overworld_door_redwood_bark.json b/src/main/resources/assets/natura/models/item/overworld_door_redwood_bark.json new file mode 100644 index 00000000..5d77f907 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/overworld_door_redwood_bark.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/doors/redwood/bark/redwood_bark_door_bottom" + } +} diff --git a/src/main/resources/assets/natura/models/item/overworld_door_sakura.json b/src/main/resources/assets/natura/models/item/overworld_door_sakura.json new file mode 100644 index 00000000..4c308209 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/overworld_door_sakura.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:blocks/doors/sakura/sakura_door_bottom" + } +} diff --git a/src/main/resources/assets/natura/models/item/redwood_button.json b/src/main/resources/assets/natura/models/item/redwood_button.json new file mode 100644 index 00000000..0feac3d5 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/redwood_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/redwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/redwood_fence.json b/src/main/resources/assets/natura/models/item/redwood_fence.json new file mode 100644 index 00000000..cdf97f46 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/redwood_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/redwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/redwood_fence_gate.json b/src/main/resources/assets/natura/models/item/redwood_fence_gate.json new file mode 100644 index 00000000..d1a48a91 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/redwood_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/overworld/redwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/redwood_pressure_plate.json b/src/main/resources/assets/natura/models/item/redwood_pressure_plate.json new file mode 100644 index 00000000..a8d32908 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/redwood_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/overworld/redwood_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/redwood_trap_door.json b/src/main/resources/assets/natura/models/item/redwood_trap_door.json new file mode 100644 index 00000000..208a3478 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/redwood_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/overworld/redwood_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/saguaro.json b/src/main/resources/assets/natura/models/item/saguaro.json new file mode 100644 index 00000000..c77f24f3 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/saguaro.json @@ -0,0 +1,11 @@ +{ + "parent": "block/cube", + "textures": { + "down": "natura:blocks/saguaro/saguaro_bottom", + "up": "natura:blocks/saguaro/saguaro_top", + "north": "natura:blocks/saguaro/saguaro_side", + "south": "natura:blocks/saguaro/saguaro_side", + "west": "natura:blocks/saguaro/saguaro_side", + "east": "natura:blocks/saguaro/saguaro_side" + } +} diff --git a/src/main/resources/assets/natura/models/item/saguaro_fruit.json b/src/main/resources/assets/natura/models/item/saguaro_fruit.json new file mode 100644 index 00000000..91a263c6 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/saguaro_fruit.json @@ -0,0 +1,20 @@ +{ + "parent": "block/block", + "textures": { + "all": "natura:blocks/saguaro/saguaro_fruit" + }, + "elements": [ + { + "from": [ 4.0, 0.0, 4.0 ], + "to": [ 12.0, 9.0, 12.0 ], + "faces": { + "north": { "texture": "#all", "uv": [ 8.0, 4.0, 16.0, 13.0 ] }, + "east": { "texture": "#all", "uv": [ 8.0, 4.0, 16.0, 13.0 ] }, + "south": { "texture": "#all", "uv": [ 8.0, 4.0, 16.0, 13.0 ] }, + "west": { "texture": "#all", "uv": [ 8.0, 4.0, 16.0, 13.0 ] }, + "up": { "texture": "#all", "uv": [ 0.0, 0.0, 7.0, 7.0 ] }, + "down": { "texture": "#all", "uv": [ 0.0, 0.0, 7.0, 7.0 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/models/item/saguaro_fruit_item.json b/src/main/resources/assets/natura/models/item/saguaro_fruit_item.json new file mode 100644 index 00000000..eaf9d893 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/saguaro_fruit_item.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "natura:items/food/saguaro_fruit" + } +} diff --git a/src/main/resources/assets/natura/models/item/sakura_button.json b/src/main/resources/assets/natura/models/item/sakura_button.json new file mode 100644 index 00000000..51af8c6b --- /dev/null +++ b/src/main/resources/assets/natura/models/item/sakura_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/sakura_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/sakura_fence.json b/src/main/resources/assets/natura/models/item/sakura_fence.json new file mode 100644 index 00000000..271cff5b --- /dev/null +++ b/src/main/resources/assets/natura/models/item/sakura_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/sakura_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/sakura_fence_gate.json b/src/main/resources/assets/natura/models/item/sakura_fence_gate.json new file mode 100644 index 00000000..a5c6dc3f --- /dev/null +++ b/src/main/resources/assets/natura/models/item/sakura_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/overworld/sakura_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/sakura_pressure_plate.json b/src/main/resources/assets/natura/models/item/sakura_pressure_plate.json new file mode 100644 index 00000000..01b8400f --- /dev/null +++ b/src/main/resources/assets/natura/models/item/sakura_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/overworld/sakura_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/sakura_trap_door.json b/src/main/resources/assets/natura/models/item/sakura_trap_door.json new file mode 100644 index 00000000..e71ad12e --- /dev/null +++ b/src/main/resources/assets/natura/models/item/sakura_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/overworld/sakura_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/silverbell_button.json b/src/main/resources/assets/natura/models/item/silverbell_button.json new file mode 100644 index 00000000..d3327220 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/silverbell_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/silverbell_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/silverbell_fence.json b/src/main/resources/assets/natura/models/item/silverbell_fence.json new file mode 100644 index 00000000..d5f25944 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/silverbell_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/silverbell_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/silverbell_fence_gate.json b/src/main/resources/assets/natura/models/item/silverbell_fence_gate.json new file mode 100644 index 00000000..e34769ea --- /dev/null +++ b/src/main/resources/assets/natura/models/item/silverbell_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/overworld/silverbell_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/silverbell_pressure_plate.json b/src/main/resources/assets/natura/models/item/silverbell_pressure_plate.json new file mode 100644 index 00000000..36ce2c2f --- /dev/null +++ b/src/main/resources/assets/natura/models/item/silverbell_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/overworld/silverbell_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/silverbell_trap_door.json b/src/main/resources/assets/natura/models/item/silverbell_trap_door.json new file mode 100644 index 00000000..75d9c841 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/silverbell_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/overworld/silverbell_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/tiger_button.json b/src/main/resources/assets/natura/models/item/tiger_button.json new file mode 100644 index 00000000..a4a8866f --- /dev/null +++ b/src/main/resources/assets/natura/models/item/tiger_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/tiger_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/tiger_fence.json b/src/main/resources/assets/natura/models/item/tiger_fence.json new file mode 100644 index 00000000..c1d30a8c --- /dev/null +++ b/src/main/resources/assets/natura/models/item/tiger_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/tiger_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/tiger_fence_gate.json b/src/main/resources/assets/natura/models/item/tiger_fence_gate.json new file mode 100644 index 00000000..54e74a28 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/tiger_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/overworld/tiger_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/tiger_pressure_plate.json b/src/main/resources/assets/natura/models/item/tiger_pressure_plate.json new file mode 100644 index 00000000..cab9dcc6 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/tiger_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/overworld/tiger_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/tiger_trap_door.json b/src/main/resources/assets/natura/models/item/tiger_trap_door.json new file mode 100644 index 00000000..0eab3f91 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/tiger_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/overworld/tiger_trap_door" + } +} diff --git a/src/main/resources/assets/natura/models/item/willow_button.json b/src/main/resources/assets/natura/models/item/willow_button.json new file mode 100644 index 00000000..e4691ee6 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/willow_button.json @@ -0,0 +1,6 @@ +{ + "parent": "block/button_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/willow_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/willow_fence.json b/src/main/resources/assets/natura/models/item/willow_fence.json new file mode 100644 index 00000000..5075cf87 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/willow_fence.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_inventory", + "textures": { + "texture": "natura:blocks/planks/overworld/willow_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/willow_fence_gate.json b/src/main/resources/assets/natura/models/item/willow_fence_gate.json new file mode 100644 index 00000000..6769ee64 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/willow_fence_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/fence_gate_closed", + "textures": { + "texture": "natura:blocks/planks/overworld/willow_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/willow_pressure_plate.json b/src/main/resources/assets/natura/models/item/willow_pressure_plate.json new file mode 100644 index 00000000..1b65ef03 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/willow_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "block/pressure_plate_up", + "textures": { + "texture": "natura:blocks/planks/overworld/willow_planks" + } +} diff --git a/src/main/resources/assets/natura/models/item/willow_trap_door.json b/src/main/resources/assets/natura/models/item/willow_trap_door.json new file mode 100644 index 00000000..706986f9 --- /dev/null +++ b/src/main/resources/assets/natura/models/item/willow_trap_door.json @@ -0,0 +1,6 @@ +{ + "parent": "block/trapdoor_bottom", + "textures": { + "texture": "natura:blocks/trap_door/overworld/willow_trap_door" + } +} diff --git a/src/main/resources/assets/natura/textures/armor/imp_armor.png b/src/main/resources/assets/natura/textures/armor/imp_armor.png new file mode 100644 index 00000000..44795bda Binary files /dev/null and b/src/main/resources/assets/natura/textures/armor/imp_armor.png differ diff --git a/src/main/resources/assets/natura/textures/armor/imp_armor_legs.png b/src/main/resources/assets/natura/textures/armor/imp_armor_legs.png new file mode 100644 index 00000000..2a058d13 Binary files /dev/null and b/src/main/resources/assets/natura/textures/armor/imp_armor_legs.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/bloodwood_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/bloodwood_bookshelf.png new file mode 100644 index 00000000..db3505a0 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/bloodwood_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/darkwood_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/darkwood_bookshelf.png new file mode 100644 index 00000000..55d931e7 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/darkwood_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/fusewood_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/fusewood_bookshelf.png new file mode 100644 index 00000000..68a0ffa5 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/fusewood_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/ghostwood_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/ghostwood_bookshelf.png new file mode 100644 index 00000000..df1054f4 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/nether/ghostwood_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/amaranth_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/amaranth_bookshelf.png new file mode 100644 index 00000000..f89ff1b9 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/amaranth_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/eucalyptus_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/eucalyptus_bookshelf.png new file mode 100644 index 00000000..4db0f469 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/eucalyptus_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/hopseed_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/hopseed_bookshelf.png new file mode 100644 index 00000000..67a1f409 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/hopseed_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/maple_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/maple_bookshelf.png new file mode 100644 index 00000000..e5c064f2 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/maple_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/redwood_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/redwood_bookshelf.png new file mode 100644 index 00000000..b1fee275 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/redwood_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/sakura_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/sakura_bookshelf.png new file mode 100644 index 00000000..0d71f547 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/sakura_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/silverbell_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/silverbell_bookshelf.png new file mode 100644 index 00000000..18568711 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/silverbell_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/tiger_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/tiger_bookshelf.png new file mode 100644 index 00000000..67a577fd Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/tiger_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/willow_bookshelf.png b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/willow_bookshelf.png new file mode 100644 index 00000000..84b5b0f3 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/bookshelves/overworld/willow_bookshelf.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_0.png b/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_0.png new file mode 100644 index 00000000..69b32a1d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_0.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_1.png b/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_1.png new file mode 100644 index 00000000..f72cfbaa Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_1.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_2.png b/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_2.png new file mode 100644 index 00000000..dcc24499 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_2.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_3.png b/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_3.png new file mode 100644 index 00000000..c131fac8 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/crops/barley/barley_stage_3.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_0.png b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_0.png new file mode 100644 index 00000000..162e2f45 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_0.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_1.png b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_1.png new file mode 100644 index 00000000..3f867431 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_1.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_2.png b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_2.png new file mode 100644 index 00000000..ef702991 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_2.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_3.png b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_3.png new file mode 100644 index 00000000..172352b1 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_3.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_4.png b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_4.png new file mode 100644 index 00000000..65007f6c Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/crops/cotton/cotton_stage_4.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/amaranth/amaranth_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/amaranth/amaranth_door_bottom.png new file mode 100644 index 00000000..2ceeeb7e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/amaranth/amaranth_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/amaranth/amaranth_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/amaranth/amaranth_door_top.png new file mode 100644 index 00000000..30288b16 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/amaranth/amaranth_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/bloodwood/bloodwood_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/bloodwood/bloodwood_door_bottom.png new file mode 100644 index 00000000..2d6d4945 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/bloodwood/bloodwood_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/bloodwood/bloodwood_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/bloodwood/bloodwood_door_top.png new file mode 100644 index 00000000..9c0cae1d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/bloodwood/bloodwood_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/darkwood/darkwood_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/darkwood/darkwood_door_bottom.png new file mode 100644 index 00000000..e71fd3a2 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/darkwood/darkwood_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/darkwood/darkwood_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/darkwood/darkwood_door_top.png new file mode 100644 index 00000000..739d1011 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/darkwood/darkwood_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/eucalyptus/eucalyptus_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/eucalyptus/eucalyptus_door_bottom.png new file mode 100644 index 00000000..cee349d6 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/eucalyptus/eucalyptus_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/eucalyptus/eucalyptus_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/eucalyptus/eucalyptus_door_top.png new file mode 100644 index 00000000..5fcce33e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/eucalyptus/eucalyptus_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/fusewood/fusewood_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/fusewood/fusewood_door_bottom.png new file mode 100644 index 00000000..401c5b7e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/fusewood/fusewood_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/fusewood/fusewood_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/fusewood/fusewood_door_top.png new file mode 100644 index 00000000..1093707b Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/fusewood/fusewood_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/ghostwood/ghostwood_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/ghostwood/ghostwood_door_bottom.png new file mode 100644 index 00000000..03d31a45 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/ghostwood/ghostwood_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/ghostwood/ghostwood_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/ghostwood/ghostwood_door_top.png new file mode 100644 index 00000000..e62e0451 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/ghostwood/ghostwood_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/hopseed/hopseed_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/hopseed/hopseed_door_bottom.png new file mode 100644 index 00000000..9e2d2aea Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/hopseed/hopseed_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/hopseed/hopseed_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/hopseed/hopseed_door_top.png new file mode 100644 index 00000000..1aab9080 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/hopseed/hopseed_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/maple/maple_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/maple/maple_door_bottom.png new file mode 100644 index 00000000..19170de7 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/maple/maple_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/maple/maple_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/maple/maple_door_top.png new file mode 100644 index 00000000..770c4b31 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/maple/maple_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/redwood/bark/redwood_bark_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/redwood/bark/redwood_bark_door_bottom.png new file mode 100644 index 00000000..60728df5 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/redwood/bark/redwood_bark_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/redwood/bark/redwood_bark_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/redwood/bark/redwood_bark_door_top.png new file mode 100644 index 00000000..641adea0 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/redwood/bark/redwood_bark_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/redwood/normal/redwood_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/redwood/normal/redwood_door_bottom.png new file mode 100644 index 00000000..297afd73 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/redwood/normal/redwood_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/redwood/normal/redwood_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/redwood/normal/redwood_door_top.png new file mode 100644 index 00000000..ea0cb9d0 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/redwood/normal/redwood_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/sakura/sakura_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/sakura/sakura_door_bottom.png new file mode 100644 index 00000000..3e996109 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/sakura/sakura_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/sakura/sakura_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/sakura/sakura_door_top.png new file mode 100644 index 00000000..f652dd92 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/sakura/sakura_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/silverbell/silverbell_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/silverbell/silverbell_door_bottom.png new file mode 100644 index 00000000..cec86a43 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/silverbell/silverbell_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/silverbell/silverbell_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/silverbell/silverbell_door_top.png new file mode 100644 index 00000000..52e10744 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/silverbell/silverbell_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/tiger/tiger_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/tiger/tiger_door_bottom.png new file mode 100644 index 00000000..108884f7 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/tiger/tiger_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/tiger/tiger_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/tiger/tiger_door_top.png new file mode 100644 index 00000000..19df7beb Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/tiger/tiger_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/willow/willow_door_bottom.png b/src/main/resources/assets/natura/textures/blocks/doors/willow/willow_door_bottom.png new file mode 100644 index 00000000..f7e2afe6 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/willow/willow_door_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/doors/willow/willow_door_top.png b/src/main/resources/assets/natura/textures/blocks/doors/willow/willow_door_top.png new file mode 100644 index 00000000..21cf121e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/doors/willow/willow_door_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/flower/bluebells_flowers.png b/src/main/resources/assets/natura/textures/blocks/flower/bluebells_flowers.png new file mode 100644 index 00000000..17fbce94 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/flower/bluebells_flowers.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_off.png b/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_off.png new file mode 100644 index 00000000..6eba50bc Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_off.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_on.png b/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_on.png new file mode 100644 index 00000000..151d1906 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_on.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_side.png b/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_side.png new file mode 100644 index 00000000..04f0bfb7 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_top.png b/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_top.png new file mode 100644 index 00000000..0f0cecac Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/furnace/netherrack_furnace_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom.png new file mode 100644 index 00000000..909563eb Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom_inside.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom_inside.png new file mode 100644 index 00000000..8ee7c151 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom_inside.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom_skin.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom_skin.png new file mode 100644 index 00000000..635ef8f8 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom_skin.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom_stem.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom_stem.png new file mode 100644 index 00000000..fbc137d9 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/blue/blue_glowshroom_stem.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom.png new file mode 100644 index 00000000..ac8697a5 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom_inside.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom_inside.png new file mode 100644 index 00000000..786077e4 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom_inside.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom_skin.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom_skin.png new file mode 100644 index 00000000..0305fcdc Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom_skin.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom_stem.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom_stem.png new file mode 100644 index 00000000..14764604 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/green/green_glowshroom_stem.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom.png new file mode 100644 index 00000000..432f2f77 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom_inside.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom_inside.png new file mode 100644 index 00000000..5b4b411e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom_inside.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom_skin.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom_skin.png new file mode 100644 index 00000000..4231ef27 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom_skin.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom_stem.png b/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom_stem.png new file mode 100644 index 00000000..349f2534 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/glowshroom/purple/purple_glowshroom_stem.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/lever/nether_lever.png b/src/main/resources/assets/natura/textures/blocks/lever/nether_lever.png new file mode 100644 index 00000000..d2e65016 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/lever/nether_lever.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_bark.png b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_bark.png new file mode 100644 index 00000000..350da1c6 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_bark.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_heart_small.png b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_heart_small.png new file mode 100644 index 00000000..1d844c28 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_heart_small.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_lower_left.png b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_lower_left.png new file mode 100644 index 00000000..c1e3585d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_lower_left.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_lower_right.png b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_lower_right.png new file mode 100644 index 00000000..081a214e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_lower_right.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_side_left.png b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_side_left.png new file mode 100644 index 00000000..e2c6553e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_side_left.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_side_right.png b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_side_right.png new file mode 100644 index 00000000..008800f9 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_side_right.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_upper_left.png b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_upper_left.png new file mode 100644 index 00000000..3ac6027d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_upper_left.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_upper_right.png b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_upper_right.png new file mode 100644 index 00000000..3fd18dec Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/logs/nether/bloodwood_upper_right.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_activator.png b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_activator.png new file mode 100644 index 00000000..0f6d5805 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_activator.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_activator_powered.png b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_activator_powered.png new file mode 100644 index 00000000..1e5ad564 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_activator_powered.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_detector.png b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_detector.png new file mode 100644 index 00000000..97ee584e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_detector.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_detector_powered.png b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_detector_powered.png new file mode 100644 index 00000000..05f13cee Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_detector_powered.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_golden.png b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_golden.png new file mode 100644 index 00000000..4ef6d8b8 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_golden.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_golden_powered.png b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_golden_powered.png new file mode 100644 index 00000000..71b6945c Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_golden_powered.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_normal.png b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_normal.png new file mode 100644 index 00000000..9f13f0ab Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_normal.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_normal_turned.png b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_normal_turned.png new file mode 100644 index 00000000..70409291 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/rail/blaze_rail_normal_turned.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_bottom.png b/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_bottom.png new file mode 100644 index 00000000..7890f32a Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_bottom.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_fruit.png b/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_fruit.png new file mode 100644 index 00000000..e0dd3700 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_fruit.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_side.png b/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_side.png new file mode 100644 index 00000000..6f084e58 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_top.png b/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_top.png new file mode 100644 index 00000000..d4ea0c0d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/saguaro/saguaro_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/nether/bloodwood_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/nether/bloodwood_trap_door.png new file mode 100644 index 00000000..54af585b Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/nether/bloodwood_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/nether/darkwood_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/nether/darkwood_trap_door.png new file mode 100644 index 00000000..f9b1184e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/nether/darkwood_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/nether/fusewood_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/nether/fusewood_trap_door.png new file mode 100644 index 00000000..d284d776 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/nether/fusewood_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/nether/ghostwood_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/nether/ghostwood_trap_door.png new file mode 100644 index 00000000..e0cabec8 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/nether/ghostwood_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/amaranth_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/amaranth_trap_door.png new file mode 100644 index 00000000..6218683d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/amaranth_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/eucalyptus_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/eucalyptus_trap_door.png new file mode 100644 index 00000000..d4b0ab5d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/eucalyptus_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/hopseed_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/hopseed_trap_door.png new file mode 100644 index 00000000..f6335f3b Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/hopseed_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/maple_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/maple_trap_door.png new file mode 100644 index 00000000..420f6a89 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/maple_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/redwood_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/redwood_trap_door.png new file mode 100644 index 00000000..47d65b74 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/redwood_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/sakura_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/sakura_trap_door.png new file mode 100644 index 00000000..6e2d77af Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/sakura_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/silverbell_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/silverbell_trap_door.png new file mode 100644 index 00000000..157b5d50 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/silverbell_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/tiger_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/tiger_trap_door.png new file mode 100644 index 00000000..0e44f781 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/tiger_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/willow_trap_door.png b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/willow_trap_door.png new file mode 100644 index 00000000..d7d6a3f2 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/trap_door/overworld/willow_trap_door.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/vine/thornvine.png b/src/main/resources/assets/natura/textures/blocks/vine/thornvine.png new file mode 100644 index 00000000..0793b3d5 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/vine/thornvine.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/bloodwood_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/bloodwood_workbench_face.png new file mode 100644 index 00000000..37d82a25 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/bloodwood_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/bloodwood_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/bloodwood_workbench_side.png new file mode 100644 index 00000000..b9dfa931 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/bloodwood_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/bloodwood_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/bloodwood_workbench_top.png new file mode 100644 index 00000000..c476891e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/bloodwood_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/darkwood_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/darkwood_workbench_face.png new file mode 100644 index 00000000..9e8e88ea Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/darkwood_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/darkwood_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/darkwood_workbench_side.png new file mode 100644 index 00000000..3ad94d9b Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/darkwood_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/darkwood_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/darkwood_workbench_top.png new file mode 100644 index 00000000..149ed575 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/darkwood_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/fusewood_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/fusewood_workbench_face.png new file mode 100644 index 00000000..aeead7c8 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/fusewood_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/fusewood_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/fusewood_workbench_side.png new file mode 100644 index 00000000..889b742a Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/fusewood_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/fusewood_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/fusewood_workbench_top.png new file mode 100644 index 00000000..7e9d3b62 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/fusewood_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/ghostwood_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/ghostwood_workbench_face.png new file mode 100644 index 00000000..e1e5fd94 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/ghostwood_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/ghostwood_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/ghostwood_workbench_side.png new file mode 100644 index 00000000..9bfa816e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/ghostwood_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/nether/ghostwood_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/ghostwood_workbench_top.png new file mode 100644 index 00000000..1cc74763 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/nether/ghostwood_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/amaranth_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/amaranth_workbench_face.png new file mode 100644 index 00000000..8d7e5969 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/amaranth_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/amaranth_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/amaranth_workbench_side.png new file mode 100644 index 00000000..b26923a1 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/amaranth_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/amaranth_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/amaranth_workbench_top.png new file mode 100644 index 00000000..52ebac59 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/amaranth_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/eucalyptus_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/eucalyptus_workbench_face.png new file mode 100644 index 00000000..082ae82d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/eucalyptus_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/eucalyptus_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/eucalyptus_workbench_side.png new file mode 100644 index 00000000..a547adfd Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/eucalyptus_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/eucalyptus_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/eucalyptus_workbench_top.png new file mode 100644 index 00000000..228f4f7b Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/eucalyptus_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/hopseed_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/hopseed_workbench_face.png new file mode 100644 index 00000000..198c934a Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/hopseed_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/hopseed_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/hopseed_workbench_side.png new file mode 100644 index 00000000..f670889f Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/hopseed_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/hopseed_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/hopseed_workbench_top.png new file mode 100644 index 00000000..66a94e71 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/hopseed_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/maple_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/maple_workbench_face.png new file mode 100644 index 00000000..1cd446a1 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/maple_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/maple_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/maple_workbench_side.png new file mode 100644 index 00000000..c7500bc5 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/maple_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/maple_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/maple_workbench_top.png new file mode 100644 index 00000000..6a0f22f0 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/maple_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/redwood_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/redwood_workbench_face.png new file mode 100644 index 00000000..1625cfd6 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/redwood_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/redwood_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/redwood_workbench_side.png new file mode 100644 index 00000000..78981542 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/redwood_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/redwood_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/redwood_workbench_top.png new file mode 100644 index 00000000..905ca946 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/redwood_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/sakura_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/sakura_workbench_face.png new file mode 100644 index 00000000..2c696567 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/sakura_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/sakura_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/sakura_workbench_side.png new file mode 100644 index 00000000..f8d843e4 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/sakura_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/sakura_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/sakura_workbench_top.png new file mode 100644 index 00000000..c9c22e8e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/sakura_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/silverbell_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/silverbell_workbench_face.png new file mode 100644 index 00000000..22bca63e Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/silverbell_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/silverbell_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/silverbell_workbench_side.png new file mode 100644 index 00000000..8c35590d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/silverbell_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/silverbell_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/silverbell_workbench_top.png new file mode 100644 index 00000000..c0bb86d5 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/silverbell_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/tiger_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/tiger_workbench_face.png new file mode 100644 index 00000000..410ba87d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/tiger_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/tiger_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/tiger_workbench_side.png new file mode 100644 index 00000000..19aad1fa Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/tiger_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/tiger_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/tiger_workbench_top.png new file mode 100644 index 00000000..3aae6dfe Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/tiger_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/willow_workbench_face.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/willow_workbench_face.png new file mode 100644 index 00000000..ed34c0ab Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/willow_workbench_face.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/willow_workbench_side.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/willow_workbench_side.png new file mode 100644 index 00000000..d07cac42 Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/willow_workbench_side.png differ diff --git a/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/willow_workbench_top.png b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/willow_workbench_top.png new file mode 100644 index 00000000..85d48e8d Binary files /dev/null and b/src/main/resources/assets/natura/textures/blocks/workbenches/overworld/willow_workbench_top.png differ diff --git a/src/main/resources/assets/natura/textures/items/armor/imp_armor_boots.png b/src/main/resources/assets/natura/textures/items/armor/imp_armor_boots.png new file mode 100644 index 00000000..cfac543d Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/armor/imp_armor_boots.png differ diff --git a/src/main/resources/assets/natura/textures/items/armor/imp_armor_chestplate.png b/src/main/resources/assets/natura/textures/items/armor/imp_armor_chestplate.png new file mode 100644 index 00000000..b61c4879 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/armor/imp_armor_chestplate.png differ diff --git a/src/main/resources/assets/natura/textures/items/armor/imp_armor_helmet.png b/src/main/resources/assets/natura/textures/items/armor/imp_armor_helmet.png new file mode 100644 index 00000000..bb256ea1 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/armor/imp_armor_helmet.png differ diff --git a/src/main/resources/assets/natura/textures/items/armor/imp_armor_leggings.png b/src/main/resources/assets/natura/textures/items/armor/imp_armor_leggings.png new file mode 100644 index 00000000..b3c425dd Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/armor/imp_armor_leggings.png differ diff --git a/src/main/resources/assets/natura/textures/items/bags/barley_seed_bag.png b/src/main/resources/assets/natura/textures/items/bags/barley_seed_bag.png new file mode 100644 index 00000000..f2c78290 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/bags/barley_seed_bag.png differ diff --git a/src/main/resources/assets/natura/textures/items/bags/bonemeal_bag.png b/src/main/resources/assets/natura/textures/items/bags/bonemeal_bag.png new file mode 100644 index 00000000..82eb8e2a Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/bags/bonemeal_bag.png differ diff --git a/src/main/resources/assets/natura/textures/items/bags/carrots_seed_bag.png b/src/main/resources/assets/natura/textures/items/bags/carrots_seed_bag.png new file mode 100644 index 00000000..be4c05b1 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/bags/carrots_seed_bag.png differ diff --git a/src/main/resources/assets/natura/textures/items/bags/cotton_seed_bag.png b/src/main/resources/assets/natura/textures/items/bags/cotton_seed_bag.png new file mode 100644 index 00000000..92a257b3 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/bags/cotton_seed_bag.png differ diff --git a/src/main/resources/assets/natura/textures/items/bags/nether_wart_seed_bag.png b/src/main/resources/assets/natura/textures/items/bags/nether_wart_seed_bag.png new file mode 100644 index 00000000..cb4614d8 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/bags/nether_wart_seed_bag.png differ diff --git a/src/main/resources/assets/natura/textures/items/bags/potatoes_seed_bag.png b/src/main/resources/assets/natura/textures/items/bags/potatoes_seed_bag.png new file mode 100644 index 00000000..8d4d99f0 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/bags/potatoes_seed_bag.png differ diff --git a/src/main/resources/assets/natura/textures/items/bags/wheat_seed_bag.png b/src/main/resources/assets/natura/textures/items/bags/wheat_seed_bag.png new file mode 100644 index 00000000..3c4d29a6 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/bags/wheat_seed_bag.png differ diff --git a/src/main/resources/assets/natura/textures/items/doors/bloodwood_door.png b/src/main/resources/assets/natura/textures/items/doors/bloodwood_door.png new file mode 100644 index 00000000..cec31108 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/doors/bloodwood_door.png differ diff --git a/src/main/resources/assets/natura/textures/items/doors/darkwood_door.png b/src/main/resources/assets/natura/textures/items/doors/darkwood_door.png new file mode 100644 index 00000000..db9c0237 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/doors/darkwood_door.png differ diff --git a/src/main/resources/assets/natura/textures/items/doors/eucalyptus_door.png b/src/main/resources/assets/natura/textures/items/doors/eucalyptus_door.png new file mode 100644 index 00000000..d74c7ad2 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/doors/eucalyptus_door.png differ diff --git a/src/main/resources/assets/natura/textures/items/doors/ghostwood_door.png b/src/main/resources/assets/natura/textures/items/doors/ghostwood_door.png new file mode 100644 index 00000000..068e3d2a Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/doors/ghostwood_door.png differ diff --git a/src/main/resources/assets/natura/textures/items/doors/hopseed_door.png b/src/main/resources/assets/natura/textures/items/doors/hopseed_door.png new file mode 100644 index 00000000..77a3fae1 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/doors/hopseed_door.png differ diff --git a/src/main/resources/assets/natura/textures/items/doors/redwood_bark_door.png b/src/main/resources/assets/natura/textures/items/doors/redwood_bark_door.png new file mode 100644 index 00000000..6df962da Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/doors/redwood_bark_door.png differ diff --git a/src/main/resources/assets/natura/textures/items/doors/redwood_door.png b/src/main/resources/assets/natura/textures/items/doors/redwood_door.png new file mode 100644 index 00000000..13d77ef5 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/doors/redwood_door.png differ diff --git a/src/main/resources/assets/natura/textures/items/doors/sakura_door.png b/src/main/resources/assets/natura/textures/items/doors/sakura_door.png new file mode 100644 index 00000000..5b8a5042 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/doors/sakura_door.png differ diff --git a/src/main/resources/assets/natura/textures/items/food/cactusjuice.png b/src/main/resources/assets/natura/textures/items/food/cactusjuice.png new file mode 100644 index 00000000..99f32b8b Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/food/cactusjuice.png differ diff --git a/src/main/resources/assets/natura/textures/items/food/potashapple.png b/src/main/resources/assets/natura/textures/items/food/potashapple.png new file mode 100644 index 00000000..e2aadd6f Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/food/potashapple.png differ diff --git a/src/main/resources/assets/natura/textures/items/food/saguaro_fruit.png b/src/main/resources/assets/natura/textures/items/food/saguaro_fruit.png new file mode 100644 index 00000000..201e9763 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/food/saguaro_fruit.png differ diff --git a/src/main/resources/assets/natura/textures/items/seeds/barley_seeds.png b/src/main/resources/assets/natura/textures/items/seeds/barley_seeds.png new file mode 100644 index 00000000..12cf8430 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/seeds/barley_seeds.png differ diff --git a/src/main/resources/assets/natura/textures/items/seeds/cotton_seeds.png b/src/main/resources/assets/natura/textures/items/seeds/cotton_seeds.png new file mode 100644 index 00000000..5359b0fe Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/seeds/cotton_seeds.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/amaranth_stick.png b/src/main/resources/assets/natura/textures/items/sticks/amaranth_stick.png new file mode 100644 index 00000000..9432a8f9 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/amaranth_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/bloodwood_stick.png b/src/main/resources/assets/natura/textures/items/sticks/bloodwood_stick.png new file mode 100644 index 00000000..6b2890f3 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/bloodwood_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/darkwood_stick.png b/src/main/resources/assets/natura/textures/items/sticks/darkwood_stick.png new file mode 100644 index 00000000..72d59282 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/darkwood_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/eucalyptus_stick.png b/src/main/resources/assets/natura/textures/items/sticks/eucalyptus_stick.png new file mode 100644 index 00000000..cd43c075 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/eucalyptus_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/fusewood_stick.png b/src/main/resources/assets/natura/textures/items/sticks/fusewood_stick.png new file mode 100644 index 00000000..f237fc87 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/fusewood_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/ghostwood_stick.png b/src/main/resources/assets/natura/textures/items/sticks/ghostwood_stick.png new file mode 100644 index 00000000..322bd3df Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/ghostwood_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/hopseed_stick.png b/src/main/resources/assets/natura/textures/items/sticks/hopseed_stick.png new file mode 100644 index 00000000..af48eb25 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/hopseed_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/maple_stick.png b/src/main/resources/assets/natura/textures/items/sticks/maple_stick.png new file mode 100644 index 00000000..356a3047 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/maple_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/redwood_stick.png b/src/main/resources/assets/natura/textures/items/sticks/redwood_stick.png new file mode 100644 index 00000000..3a88d4be Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/redwood_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/sakura_stick.png b/src/main/resources/assets/natura/textures/items/sticks/sakura_stick.png new file mode 100644 index 00000000..b6aa7735 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/sakura_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/silverbell_stick.png b/src/main/resources/assets/natura/textures/items/sticks/silverbell_stick.png new file mode 100644 index 00000000..b7daf185 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/silverbell_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/tiger_stick.png b/src/main/resources/assets/natura/textures/items/sticks/tiger_stick.png new file mode 100644 index 00000000..97465d74 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/tiger_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/sticks/willow_stick.png b/src/main/resources/assets/natura/textures/items/sticks/willow_stick.png new file mode 100644 index 00000000..96e8093b Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/sticks/willow_stick.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow.png b/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow.png new file mode 100644 index 00000000..5dfb82a6 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow_pulling_0.png b/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow_pulling_0.png new file mode 100644 index 00000000..1bdc1718 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow_pulling_0.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow_pulling_1.png b/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow_pulling_1.png new file mode 100644 index 00000000..f4a71595 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow_pulling_1.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow_pulling_2.png b/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow_pulling_2.png new file mode 100644 index 00000000..d2dfb841 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/bloodwood_bow_pulling_2.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow.png b/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow.png new file mode 100644 index 00000000..e76d57ff Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow_pulling_0.png b/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow_pulling_0.png new file mode 100644 index 00000000..a1bc8abb Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow_pulling_0.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow_pulling_1.png b/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow_pulling_1.png new file mode 100644 index 00000000..e6322699 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow_pulling_1.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow_pulling_2.png b/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow_pulling_2.png new file mode 100644 index 00000000..6bae7208 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/darkwood_bow_pulling_2.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow.png b/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow.png new file mode 100644 index 00000000..0f525e3a Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow_pulling_0.png b/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow_pulling_0.png new file mode 100644 index 00000000..d89d3696 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow_pulling_0.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow_pulling_1.png b/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow_pulling_1.png new file mode 100644 index 00000000..999db736 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow_pulling_1.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow_pulling_2.png b/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow_pulling_2.png new file mode 100644 index 00000000..53855ed9 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/fusewood_bow_pulling_2.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow.png b/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow.png new file mode 100644 index 00000000..6398a81a Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow_pulling_0.png b/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow_pulling_0.png new file mode 100644 index 00000000..679ac1bc Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow_pulling_0.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow_pulling_1.png b/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow_pulling_1.png new file mode 100644 index 00000000..8f64e3d9 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow_pulling_1.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow_pulling_2.png b/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow_pulling_2.png new file mode 100644 index 00000000..880aef8f Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/bow/ghostwood_bow_pulling_2.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/flint_and_blaze.png b/src/main/resources/assets/natura/textures/items/weapons/flint_and_blaze.png new file mode 100644 index 00000000..b4c8bce7 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/flint_and_blaze.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/hatchet/bloodwood_hatchet.png b/src/main/resources/assets/natura/textures/items/weapons/hatchet/bloodwood_hatchet.png new file mode 100644 index 00000000..a30f032c Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/hatchet/bloodwood_hatchet.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/hatchet/darkwood_hatchet.png b/src/main/resources/assets/natura/textures/items/weapons/hatchet/darkwood_hatchet.png new file mode 100644 index 00000000..8eae39b0 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/hatchet/darkwood_hatchet.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/hatchet/fusewood_hatchet.png b/src/main/resources/assets/natura/textures/items/weapons/hatchet/fusewood_hatchet.png new file mode 100644 index 00000000..d6691c1c Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/hatchet/fusewood_hatchet.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/hatchet/ghostwood_hatchet.png b/src/main/resources/assets/natura/textures/items/weapons/hatchet/ghostwood_hatchet.png new file mode 100644 index 00000000..250acb3e Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/hatchet/ghostwood_hatchet.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/hatchet/netherquartz_hatchet.png b/src/main/resources/assets/natura/textures/items/weapons/hatchet/netherquartz_hatchet.png new file mode 100644 index 00000000..2d2efa04 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/hatchet/netherquartz_hatchet.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/kama/bloodwood_kama.png b/src/main/resources/assets/natura/textures/items/weapons/kama/bloodwood_kama.png new file mode 100644 index 00000000..06ea9552 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/kama/bloodwood_kama.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/kama/darkwood_kama.png b/src/main/resources/assets/natura/textures/items/weapons/kama/darkwood_kama.png new file mode 100644 index 00000000..ac1a318a Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/kama/darkwood_kama.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/kama/fusewood_kama.png b/src/main/resources/assets/natura/textures/items/weapons/kama/fusewood_kama.png new file mode 100644 index 00000000..60348168 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/kama/fusewood_kama.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/kama/ghostwood_kama.png b/src/main/resources/assets/natura/textures/items/weapons/kama/ghostwood_kama.png new file mode 100644 index 00000000..7298f6d4 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/kama/ghostwood_kama.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/kama/netherquartz_kama.png b/src/main/resources/assets/natura/textures/items/weapons/kama/netherquartz_kama.png new file mode 100644 index 00000000..c05811d7 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/kama/netherquartz_kama.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/pickaxe/bloodwood_pickaxe.png b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/bloodwood_pickaxe.png new file mode 100644 index 00000000..06aa6205 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/bloodwood_pickaxe.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/pickaxe/darkwood_pickaxe.png b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/darkwood_pickaxe.png new file mode 100644 index 00000000..b9794fec Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/darkwood_pickaxe.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/pickaxe/fusewood_pickaxe.png b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/fusewood_pickaxe.png new file mode 100644 index 00000000..bb6c8907 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/fusewood_pickaxe.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/pickaxe/ghostwood_pickaxe.png b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/ghostwood_pickaxe.png new file mode 100644 index 00000000..2fdc1521 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/ghostwood_pickaxe.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/pickaxe/netherquartz_pickaxe.png b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/netherquartz_pickaxe.png new file mode 100644 index 00000000..f5a6e778 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/pickaxe/netherquartz_pickaxe.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/shovel/bloodwood_shovel.png b/src/main/resources/assets/natura/textures/items/weapons/shovel/bloodwood_shovel.png new file mode 100644 index 00000000..556a0da5 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/shovel/bloodwood_shovel.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/shovel/darkwood_shovel.png b/src/main/resources/assets/natura/textures/items/weapons/shovel/darkwood_shovel.png new file mode 100644 index 00000000..51d58c18 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/shovel/darkwood_shovel.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/shovel/fusewood_shovel.png b/src/main/resources/assets/natura/textures/items/weapons/shovel/fusewood_shovel.png new file mode 100644 index 00000000..c8cc3cec Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/shovel/fusewood_shovel.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/shovel/ghostwood_shovel.png b/src/main/resources/assets/natura/textures/items/weapons/shovel/ghostwood_shovel.png new file mode 100644 index 00000000..4456f66b Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/shovel/ghostwood_shovel.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/shovel/netherquartz_shovel.png b/src/main/resources/assets/natura/textures/items/weapons/shovel/netherquartz_shovel.png new file mode 100644 index 00000000..2fbe3ae2 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/shovel/netherquartz_shovel.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/sword/bloodwood_sword.png b/src/main/resources/assets/natura/textures/items/weapons/sword/bloodwood_sword.png new file mode 100644 index 00000000..00fdb6a1 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/sword/bloodwood_sword.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/sword/darkwood_sword.png b/src/main/resources/assets/natura/textures/items/weapons/sword/darkwood_sword.png new file mode 100644 index 00000000..1e205505 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/sword/darkwood_sword.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/sword/fusewood_sword.png b/src/main/resources/assets/natura/textures/items/weapons/sword/fusewood_sword.png new file mode 100644 index 00000000..360df5fb Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/sword/fusewood_sword.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/sword/ghostwood_sword.png b/src/main/resources/assets/natura/textures/items/weapons/sword/ghostwood_sword.png new file mode 100644 index 00000000..645b4ad5 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/sword/ghostwood_sword.png differ diff --git a/src/main/resources/assets/natura/textures/items/weapons/sword/netherquartz_sword.png b/src/main/resources/assets/natura/textures/items/weapons/sword/netherquartz_sword.png new file mode 100644 index 00000000..0638bf16 Binary files /dev/null and b/src/main/resources/assets/natura/textures/items/weapons/sword/netherquartz_sword.png differ