From dad9234d85444099501bc2a4587e7ff64b244892 Mon Sep 17 00:00:00 2001 From: kitsushadow Date: Wed, 23 Nov 2016 19:41:46 -0500 Subject: [PATCH] BoilerPlate --- .../nmd/primal/forgecraft/ExampleMod.java | 20 - .../forgecraft/api/ForgeCraftBlocks.java | 320 +++++ .../forgecraft/api/ForgeCraftBounds.java | 73 + .../forgecraft/api/ForgeCraftItems.java | 232 ++++ .../forgecraft/api/ForgeCraftMaterials.java | 75 + .../forgecraft/api/ForgeCraftParticles.java | 6 + .../forgecraft/api/ForgeCraftRegistries.java | 259 ++++ .../forgecraft/api/ForgeCraftStates.java | 43 + .../forgecraft/client/ClientEvents.java | 6 + .../primal/forgecraft/client/ClientProxy.java | 340 +++++ .../client/render/MeshDefinitionFix.java | 32 + .../primal/forgecraft/common/CommonProxy.java | 117 ++ .../primal/forgecraft/common/CommonUtils.java | 7 + .../primal/forgecraft/common/ForgeCraft.java | 127 ++ .../forgecraft/common/compat/FuelHandler.java | 24 + .../forgecraft/common/init/ModBlocks.java | 472 +++++++ .../forgecraft/common/init/ModConfig.java | 575 ++++++++ .../forgecraft/common/init/ModCrafting.java | 1213 +++++++++++++++++ .../forgecraft/common/init/ModDictionary.java | 57 + .../forgecraft/common/init/ModEvents.java | 41 + .../forgecraft/common/init/ModFluids.java | 181 +++ .../forgecraft/common/init/ModInfo.java | 47 + .../forgecraft/common/init/ModItems.java | 124 ++ .../forgecraft/common/init/ModRegistries.java | 117 ++ .../common/init/ModSoundHandler.java | 33 + .../common/init/ModTileEntities.java | 28 + .../forgecraft/common/init/ModWorldGen.java | 36 + .../assets.forgecraft/lang/en_US.lang | 0 .../resources/assets.forgecraft/sounds.json | 0 .../textures/blocks/firebox_pins.png | Bin 0 -> 185 bytes .../textures/blocks/firebox_racks.png | Bin 0 -> 454 bytes src/main/resources/mcmod.info | 24 +- 32 files changed, 4596 insertions(+), 33 deletions(-) delete mode 100644 src/main/java/nmd/primal/forgecraft/ExampleMod.java create mode 100644 src/main/java/nmd/primal/forgecraft/api/ForgeCraftBlocks.java create mode 100644 src/main/java/nmd/primal/forgecraft/api/ForgeCraftBounds.java create mode 100644 src/main/java/nmd/primal/forgecraft/api/ForgeCraftItems.java create mode 100644 src/main/java/nmd/primal/forgecraft/api/ForgeCraftMaterials.java create mode 100644 src/main/java/nmd/primal/forgecraft/api/ForgeCraftParticles.java create mode 100644 src/main/java/nmd/primal/forgecraft/api/ForgeCraftRegistries.java create mode 100644 src/main/java/nmd/primal/forgecraft/api/ForgeCraftStates.java create mode 100644 src/main/java/nmd/primal/forgecraft/client/ClientEvents.java create mode 100644 src/main/java/nmd/primal/forgecraft/client/ClientProxy.java create mode 100644 src/main/java/nmd/primal/forgecraft/client/render/MeshDefinitionFix.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/CommonProxy.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/CommonUtils.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/ForgeCraft.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/compat/FuelHandler.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModBlocks.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModConfig.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModCrafting.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModDictionary.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModEvents.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModFluids.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModInfo.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModItems.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModRegistries.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModSoundHandler.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModTileEntities.java create mode 100644 src/main/java/nmd/primal/forgecraft/common/init/ModWorldGen.java create mode 100644 src/main/resources/assets.forgecraft/lang/en_US.lang create mode 100644 src/main/resources/assets.forgecraft/sounds.json create mode 100644 src/main/resources/assets.forgecraft/textures/blocks/firebox_pins.png create mode 100644 src/main/resources/assets.forgecraft/textures/blocks/firebox_racks.png diff --git a/src/main/java/nmd/primal/forgecraft/ExampleMod.java b/src/main/java/nmd/primal/forgecraft/ExampleMod.java deleted file mode 100644 index f01de148..00000000 --- a/src/main/java/nmd/primal/forgecraft/ExampleMod.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.example.examplemod; - -import net.minecraft.init.Blocks; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; - -@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION) -public class ExampleMod -{ - public static final String MODID = "examplemod"; - public static final String VERSION = "1.0"; - - @EventHandler - public void init(FMLInitializationEvent event) - { - // some example code - System.out.println("DIRT BLOCK >> "+Blocks.DIRT.getUnlocalizedName()); - } -} diff --git a/src/main/java/nmd/primal/forgecraft/api/ForgeCraftBlocks.java b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftBlocks.java new file mode 100644 index 00000000..0b0c210e --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftBlocks.java @@ -0,0 +1,320 @@ +package nmd.primal.forgecraft.api; + +import net.minecraft.block.Block; + +/// +// import static nmd.primal.core.api.ForgeCraftBlocks.*; +/// + +public class ForgeCraftBlocks +{ + public static Block WORKTABLE_MUD; + public static Block WORKTABLE_MUD_SLAB; + public static Block WORKTABLE_END; + public static Block WORKTABLE_NETHERSTONE; + public static Block WORKTABLE_SANDSTONE; + + public static Block WORKTABLE_ACACIA_LOG; + public static Block WORKTABLE_BIGOAK_LOG; + public static Block WORKTABLE_BIRCH_LOG; + public static Block WORKTABLE_JUNGLE_LOG; + public static Block WORKTABLE_OAK_LOG; + public static Block WORKTABLE_SPRUCE_LOG; + public static Block WORKTABLE_IRONWOOD_LOG; + + public static Block WORKTABLE_ACACIA; + public static Block WORKTABLE_BIGOAK; + public static Block WORKTABLE_BIRCH; + public static Block WORKTABLE_JUNGLE; + public static Block WORKTABLE_OAK; + public static Block WORKTABLE_SPRUCE; + public static Block WORKTABLE_NETHERPALM; + public static Block WORKTABLE_IRONWOOD; + + public static Block SHELF_FULL_ACACIA; + public static Block SHELF_FULL_BIGOAK; + public static Block SHELF_FULL_BIRCH; + public static Block SHELF_FULL_END; + public static Block SHELF_FULL_IRONWOOD; + public static Block SHELF_FULL_JUNGLE; + public static Block SHELF_FULL_MUD; + public static Block SHELF_FULL_NETHERPALM; + public static Block SHELF_FULL_NETHERRACK; + public static Block SHELF_FULL_NETHERSTONE; + public static Block SHELF_FULL_OAK; + public static Block SHELF_FULL_SANDSTONE; + public static Block SHELF_FULL_SPRUCE; + public static Block SHELF_FULL_STONE; + + public static Block SHELF_HALF_ACACIA; + public static Block SHELF_HALF_BIGOAK; + public static Block SHELF_HALF_BIRCH; + public static Block SHELF_HALF_END; + public static Block SHELF_HALF_IRONWOOD; + public static Block SHELF_HALF_JUNGLE; + public static Block SHELF_HALF_MUD; + public static Block SHELF_HALF_NETHERPALM; + public static Block SHELF_HALF_NETHERRACK; + public static Block SHELF_HALF_NETHERSTONE; + public static Block SHELF_HALF_OAK; + public static Block SHELF_HALF_SANDSTONE; + public static Block SHELF_HALF_SPRUCE; + + public static Block DRYING_RACK_ACACIA; + public static Block DRYING_RACK_BIGOAK; + public static Block DRYING_RACK_BIRCH; + public static Block DRYING_RACK_IRONWOOD; + public static Block DRYING_RACK_JUNGLE; + public static Block DRYING_RACK_NETHERPALM; + public static Block DRYING_RACK_OAK; + public static Block DRYING_RACK_SPRUCE; + + public static Block FISH_TRAP_ACACIA; + public static Block FISH_TRAP_BIGOAK; + public static Block FISH_TRAP_BIRCH; + public static Block FISH_TRAP_IRONWOOD; + public static Block FISH_TRAP_JUNGLE; + public static Block FISH_TRAP_NETHERPALM; + public static Block FISH_TRAP_OAK; + public static Block FISH_TRAP_SPRUCE; + + public static Block SLAT_ACACIA; + public static Block SLAT_BIGOAK; + public static Block SLAT_BIRCH; + public static Block SLAT_JUNGLE; + public static Block SLAT_OAK; + public static Block SLAT_SPRUCE; + public static Block SLAT_IRON; + public static Block SLAT_NETHERPALM; + public static Block SLAT_IRONWOOD; + + public static Block SLAB_ENDBRICK; + public static Block SLAB_ENDSTONE; + public static Block SLAB_NETHERRACK; + public static Block SLAB_NETHERSTONE; + public static Block SLAB_MUD; + public static Block SLAB_CARBONATE_BRICK; + public static Block SLAB_CARBONATE_FLAG; + public static Block SLAB_FERRO_BRICK; + public static Block SLAB_FERRO_FLAG; + public static Block SLAB_GLASS; + public static Block SLAB_NETHERPALM; + public static Block SLAB_IRONWOOD; + public static Block SLAB_SOULSTONE; + public static Block SLAB_STONEBRICK_MOSSY; + + public static Block THIN_SLAB_ACACIA; + public static Block THIN_SLAB_BIGOAK; + public static Block THIN_SLAB_BIRCH; + public static Block THIN_SLAB_CARBONATE_BRICK; + public static Block THIN_SLAB_CARBONATE_FLAG; + public static Block THIN_SLAB_ENDBRICK; + public static Block THIN_SLAB_ENDSTONE; + public static Block THIN_SLAB_FERRO_BRICK; + public static Block THIN_SLAB_FERRO_FLAG; + public static Block THIN_SLAB_GLASS; + public static Block THIN_SLAB_IRONWOOD; + public static Block THIN_SLAB_JUNGLE; + public static Block THIN_SLAB_MUD; + public static Block THIN_SLAB_NETHERBRICK; + public static Block THIN_SLAB_NETHERPALM; + public static Block THIN_SLAB_NETHERRACK; + public static Block THIN_SLAB_NETHERSTONE; + public static Block THIN_SLAB_OAK; + public static Block THIN_SLAB_SANDSTONE; + public static Block THIN_SLAB_SOULSTONE; + public static Block THIN_SLAB_SPRUCE; + public static Block THIN_SLAB_STONEBRICK; + public static Block THIN_SLAB_STONEBRICK_MOSSY; + public static Block THIN_SLAB_THATCH; + + public static Block GRATE_ACACIA; + public static Block GRATE_BIGOAK; + public static Block GRATE_BIRCH; + public static Block GRATE_CARBONATE_BRICK; + public static Block GRATE_CARBONATE_FLAG; + public static Block GRATE_ENDBRICK; + public static Block GRATE_ENDSTONE; + public static Block GRATE_FERRO_BRICK; + public static Block GRATE_FERRO_FLAG; + public static Block GRATE_IRONWOOD; + public static Block GRATE_JUNGLE; + public static Block GRATE_MUD; + public static Block GRATE_NETHERBRICK; + public static Block GRATE_NETHERPALM; + public static Block GRATE_NETHERRACK; + public static Block GRATE_NETHERSTONE; + public static Block GRATE_OAK; + public static Block GRATE_SANDSTONE; + public static Block GRATE_SOULSTONE; + public static Block GRATE_SPRUCE; + public static Block GRATE_STONEBRICK; + public static Block GRATE_STONEBRICK_MOSSY; + public static Block GRATE_THATCH; + + public static Block DRAIN_CARBONATE_BRICK; + public static Block DRAIN_CARBONATE_FLAG; + public static Block DRAIN_ENDSTONE; + public static Block DRAIN_ENDBRICK; + public static Block DRAIN_FERRO_BRICK; + public static Block DRAIN_FERRO_FLAG; + public static Block DRAIN_MUD; + public static Block DRAIN_NETHERBRICK; + public static Block DRAIN_NETHERRACK; + public static Block DRAIN_NETHERSTONE; + public static Block DRAIN_STONE; + public static Block DRAIN_STONEBRICK; + public static Block DRAIN_STONEBRICK_MOSSY; + public static Block DRAIN_THATCH; + + public static Block LANTERN_EMPTY; + public static Block LANTERN_TORCH; + public static Block LANTERN_NETHER; + public static Block LANTERN_REDSTONE; + public static Block LANTERN_IGNIS; + + public static Block TORCH_WOOD; + public static Block TORCH_NETHER; + public static Block TORCH_SMOKER; + public static Block JACK_O_LANTERN; + public static Block IGNIS_FATUUS; + + public static Block LEVER_WOOD; + public static Block LEVER_NETHER; + //public static Block NETHER_REDSTONE_TORCH; + + public static Block NETHERSTONE; + public static Block NETHERPALM_LOG; + public static Block NETHERPALM_PLANK; + public static Block IRONWOOD_LEAVES; + public static Block IRONWOOD_LOG; + public static Block IRONWOOD_PLANK; + public static Block SOULSTONE_NORMAL; + public static Block SOULSTONE_SMOOTH; + public static Block SOULSTONE_CHISELED; + public static Block SOULSTONE_FLAGSTONE; + + public static Block CARBONATE_STONE; + public static Block CARBONATE_FLAG; + public static Block CARBONATE_BRICK; + + public static Block FERRO_STONE; + public static Block FERRO_FLAG; + public static Block FERRO_BRICK; + + + public static Block TERRACOTTA_BRICK; + public static Block CINISCOTTA_BRICK; + public static Block DIRT_BRICK; + public static Block MUD_BRICK_DRY; + public static Block MUD_BRICK_WET; + public static Block MUD_BLOCK_DRY; + public static Block MUD_BLOCK_WET; + public static Block LOAM_BLOCK; + public static Block THATCH; + public static Block THATCH_WET; + + + /// + // ores, condensed blocks, metals, alloys + /// + public static Block ASH_BLOCK; + public static Block ASH_LAYER; + public static Block ASH_STABILIZED; + public static Block EARTHWAX_BLOCK; + public static Block TERRACLAY_BLOCK; + public static Block CINISCLAY_BLOCK; + + public static Block ORE_IRON; + + public static Block BRASS_BLOCK; + public static Block BRONZE_BLOCK; + public static Block COPPER_BLOCK; + public static Block LEAD_BLOCK; + public static Block PIGIRON_BLOCK; + public static Block SILVER_BLOCK; + public static Block TIN_BLOCK; + public static Block VANADIUM_BLOCK; + public static Block WOOTZ_BLOCK; + public static Block ZINC_BLOCK; + + public static Block SALT_HALITE_BLOCK; + public static Block SALT_NETJRY_BLOCK; + public static Block SALT_FIRE_BLOCK; + public static Block SALT_VOID_BLOCK; + + public static Block GRATED_GRAVEL; + public static Block NETHER_WOOL; + + /// + // Plants + /// + public static Block RUSHES; + public static Block CORN_STALK; + public static Block STRANGLE_WEED; + public static Block NETHER_GRASS; + public static Block NETHER_GRASS_GROWING; + public static Block SEARING_LACE_GROWING; + public static Block SEARING_LACE; + + /// + // sub-blocks + // stairs, walls, fences, slabs + /// + /// + public static Block STAIRS_DIRT; + public static Block STAIRS_GRASS; + public static Block STAIRS_NETHERRACK; + public static Block STAIRS_NETHERSTONE; + public static Block STAIRS_MUD; + public static Block STAIRS_NETHERPALM; + public static Block STAIRS_IRONWOOD; + public static Block STAIRS_CARBONATE_FLAG; + public static Block STAIRS_CARBONATE_BRICK; + public static Block STAIRS_FERRO_FLAG; + public static Block STAIRS_FERRO_BRICK; + public static Block STAIRS_COBBLESTONE_MOSSY; + public static Block STAIRS_STONEBRICK_MOSSY; + + public static Block WALL_NETHERRACK; + public static Block WALL_NETHERSTONE; + public static Block WALL_CARBONATE_FLAG; + public static Block WALL_CARBONATE_BRICK; + public static Block WALL_FERRO_FLAG; + public static Block WALL_FERRO_BRICK; + + public static Block FENCE_IRONWOOD; + public static Block FENCE_NETHERPALM; + + public static Block GATE_IRONWOOD; + public static Block GATE_NETHERPALM; + + public static Block PRESSPLATE_DIRT; + public static Block PRESSPLATE_GRASS; + public static Block PRESSPLATE_GLASS; + public static Block PRESSPLATE_SANDSTONE; + public static Block PRESSPLATE_NETHERRACK; + public static Block PRESSPLATE_NETHERSTONE; + public static Block PRESSPLATE_NETHERPALM; + public static Block PRESSPLATE_IRONWOOD; + public static Block PRESSPLATE_THATCH; + public static Block PRESSPLATE_CARBONATE_FLAG; + public static Block PRESSPLATE_FERRO_FLAG; + + public static Block STOCKADE_ACACIA; + public static Block STOCKADE_BIGOAK; + public static Block STOCKADE_BIRCH; + public static Block STOCKADE_IRONWOOD; + public static Block STOCKADE_JUNGLE; + public static Block STOCKADE_NETHERPALM; + public static Block STOCKADE_OAK; + public static Block STOCKADE_SPRUCE; + + public static Block CLEAN_OAK; + public static Block CLEAN_BIRCH; + public static Block CLEAN_SPRUCE; + public static Block CLEAN_JUNGLE; + public static Block CLEAN_BIG_OAK; + public static Block CLEAN_ACACIA; + public static Block CLEAN_IRONWOOD; +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/api/ForgeCraftBounds.java b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftBounds.java new file mode 100644 index 00000000..96aa5aeb --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftBounds.java @@ -0,0 +1,73 @@ +package nmd.primal.forgecraft.api; + +import net.minecraft.util.math.AxisAlignedBB; + +public class ForgeCraftBounds +{ + // ***************************************************************************** // + // Common Bounding Boxes + // ***************************************************************************** // + public static final AxisAlignedBB AABB_SOULSAND = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.875D, 1.0D); + public static final AxisAlignedBB AABB_FARMLAND = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.9375D, 1.0D); + + public static final AxisAlignedBB AABB_NARROW_CUBE = new AxisAlignedBB(0.26D, 0.0D, 0.26D, 0.74D, 1.0D, 0.74D); + + public static final AxisAlignedBB AABB_BUSH = new AxisAlignedBB(0.30000001192092896D, 0.0D, 0.30000001192092896D, 0.699999988079071D, 0.6000000238418579D, 0.699999988079071D); + public static final AxisAlignedBB[] AABB_CROPS = 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)}; + + + // ***************************************************************************** // + // Block/Model Specific Bounding Boxes + // ***************************************************************************** // + public static final AxisAlignedBB AABB_DRYING_RACK = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.9375D, 0.9375D); + + // TODO: this should be broken into two, to account for orientation. For the time being one size fits either direction is OK. + public static final AxisAlignedBB AABB_FISH_TRAP = new AxisAlignedBB(0.15D, 0.0D, 0.15D, 0.85D, 0.5D, 0.85D); + + public static final AxisAlignedBB AABB_LANTERN_UP = new AxisAlignedBB(0.32D, 0.0D, 0.32D, 0.68D, 0.75D, 0.68D); + public static final AxisAlignedBB AABB_LANTERN = new AxisAlignedBB(0.32D, 0.07D, 0.32D, 0.68D, 0.93D, 0.68D); + + public static final AxisAlignedBB AABB_SLAT_TOP_FULL = new AxisAlignedBB(0.0D, 0.815D, 0.0D, 1.0D, 0.935D, 1.0D); + public static final AxisAlignedBB AABB_SLAT_BOTTOM_FULL = new AxisAlignedBB(0.0D, 0.065D, 0.0D, 1.0D, 0.185D, 1.0D); + + public static final AxisAlignedBB AABB_SLAT_TOP_EAST = new AxisAlignedBB(0.0D, 0.815D, 0.0D, 0.875D, 0.935D, 1.0D); + public static final AxisAlignedBB AABB_SLAT_BOTTOM_EAST = new AxisAlignedBB(0.0D, 0.065D, 0.0D, 0.875D, 0.185D, 1.0D); + + public static final AxisAlignedBB AABB_SLAT_TOP_WEST = new AxisAlignedBB(0.125D, 0.815D, 0.0D, 1.0D, 0.935D, 1.0D); + public static final AxisAlignedBB AABB_SLAT_BOTTOM_WEST = new AxisAlignedBB(0.125D, 0.065D, 0.0D, 1.0D, 0.185D, 1.0D); + + public static final AxisAlignedBB AABB_SLAT_TOP_NORTH = new AxisAlignedBB(0.0D, 0.815D, 0.125D, 1.0D, 0.935D, 1.0D); + public static final AxisAlignedBB AABB_SLAT_BOTTOM_NORTH = new AxisAlignedBB(0.0D, 0.065D, 0.125D, 1.0D, 0.185D, 1.0D); + + public static final AxisAlignedBB AABB_SLAT_TOP_SOUTH = new AxisAlignedBB(0.0D, 0.815D, 0.0D, 1.0D, 0.935D, 0.875D); + public static final AxisAlignedBB AABB_SLAT_BOTTOM_SOUTH = new AxisAlignedBB(0.0D, 0.065D, 0.0D, 1.0D, 0.185D, 0.875D); + + public static final AxisAlignedBB AABB_SLAB_BOTTOM = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D); + public static final AxisAlignedBB AABB_SLAB_TOP = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D); + + public static final AxisAlignedBB AABB_SLAB_VERTICAL_SOUTH = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.5D); + public static final AxisAlignedBB AABB_SLAB_VERTICAL_NORTH = new AxisAlignedBB(0.0D, 0.0D, 0.5D, 1.0D, 1.0D, 1.0D); + public static final AxisAlignedBB AABB_SLAB_VERTICAL_WEST = new AxisAlignedBB(0.5D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); + public static final AxisAlignedBB AABB_SLAB_VERTICAL_EAST = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.5D, 1.0D, 1.0D); + + public static final AxisAlignedBB AABB_THIN_SLAB_BOTTOM = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.1875D, 1.0D); + public static final AxisAlignedBB AABB_THIN_SLAB_TOP = new AxisAlignedBB(0.0D, 0.8125D, 0.0D, 1.0D, 1.0D, 1.0D); + + public static final AxisAlignedBB AABB_PALM_CORE = new AxisAlignedBB(0.32D, 0.0D, 0.32D, 0.68D, 1.0D, 0.68D); + public static final AxisAlignedBB AABB_IGNIS_FATUUS = new AxisAlignedBB(0.5D, 0.3D, 0.5D, 0.6D, 0.5D, 0.6D); + + + // ***************************************************************************** // + // Layers, pretty much the same as vanilla snow, why am I here? + // ***************************************************************************** // + public static final AxisAlignedBB[] AABB_LAYERS = new AxisAlignedBB[] { + new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.0D, 1.0D), + 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)}; +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/api/ForgeCraftItems.java b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftItems.java new file mode 100644 index 00000000..1828931f --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftItems.java @@ -0,0 +1,232 @@ +package nmd.primal.forgecraft.api; + +import net.minecraft.item.Item; + +/// +// import static nmd.primal.core.api.ForgeCraftItems.*; +/// + +public class ForgeCraftItems +{ + /// + // Ores + /// + public static Item TEST; + /*public static Item EARTHWAX_CLUMP; + public static Item CINISCLAY_CLUMP; + public static Item CINISCLAY; + public static Item CINISCOTTA; + public static Item TERRACLAY_CLUMP; + public static Item TERRACLAY; + public static Item TERRACOTTA; + public static Item MUDBRICK_SOFT; + public static Item MUDBRICK_DRY; + public static Item CARBONATE_SLACK; + public static Item CARBONATE_FERRO_SLACK; + + public static Item BRASS_DUST; + public static Item BRASS_INGOT; + public static Item BRASS_NUGGET; + + public static Item BRONZE_DUST; + public static Item BRONZE_INGOT; + public static Item BRONZE_NUGGET; + + public static Item COPPER_DUST; + public static Item COPPER_INGOT; + public static Item COPPER_NUGGET; + + public static Item LEAD_DUST; + public static Item LEAD_INGOT; + public static Item LEAD_NUGGET; + + public static Item PIGIRON_DUST; + public static Item PIGIRON_INGOT; + public static Item PIGIRON_NUGGET; + + public static Item SILVER_DUST; + public static Item SILVER_INGOT; + public static Item SILVER_NUGGET; + + public static Item TIN_DUST; + public static Item TIN_INGOT; + public static Item TIN_NUGGET; + + public static Item VANADIUM_DUST; + public static Item VANADIUM_INGOT; + public static Item VANADIUM_NUGGET; + + public static Item WOOTZ_DUST; + public static Item WOOTZ_INGOT; + public static Item WOOTZ_NUGGET; + + public static Item ZINC_DUST; + public static Item ZINC_INGOT; + public static Item ZINC_NUGGET; + + public static Item SALT_HALITE_DUST; + public static Item SALT_NETJRY_DUST; + public static Item SALT_FIRE_DUST; + public static Item SALT_VOID_DUST; + + /// + // Parts + /// + public static Item MUCK; + public static Item ROCK; + public static Item MORTAR; + public static Item MUD_CLUMP; + public static Item FLINT_KNAPP; + public static Item FLINT_POINT; + public static Item OBSIDIAN_SHARD; + public static Item OBSIDIAN_KNAPP; + public static Item OBSIDIAN_POINT; + public static Item OBSIDIAN_LENS; + public static Item OPAL_KNAPP; + public static Item OPAL_POINT; + public static Item DIAMOND_KNAPP; + public static Item DIAMOND_POINT; + public static Item EMERALD_KNAPP; + public static Item EMERALD_POINT; + public static Item PLANT_FIBER; + public static Item PLANT_CORDAGE; + public static Item PLANT_CLOTH; + public static Item PLANT_TINDER; + public static Item LEATHER_STRIP; + public static Item LEATHER_CORDAGE; + public static Item SILK_CORDAGE; + public static Item SILK_CORDAGE_COILED; + public static Item STONE_BASIN; + public static Item IRON_STRANDS; + public static Item IRON_PIN; + public static Item IRON_RING; + public static Item IRON_MESH; + public static Item IRON_PLATE; + public static Item IRON_SHEET; + public static Item WOOD_PIN; + public static Item THATCHING_WET; + public static Item THATCHING_DRY; + public static Item RUSH_STEMS; + public static Item RUSH_TIPS; + public static Item RUSH_TIPS_BLOOM; + //public static Item CORN_STALK; + + public static Item BARK_ACACIA; + public static Item BARK_BIGOAK; + public static Item BARK_BIRCH; + public static Item BARK_IRONWOOD; + public static Item BARK_JUNGLE; + public static Item BARK_OAK; + public static Item BARK_NETHERPALM; + public static Item BARK_SPRUCE; + + public static Item LEAF_ACACIA; + public static Item LEAF_BIGOAK; + public static Item LEAF_BIRCH; + public static Item LEAF_IRONWOOD; + public static Item LEAF_JUNGLE; + public static Item LEAF_NETHERPALM; + public static Item LEAF_SPRUCE; + + /// + // Foodstuff Items + /// + public static Item SUET; + public static Item LARD; + public static Item SALO; + public static Item FISH_LAVAWORM_RAW; + public static Item FISH_LAVAWORM_SALTED; + public static Item FISH_LAVAWORM_DRIED; + public static Item FISH_LAVAWORM_CURED; + public static Item FISH_LAVAWORM_ROTTEN; + public static Item FISH_COD_ROTTEN; + public static Item FISH_COD_DRIED; + public static Item FISH_COD_SALTED; + public static Item FISH_COD_CURED; + public static Item FISH_SALMON_ROTTEN; + public static Item FISH_SALMON_DRIED; + public static Item FISH_SALMON_SALTED; + public static Item FISH_SALMON_CURED; + public static Item FISH_CLOWN_ROTTEN; + public static Item FISH_CLOWN_DRIED; + public static Item FISH_CLOWN_SALTED; + public static Item FISH_CLOWN_CURED; + public static Item FISH_PUFFER_ROTTEN; + public static Item FISH_PUFFER_DRIED; + public static Item FISH_PUFFER_SALTED; + public static Item FISH_PUFFER_CURED; + public static Item HORSE_MEAT_RAW; + public static Item HORSE_MEAT_COOKED; + public static Item CHEESE_WHITE; + public static Item CORN_COB; + public static Item CORN_BREAD; + public static Item CORN_GROUND; + public static Item WHEAT_GROUND; + + /// + // Seeds + /// + public static Item CORN_SEEDS; + public static Item RUSH_SEEDS; + + /// + // Tools + /// + public static Item GOLDEN_STICK; + public static Item FIRE_BOW; + public static Item SHARP_BONE; + public static Item STONE_GALLAGHER; + public static Item FLINT_WORKBLADE; + public static Item FLINT_SHEARS; + public static Item FLINT_HATCHET; + public static Item FLINT_AXE; + public static Item FLINT_PICKAXE; + public static Item FLINT_SHOVEL; + public static Item FLINT_HOE; + public static Item FLINT_SAW; + public static Item IRON_SAW; + public static Item IRON_CLIPPERS; + public static Item NETHER_FISHING_ROD; + + /// + // Nether + /// + public static Item QUARTZ_KNAPP; + public static Item QUARTZ_POINT; + public static Item NETHER_FIBER; + public static Item NETHER_CORDAGE; + public static Item NETHER_CLOTH; + public static Item NETHER_TINDER; + + public static Item NETHER_GALLAGHER; + public static Item QUARTZ_GALLAGHER; + public static Item QUARTZ_WORKBLADE; + public static Item QUARTZ_SHEARS; + public static Item QUARTZ_HATCHET; + public static Item QUARTZ_AXE; + public static Item QUARTZ_PICKAXE; + public static Item QUARTZ_SHOVEL; + public static Item QUARTZ_HOE; + public static Item QUARTZ_SAW; + public static Item QUARTZ_CLIPPERS; + + public static Item TORCH_NETHER_LIT; + public static Item TORCH_WOOD_LIT; + public static Item IRONWOOD_STICK; + public static Item NETHERPALM_STICK; + public static Item NETHERPALM_PIN; + + public static Item PALM_SEED; + public static Item VALUS_SEEDS; + + /// + // Projectiles + /// + public static Item ARROW_QUARTZ; + public static Item ARROW_TORCH_WOOD; + public static Item ARROW_TORCH_NETHER; + public static Item ARROW_WATER; + public static Item ARROW_SILVER; + public static Item ARROW_GOLD; +*/ +} diff --git a/src/main/java/nmd/primal/forgecraft/api/ForgeCraftMaterials.java b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftMaterials.java new file mode 100644 index 00000000..da9a9666 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftMaterials.java @@ -0,0 +1,75 @@ +package nmd.primal.forgecraft.api; + +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.init.SoundEvents; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; +import net.minecraftforge.common.util.EnumHelper; + +public class ForgeCraftMaterials +{ + /** + * Vanilla ToolMaterials + * ToolMaterial addToolMaterial(String name, int harvestLevel, int maxUses, float efficiency, float damage, int enchantability) + * + * WOOD(0, 59, 2.0F, 0.0F, 15), + * STONE(1, 131, 4.0F, 1.0F, 5), + * IRON(2, 250, 6.0F, 2.0F, 14), + * DIAMOND(3, 1561, 8.0F, 3.0F, 10), + * GOLD(0, 32, 12.0F, 0.0F, 22); + * + * CLOTH(5, new int[]{1, 3, 2, 1}, 15), CHAIN(15, new int[]{2, 5, 4, 1}, 12), IRON(15, new int[]{2, 6, 5, 2}, 9), GOLD(7, new int[]{2, 5, 3, 1}, 25), DIAMOND(33, new int[]{3, 8, 6, 3}, 10); + * + * survivalist + * "flint", 1, 150, 5.0F, 1.5F, 5 + */ + //Tool ToolMaterials + //public static Item.ToolMaterial TOOL_BONE = EnumHelper.addToolMaterial("BONE", 0, 64, 2.0F, 0, 16); + + + //Armor ToolMaterials + //public static ItemArmor.ArmorMaterial ARMOR_BONE = EnumHelper.addArmorMaterial("BONE", "", 8, new int[]{3, 7, 6, 3}, 10, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 1.0F); + + + /// + // Block Materials + /// + + public boolean canBurn; + public boolean replaceable; + public boolean isTranslucent; + public boolean requiresNoTool = true; + + //public static final Material CRAFTED_SNOW = (new Material(MapColor.SNOW)).setRequiresTool(); + //public static final Material ASH; + + + /** + * Marks the material as translucent + */ + private Material setTranslucent(Material material) + { + this.isTranslucent = true; + return material; + } + + /** + * Makes blocks with this material require the correct tool to be harvested. + */ + protected Material setRequiresTool(Material material) + { + this.requiresNoTool = false; + return material; + } + + /** + * Set the canBurn bool to True and return the current object. + */ + protected Material setBurning(Material material) + { + this.canBurn = true; + return material; + } + +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/api/ForgeCraftParticles.java b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftParticles.java new file mode 100644 index 00000000..3393e2b9 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftParticles.java @@ -0,0 +1,6 @@ +package nmd.primal.forgecraft.api; + +public enum ForgeCraftParticles +{ + MUCK, ROCK, SMOKE, STEAM; +} diff --git a/src/main/java/nmd/primal/forgecraft/api/ForgeCraftRegistries.java b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftRegistries.java new file mode 100644 index 00000000..3c1eaf4e --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftRegistries.java @@ -0,0 +1,259 @@ +package nmd.primal.forgecraft.api; + +import com.google.common.collect.Lists; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.SoundEvent; +import org.apache.commons.lang3.tuple.Triple; + +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.List; + +public class ForgeCraftRegistries +{ + /******************************************************************************* + * + */ + + + /******************************************************************************* + * Parent Block Registry, this will kick off crafting for slabs, stairs, etc.. + */ + public static List PARENT_BLOCK_REGISTRY = new ArrayList<>(); + + public static void addParentBlock(ItemStack stack) + { + ForgeCraftRegistries.PARENT_BLOCK_REGISTRY.add(stack); + } + + /******************************************************************************* + * Fuel Registry + */ + public static Hashtable FUEL_REGISTRY = new Hashtable<>(); + + public static void addFuel(ItemStack stack, int value) + { + ForgeCraftRegistries.FUEL_REGISTRY.put(stack, value); + } + + + /******************************************************************************* + * Torch Registry + */ + public static List TORCH_REGISTRY = new ArrayList<>(); + + public static void addTorch(ItemStack stack) + { + ForgeCraftRegistries.TORCH_REGISTRY.add(stack); + } + + public static boolean isTorch(ItemStack stack) + { + for (ItemStack list : ForgeCraftRegistries.TORCH_REGISTRY) { + if (list.isItemEqual(stack)) + return true; + } + + return false; + } + + /******************************************************************************* + * Crafting Registries + * + * EXAMPLE: + * ForgeCraftRegistries.addBladeRecipe(new ItemStack(ModItems.CORN_COB), new ItemStack(ModItems.CORN_SEEDS, 1)); + * ForgeCraftRegistries.addBladeRecipe("bone", new ItemStack(ModItems.SHARP_BONE, 1)); + * + */ + /// + // crafting matrix items + /// + public static Hashtable CRAFTING_MATRIX_ITEM_REGISTRY = new Hashtable<>(); + + public static void addCraftingItem(Item item, @Nullable SoundEvent sound) + { + ForgeCraftRegistries.CRAFTING_MATRIX_ITEM_REGISTRY.put(item, sound); + } + + /// + // in-world knapping recipes + /// + public static final List> KNAPPING_RECIPE_REGISTRY = Lists.newArrayList(); + + public static Hashtable CRAFTING_KNAPPING_OUTPUT_REGISTRY = new Hashtable<>(); + public static Hashtable CRAFTING_KNAPPING_HARDNESS_REGISTRY = new Hashtable<>(); + + public static void addKnappingRecipe(Item item, ItemStack output, float hardness) + { + ForgeCraftRegistries.CRAFTING_KNAPPING_OUTPUT_REGISTRY.put(item, output); + ForgeCraftRegistries.CRAFTING_KNAPPING_HARDNESS_REGISTRY.put(item, hardness); + } + + /// + // Stone Basin Recipes + /// + public static Hashtable BASIC_KERN_CRAFTING_REGISTRY = new Hashtable<>(); + + public static void addBasicKernRecipe(String in, ItemStack out) + { + ForgeCraftRegistries.BASIC_KERN_CRAFTING_REGISTRY.put(in, out); + } + + public static void addBasicKernRecipe(ItemStack in, ItemStack out) + { + ForgeCraftRegistries.BASIC_KERN_CRAFTING_REGISTRY.put(in, out); + } + + /// + // Axe Recipes + /// + public static final List> AXE_RECIPES = Lists.newArrayList(); + + public static Hashtable AXE_CRAFTING_REGISTRY = new Hashtable<>(); + public static Hashtable AXE_SIDE_CRAFTING_REGISTRY = new Hashtable<>(); + public static Hashtable AXE_REGISTRY = new Hashtable<>(); + + public static void addAxe(Item item, Integer level) + { + ForgeCraftRegistries.AXE_REGISTRY.put(item, level); + } + + public static void addAxeRecipe(String in, ItemStack out) + { + ForgeCraftRegistries.AXE_CRAFTING_REGISTRY.put(in, out); + } + + public static void addAxeRecipe(ItemStack in, ItemStack out) + { + ForgeCraftRegistries.AXE_CRAFTING_REGISTRY.put(in, out); + } + + + public static void addAxeSideRecipe(String in, ItemStack out) + { + ForgeCraftRegistries.AXE_SIDE_CRAFTING_REGISTRY.put(in, out); + } + + public static void addAxeSideRecipe(ItemStack in, ItemStack out) + { + ForgeCraftRegistries.AXE_SIDE_CRAFTING_REGISTRY.put(in, out); + } + + /// + // HandClipper Recipes + /// + public static Hashtable BASIC_CLIPPER_CRAFTING_REGISTRY = new Hashtable<>(); + public static Hashtable CLIPPER_REGISTRY = new Hashtable<>(); + + public static void addClipper(Item item, Integer level) + { + ForgeCraftRegistries.CLIPPER_REGISTRY.put(item, level); + } + + public static void addBasicClipperRecipe(String in, ItemStack out) + { + ForgeCraftRegistries.BASIC_CLIPPER_CRAFTING_REGISTRY.put(in, out); + } + + public static void addBasicClipperRecipe(ItemStack in, ItemStack out) + { + ForgeCraftRegistries.BASIC_CLIPPER_CRAFTING_REGISTRY.put(in, out); + } + + /// + // WorkBlade Recipes + /// + public static Hashtable WORKBLADE_CRAFTING_REGISTRY = new Hashtable<>(); + public static Hashtable WORKBLADE_REGISTRY = new Hashtable<>(); + + public static void addBlade(Item item, Integer level) + { + ForgeCraftRegistries.WORKBLADE_REGISTRY.put(item, level); + } + + public static void addBladeRecipe(String in, ItemStack out) + { + ForgeCraftRegistries.WORKBLADE_CRAFTING_REGISTRY.put(in, out); + } + + public static void addBladeRecipe(ItemStack in, ItemStack out) + { + ForgeCraftRegistries.WORKBLADE_CRAFTING_REGISTRY.put(in, out); + } + + /// + // Gallagher Recipes + /// + public static Hashtable GALLAGHER_CRAFTING_REGISTRY = new Hashtable<>(); + public static Hashtable GALLAGHER_REGISTRY = new Hashtable<>(); + + public static void addGallagher(Item item, Integer level) + { + ForgeCraftRegistries.GALLAGHER_REGISTRY.put(item, level); + } + + public static void addGallagherRecipe(String in, ItemStack out) + { + ForgeCraftRegistries.GALLAGHER_CRAFTING_REGISTRY.put(in, out); + } + + public static void addGallagherRecipe(ItemStack in, ItemStack out) + { + ForgeCraftRegistries.GALLAGHER_CRAFTING_REGISTRY.put(in, out); + } + + + /// + // Drying Rack + /// + //public static final List> DRYING_RACK_CRAFTING_REGISTRY = Lists.newArrayList(); + //public static HashMap DRYING_RACK_CRAFTING_REGISTRY = new HashMap<>(); + public static HashMap DRYING_RACK_CRAFTING_REGISTRY = new HashMap<>(); + + public static void addDryingRackRecipe(Item in, Item out) + { + ForgeCraftRegistries.DRYING_RACK_CRAFTING_REGISTRY.put(in, out); + } + + /******************************************************************************* + * Tool & Armor Registries + */ + /// + // Tool Repair Materials + /// + public static Hashtable TOOL_REPAIR_MATERIALS = new Hashtable<>(); + + public static void addToolRepairItem(Item.ToolMaterial toolMaterial, ItemStack repairStack) + { + ForgeCraftRegistries.TOOL_REPAIR_MATERIALS.put(repairStack, toolMaterial); + } + + /// + // Tool Break by-Products + /// + public static Hashtable TOOL_BREAK_ITEMS = new Hashtable<>(); + + public static void addToolBreakItem(Item tool, ItemStack[] stacks) + { + ForgeCraftRegistries.TOOL_BREAK_ITEMS.put(tool, stacks); + } + + /******************************************************************************* + * Entity Registries + */ + /// + // Entity Drops + /// + //public static Hashtable ENTITY_CUSTOM_DROP_REGISTRY = new Hashtable<>(); + //public static void addEntityDrop(EntityLivingBase entity, ItemStack[] stacks) + //{ + // ForgeCraftRegistries.ENTITY_CUSTOM_DROP_REGISTRY.put(entity, stacks); + //} + + /******************************************************************************* + * .. + */ +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/api/ForgeCraftStates.java b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftStates.java new file mode 100644 index 00000000..663f22db --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/api/ForgeCraftStates.java @@ -0,0 +1,43 @@ +package nmd.primal.forgecraft.api; + +import net.minecraft.block.properties.PropertyBool; +import net.minecraft.block.properties.PropertyDirection; +import net.minecraft.block.properties.PropertyInteger; + +/** + * Any Blockstate that might need to be shared or accessed through the API should be created here + */ +public class ForgeCraftStates +{ + public static final PropertyBool BLOOM = PropertyBool.create("bloom"); + public static final PropertyBool LIT = PropertyBool.create("lit"); + + public static final PropertyDirection FACING = PropertyDirection.create("facing"); + + public static final PropertyInteger DENSITY = PropertyInteger.create("density", 0, 7); + public static final PropertyInteger SOIL = PropertyInteger.create("soil", 0, 15); + public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 7); + + /** + * this is basically the same as vanilla snow + */ + public static final PropertyInteger LAYERS = PropertyInteger.create("layers", 1, 8); + + /** + * vanilla mining overlay consists of 0-9 states + * + */ + public static final PropertyInteger CRACKED = PropertyInteger.create("layers", 0, 9); + + /** + * Vanilla MOISTURE levels for farmland 0-7 + * Primal DAMPNESS levels 0-2 leaving space to support horizontal facing + * simulate the higher resolution by slowing down DAMPNESS changes + */ + public static final PropertyInteger MOISTURE = PropertyInteger.create("moisture", 0, 7); + public static final PropertyInteger DAMPNESS = PropertyInteger.create("dampness", 0, 2); + + // old states + // PrimalFacing-like Block positions, TOP = true, BOTTOM = false + //public static final PropertyBool HALF = PropertyBool.create("half"); +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/client/ClientEvents.java b/src/main/java/nmd/primal/forgecraft/client/ClientEvents.java new file mode 100644 index 00000000..b29a2384 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/client/ClientEvents.java @@ -0,0 +1,6 @@ +package nmd.primal.forgecraft.client; + +public class ClientEvents +{ + +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/client/ClientProxy.java b/src/main/java/nmd/primal/forgecraft/client/ClientProxy.java new file mode 100644 index 00000000..da3f7910 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/client/ClientProxy.java @@ -0,0 +1,340 @@ +package nmd.primal.forgecraft.client; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.Particle; +import net.minecraft.client.renderer.block.model.ModelBakery; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.client.renderer.block.statemap.StateMapperBase; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.Entity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.fml.client.registry.ClientRegistry; +import net.minecraftforge.fml.client.registry.IRenderFactory; +import net.minecraftforge.fml.client.registry.RenderingRegistry; +import nmd.primal.forgecraft.client.render.MeshDefinitionFix; +import nmd.primal.forgecraft.common.init.ModFluids; +import nmd.primal.forgecraft.common.init.ModInfo; +import java.util.ArrayList; +import java.util.List; +import nmd.primal.forgecraft.common.CommonProxy; +import nmd.primal.forgecraft.common.CommonUtils; + +/** + * Created by kitsu on 11/23/2016. + */ +public class ClientProxy extends CommonProxy +{ + public static Minecraft minecraft = Minecraft.getMinecraft(); + + @Override + public Object getClient() { + return FMLClientHandler.instance().getClient(); + } + + @Override + public World getClientWorld() { + return FMLClientHandler.instance().getClient().theWorld; + } + + @Override + public void registerClientEvents() + { + //CommonUtils.debugLogger(2, "proxy test", "client events"); + + //MinecraftForge.EVENT_BUS.register(new GuiEventHandler()); + MinecraftForge.EVENT_BUS.register(new ClientEvents()); + } + + @Override + public void preInit() { + this.registerRendering(); + this.registerFluidModels(); + } + + @Override + public void init() { + this.registerTileRendering(); + } + + @Override + public void postInit() { + + } + + @Override + public void registerRendering() + { + /// + // Projectile Entities + /// + //registerEntityRenderer(EntityMuckBall.class, RenderMuck.class); + //registerEntityRenderer(EntityRock.class, RenderRock.class); + //registerEntityRenderer(EntityQuartzArrow.class, RenderArrowQuartz.class); + //registerEntityRenderer(EntityTorchArrow.class, RenderArrowTorchWood.class); + //registerEntityRenderer(EntityTorchArrowNether.class, RenderArrowTorchNether.class); + //registerEntityRenderer(EntityTorchArrow.class, RenderArrowTorchWood.class); + } + + @Override + public void registerTileRendering() + { + /// + // Tiles + /// + //ClientRegistry.bindTileEntitySpecialRenderer(TileWorkTableBasic.class, new TileWorkTableBasicRender()); + //ClientRegistry.bindTileEntitySpecialRenderer(TileWorkTableShelf.class, new TileWorkTableShelfRender()); + //ClientRegistry.bindTileEntitySpecialRenderer(TileShelf.class, new TileShelfRender()); + //ClientRegistry.bindTileEntitySpecialRenderer(TileDryingRack.class, new TileDryingRackRender()); + } + + @Override + public void renderBlock(Block block) + { + minecraft.getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); + } + + @Override + public void renderItem(Item item) + { + minecraft.getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); + } + + @Override + public void registerBlockSided(Block block) + { + Item item = Item.getItemFromBlock(block); + ResourceLocation location = block.getRegistryName(); + //CommonUtils.debugLogger(2, "block item render", "1: " + location); + + if (item!=null) + { + ModelBakery.registerItemVariants(item, new ResourceLocation(ModInfo.MOD_ID, block.getUnlocalizedName())); + ModelLoader.setCustomModelResourceLocation(item, block.getMetaFromState(block.getDefaultState()), new ModelResourceLocation(location, "inventory")); + } + + //Register colour handlers + //if (bopBlock.getBlockColor() != null || bopBlock.getItemColor() != null) + //{ + // blocksToColour.add(block); + //} + + } + + @Override + public void registerItemSided(Item item) + { + // register sub types if there are any + if (item.getHasSubtypes()) + { + List subItems = new ArrayList(); + item.getSubItems(item, ModInfo.TAB_FORGECRAFT, subItems); + for (ItemStack subItem : subItems) + { + String subItemName = item.getUnlocalizedName(subItem); + subItemName = subItemName.substring(subItemName.indexOf(".") + 1); // remove 'item.' from the front + + //CommonUtils.debugLogger(2, "item render", "1: " + subItemName.substring(7)); + //ModelBakery.registerItemVariants(item, new ResourceLocation(ModInfo.MOD_ID, subItemName)); + ModelBakery.registerItemVariants(item, new ResourceLocation(ModInfo.MOD_ID, subItemName.substring(7))); + ModelLoader.setCustomModelResourceLocation(item, subItem.getMetadata(), new ModelResourceLocation(ModInfo.MOD_ID + ":" + subItemName, "inventory")); + } + } + else + { + //CommonUtils.debugLogger(2, "item render", "2: " + item.delegate.name().getResourcePath()); + ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(ModInfo.MOD_ID + ":" + item.delegate.name().getResourcePath(), "inventory")); + } + + //Register colour handlers + //if (item instanceof IColoredItem && ((IColoredItem)item).getItemColor() != null) + //{ + // this.itemsToColor.add(item); + //} + } + + + @Override + public void registerItemVariantModel(Item item, String name, int metadata) + { + if (item != null) + { + ModelBakery.registerItemVariants(item, new ResourceLocation(ModInfo.MOD_PREFIX + name)); + ModelLoader.setCustomModelResourceLocation(item, metadata, new ModelResourceLocation(ModInfo.MOD_PREFIX + name, "inventory")); + } + } + + @Override + public void registerFluidBlockRendering(Block block, String name) + { + final ModelResourceLocation fluidLocation = new ModelResourceLocation(ModInfo.MOD_ID.toLowerCase() + ":fluids", name); + + // use a custom state mapper which will ignore the LEVEL property + ModelLoader.setCustomStateMapper(block, new StateMapperBase() + { + @Override + protected ModelResourceLocation getModelResourceLocation(IBlockState state) + { + return fluidLocation; + } + }); + } + + + //@Override + //public void registerFluidModels() + { + ModFluids.FLUID_BLOCKS.forEach(this::registerFluidModel); + } + + @Override + public void registerFluidModel(IFluidBlock fluidBlock) + { + //ModelResourceLocation location = new ModelResourceLocation(ModInfo.MOD_PREFIX, fluidBlock.getFluid().getName()); + ModelResourceLocation location = new ModelResourceLocation(ModInfo.MOD_PREFIX + "fluids", fluidBlock.getFluid().getName()); + //CommonUtils.debugLogger(2, "Fluid models", "location: " + location); + + final Item item = Item.getItemFromBlock((Block) fluidBlock); + assert item != null; + + ModelBakery.registerItemVariants(item); + ModelLoader.setCustomMeshDefinition(item, MeshDefinitionFix.create(stack -> location)); + //ModelLoader.setCustomStateMapper((Block) fluidBlock, new StateMapperBase() + /*{ + @Override + protected ModelResourceLocation getModelResourceLocation(IBlockState p_178132_1_) + { + return location; + } + }); + */ + + //itemsRegistered.add(item); + } + + public void registerFluidRendering2(IFluidBlock fluidBlock, String name) + { + ModelResourceLocation location = new ModelResourceLocation(ModInfo.MOD_PREFIX + "fluids", name); + //CommonUtils.debugLogger(2, "Fluid models", "location: " + location); + + Item item = Item.getItemFromBlock((Block) fluidBlock); + assert item != null; + + ModelBakery.registerItemVariants(item); + //ModelLoader.setCustomMeshDefinition(item, MeshDefinitionFix.create(stack -> location)); + + + ModelLoader.setCustomMeshDefinition(item, new ItemMeshDefinition() { + @Override + public ModelResourceLocation getModelLocation(ItemStack stack) { + return location; + } + }); + + + ModelLoader.setCustomStateMapper((Block) fluidBlock, new StateMapperBase() { + @Override + protected ModelResourceLocation getModelResourceLocation(IBlockState state) { + return location; + } + }); + + + } + + /*@Override + public void spawnParticle(ForgeCraftParticles particle, double x, double y, double z, Object... info) + { + Minecraft minecraft = Minecraft.getMinecraft(); + Particle entityFx; + int item_id; + + switch (particle) + { + case MUCK: + item_id = Item.getIdFromItem(ForgeCraftItems.MUCK); + minecraft.theWorld.spawnParticle(EnumParticleTypes.ITEM_CRACK, x, y, z, MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), new int[] { item_id }); + return; + case ROCK: + item_id = Item.getIdFromItem(ForgeCraftItems.ROCK); + minecraft.theWorld.spawnParticle(EnumParticleTypes.ITEM_CRACK, x, y, z, MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), new int[] { item_id }); + return; + default: + entityFx = null; + break; + } + + if (entityFx != null) { + minecraft.effectRenderer.addEffect(entityFx); + } + }*/ + + private static void registerEntityRenderer(Class entityClass, Class> renderClass) + { + RenderingRegistry.registerEntityRenderingHandler(entityClass, new EntityRenderFactory(renderClass)); + } + + private static class EntityRenderFactory implements IRenderFactory + { + private Class> renderClass; + + private EntityRenderFactory(Class> renderClass) + { + this.renderClass = renderClass; + } + + @Override + public Render createRenderFor(RenderManager manager) + { + Render renderer = null; + + try { + renderer = renderClass.getConstructor(RenderManager.class).newInstance(manager); + } + + catch (Exception e) { + e.printStackTrace(); + } + + return renderer; + } + } + + /** + @Override + public int registerArmor(String armor) + { + return RenderingRegistry.addNewArmourRendererPrefix(armor); + } + **/ + + /** + @Override + public void setClientEnvironment() + { + //if (ModConfig.enableRealisticDarkness) + } + **/ + + @Override + public void registerSounds() { + //MinecraftForge.EVENT_BUS.register(new ModSounds());//register the sound event handling class + } + + @Override + public void registerTickHandler() + { + //FMLCommonHandler.instance().bus().register(new ClientTickHandler()); + } +} diff --git a/src/main/java/nmd/primal/forgecraft/client/render/MeshDefinitionFix.java b/src/main/java/nmd/primal/forgecraft/client/render/MeshDefinitionFix.java new file mode 100644 index 00000000..c2a50198 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/client/render/MeshDefinitionFix.java @@ -0,0 +1,32 @@ +package nmd.primal.forgecraft.client.render; + +import net.minecraft.client.renderer.ItemMeshDefinition; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +/** + * A hackish adapter that allows lambdas to be used as {@link ItemMeshDefinition} implementations without breaking ForgeGradle's + * reobfuscation and causing {@link AbstractMethodError}s. + *

+ * Written by diesieben07 in this thread: + * http://www.minecraftforge.net/forum/index.php/topic,34034.0.html + * + * @author diesieben07 + */ +@SideOnly(Side.CLIENT) +public interface MeshDefinitionFix extends ItemMeshDefinition +{ + ModelResourceLocation getLocation(ItemStack stack); + + //Helper method to easily create lambda instances of this class + + static ItemMeshDefinition create(MeshDefinitionFix lambda) { + return lambda; + } + + default ModelResourceLocation getModelLocation(ItemStack stack) { + return getLocation(stack); + } +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/CommonProxy.java b/src/main/java/nmd/primal/forgecraft/common/CommonProxy.java new file mode 100644 index 00000000..bd555c7e --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/CommonProxy.java @@ -0,0 +1,117 @@ +package nmd.primal.forgecraft.common; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.world.World; +import net.minecraftforge.fluids.IFluidBlock; + +/** + * Created by kitsu on 11/23/2016. + */ + +public class CommonProxy +{ + + public void registerClientEvents() + { + } + + public void renderBlock(Block block) + { + // see ClientProxy + } + + public void renderItem(Item item) + { + // see ClientProxy + } + + public void preInit() { + + } + + public void init() { + + } + + public void postInit() { + + } + + public void registerFluidBlockRendering(Block block, String name) { + // see ClientProxy + } + + public void registerItemVariantModel(Item item, String name, int metadata) { + // see ClientProxy + } + + public void registerFluidRendering(IFluidBlock fluidBlock, String name) { + // see ClientProxy + } + + public void registerBlockSided(Block block) + { + // + } + + public void registerItemSided(Item item) + { + // register sub types if there are any + } + + public void registerFluidModels() { + // see ClientProxy + } + + public void registerFluidModel(IFluidBlock fluidBlock) { + // see ClientProxy + } + + public void registerTickHandler() { + // see ClientProxy + } + + public void registerSounds() { + // see ClientProxy + } + + public void registerRendering() { + //see ClientProxy + } + + public void registerTileRendering() + { + + } + + /*public void spawnParticle(ForgeCraftParticles particle, double x, double y, double z, Object... info) { + //see ClientProxy + }*/ + + public int registerArmor(String armor) { + //see ClientProxy + return 0; + } + + public Object getClient() { + //see ClientProxy + return null; + } + + public World getClientWorld() { + //see ClientProxy + return null; + } + + public void setClientEnvironment() { + //see ClientProxy + } + + /** + @Override + public World getServerWorld() { + return FMLServerHandler.instance().getServer().getEntityWorld(); + } + **/ +} diff --git a/src/main/java/nmd/primal/forgecraft/common/CommonUtils.java b/src/main/java/nmd/primal/forgecraft/common/CommonUtils.java new file mode 100644 index 00000000..39c468e6 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/CommonUtils.java @@ -0,0 +1,7 @@ +package nmd.primal.forgecraft.common; + +/** + * Created by kitsu on 11/23/2016. + */ +public class CommonUtils { +} diff --git a/src/main/java/nmd/primal/forgecraft/common/ForgeCraft.java b/src/main/java/nmd/primal/forgecraft/common/ForgeCraft.java new file mode 100644 index 00000000..de18bace --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/ForgeCraft.java @@ -0,0 +1,127 @@ +package nmd.primal.forgecraft.common; + +import net.minecraft.init.Blocks; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.Mod.EventHandler; +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.event.FMLServerStartingEvent; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import nmd.primal.forgecraft.common.init.*; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import java.util.Locale; + +@Mod( modid = ModInfo.MOD_ID, + name = ModInfo.MOD_ID, + version = ModInfo.MOD_VERSION, + acceptedMinecraftVersions = ModInfo.MC_VERSIONS, + dependencies = ModInfo.DEPENDENCIES, + guiFactory = ModInfo.GUI_FACTORY, + updateJSON = ModInfo.UPDATE_JSON +) +public class ForgeCraft +{ + @Mod.Instance(ModInfo.MOD_ID) + public static ForgeCraft INSTANCE; + + @SidedProxy(clientSide = ModInfo.CLIENT_PROXY, serverSide = ModInfo.COMMON_PROXY) + public static CommonProxy proxy; + + public static Logger LOGGER = LogManager.getLogger(ModInfo.MOD_ID); + + @EventHandler + public void preInit(FMLPreInitializationEvent event) + { + LOGGER.info("Pre-Init"); + Locale.setDefault(Locale.ENGLISH); + + /*Configuration File*/ + + //CONFIG_DIRECTORY = new File(event.getModConfigurationDirectory(), "primal"); + //ModConfig.init(event.getSuggestedConfigurationFile()); + //LOGGER.info("Debug Level: " + ModConfig.DEBUG_LEVEL); + + /*Networking*/ + //NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(ModInfo.MOD_CHANNEL); + //NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); + + /* + Load Main Content + In Order of: + Sounds, Entities, Tiles, Blocks, Fluids, Items + */ + //ModTileEntities.registerTileEntities(); + + //ModBlocks.registerBlocks(); + //ModBlocks.registerSubBlocks(); + //ModBlocks.registerOres(); + //ModBlocks.registerPlants(); + //ModBlocks.registerLighting(); + //ModBlocks.registerTablesShelves(); + + //ModFluids.registerFluids(); + + //ModItems.registerItems(); + + //ModSounds.registerSounds(); + //ModEntities.registerEntities(); + + /*Events*/ + //ModEvents.registerCommonEvents(); + + /*Sounds*/ + //ModSoundHandler.init(); + + /*Proxy Power*/ + //proxy.preInit(); + } + + @EventHandler + public void init(FMLInitializationEvent event) + { + //LOGGER.info("Init"); + // proxy.init(); + + /*World-Gen*/ + + //ModWorldGen.registerWorldGenerators(); + //ModWorldGen.registerDimensionProviders(); + + /*Register More Stuff*/ + //ModRegistries.registerFuels(); + //ModRegistries.registerVanillaTorches(); + //ModRegistries.registerRepairItems(); + //ModRegistries.registerToolBreakItems(); + //ModRegistries.registerAdditionalCraftingItems(); + //DispenserBehavoir.registerDispenserItems(); + //ModDictionary.registerDictionaryNames(); + + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) + { + //LOGGER.info("Post-Init"); + //proxy.postInit(); + + /*Crafting, Remove Vanilla Recipes*/ + //ModCrafting.registerRecipeRemover(); + //ModCrafting.registerRecipes(); + + } + + @EventHandler + public void serverStarting(FMLServerStartingEvent event) + { + //event.registerServerCommand(new PrimalCommand()); + } + + //public File getConfigDirectory() + //{ + // return CONFIG_DIRECTORY; + //} +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/compat/FuelHandler.java b/src/main/java/nmd/primal/forgecraft/common/compat/FuelHandler.java new file mode 100644 index 00000000..b1b64114 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/compat/FuelHandler.java @@ -0,0 +1,24 @@ +package nmd.primal.forgecraft.common.compat; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.IFuelHandler; + +import java.util.Map; + +/** + * Created by kitsu on 11/23/2016. + */ +public class FuelHandler implements IFuelHandler +{ + @Override + public int getBurnTime(ItemStack fuelStack) + { + //if (ModConfig.FEATURE_ENABLE_FUELS) { + //CommonUtils.debugLogger(2, "fuel", "size: " + ModRegistries.FUEL_REGISTRY.size() + ", value: " + ModRegistries.FUEL_REGISTRY.get(fuelStack)); + + + //} + + return 0; + } +} diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModBlocks.java b/src/main/java/nmd/primal/forgecraft/common/init/ModBlocks.java new file mode 100644 index 00000000..a02b3797 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModBlocks.java @@ -0,0 +1,472 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockPressurePlate; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraftforge.fml.common.registry.ForgeRegistries; +import net.minecraftforge.oredict.OreDictionary; +import nmd.primal.core.common.PrimalCore; +import nmd.primal.core.common.blocks.lighting.IgnisFatuus; +import nmd.primal.core.common.blocks.lighting.JackOLanern; +import nmd.primal.core.common.blocks.lighting.Lantern; +import nmd.primal.core.common.blocks.lighting.Torch; +import nmd.primal.core.common.blocks.parts.*; +import nmd.primal.core.common.blocks.plants.*; +import nmd.primal.core.common.blocks.soil.*; +import nmd.primal.core.common.blocks.stone.*; +import nmd.primal.core.common.blocks.storage.*; +import nmd.primal.core.common.items.block.ItemAshBlock; +import nmd.primal.core.common.items.block.ItemTorchBlock; + +import javax.annotation.Nullable; +import java.util.HashSet; +import java.util.Set; +import java.util.function.Function; + +import static nmd.primal.core.api.PrimalBlocks.*; + +public class ModBlocks +{ + public static final Set BLOCKS = new HashSet<>(); + + /******************************************************************************* + * Blocks + */ + public static void registerBlocks() + { + // ***************************************************************************** // + // Thatch and Basic Building Materials + /// + THATCH_WET = registerBlock("thatch_wet", new ThatchWet()); + THATCH = registerBlock("thatch", new Thatch()); + + NETHER_WOOL = registerBlock("nether_wool", new NetherWool()); + GRATED_GRAVEL = registerBlock("grated_gravel", new GratedGravel()); + + ASH_BLOCK = registerBlock("ash_block", new AshBlock(), "blockAsh"); + ASH_LAYER = registerBlock("ash_layer", new AshLayer(), ItemAshBlock::new); + ASH_STABILIZED = registerBlock("ash_stabilized", new AshStabilized(), "blockAsh"); + EARTHWAX_BLOCK = registerBlock("earthwax_block", new EarthWax().setHardness(1.2F).setResistance(0.8F), "blockFuel"); + TERRACLAY_BLOCK = registerBlock("terraclay_block", new TerraClay().setHardness(2.2F).setResistance(1.5F), "blockTerra"); + CINISCLAY_BLOCK = registerBlock("cinisclay_block", new TerraClay().setHardness(2.2F).setResistance(1.5F), "blockTerra"); + + DIRT_BRICK = registerBlock("dirt_brick", new Solum().setHardness(0.9F).setResistance(0.5F)); + MUD_BRICK_DRY = registerBlock("mud_brick_dry", new Saxum().setHardness(1.6F).setResistance(1.6F)); + MUD_BLOCK_DRY = registerBlock("mud_block_dry", new Saxum().setHardness(1.2F).setResistance(1.2F)); + MUD_BRICK_WET = registerBlock("mud_brick_wet", new MudWet().setHardness(1.0F).setResistance(1.0F)); + MUD_BLOCK_WET = registerBlock("mud_block_wet", new MudWet().setHardness(1.0F).setResistance(1.0F)); + + CINISCOTTA_BRICK = registerBlock("ciniscotta_brick", new Saxum().setHardness(1.2F).setResistance(2.0F), "blockCotta"); + TERRACOTTA_BRICK = registerBlock("terracotta_brick", new Saxum().setHardness(1.2F).setResistance(2.0F), "blockCotta"); + + CARBONATE_STONE = registerBlock("carbonate_stone", new CarbonateStone().setHardness(1.5F).setResistance(10.0F), "blockLimestone"); + CARBONATE_FLAG = registerBlock("carbonate_flag", new Saxum().setHardness(2.0F).setResistance(10.0F), "blockLimestone"); + CARBONATE_BRICK = registerBlock("carbonate_brick", new Saxum().setHardness(2.0F).setResistance(10.0F), "blockLimestone"); + + FERRO_STONE = registerBlock("ferro_stone", new CarbonateStone().setHardness(1.5F).setResistance(10.0F), "blockLimestone"); + FERRO_FLAG = registerBlock("ferro_flag", new Saxum().setHardness(2.0F).setResistance(10.0F), "blockLimestone"); + FERRO_BRICK = registerBlock("ferro_brick", new Saxum().setHardness(2.0F).setResistance(10.0F), "blockLimestone"); + + NETHERPALM_LOG = registerBlock("netherpalm_log", new NetherPalm().setHardness(5.0F).setResistance(10.0F)); + NETHERPALM_PLANK = registerBlock("netherpalm_plank", new WoodPlank().setHardness(5.0F).setResistance(10.0F)); + IRONWOOD_LEAVES = registerBlock("ironwood_leaves", new TreeLeaves()); + IRONWOOD_LOG = registerBlock("ironwood_log", new WoodLog().setHardness(5.0F).setResistance(10.0F)); + IRONWOOD_PLANK = registerBlock("ironwood_plank", new WoodPlank().setHardness(5.0F).setResistance(10.0F)); + NETHERSTONE = registerBlock("netherstone", new Saxum().setHardness(2.2F).setResistance(1.5F)); + + SOULSTONE_NORMAL = registerBlock("soulstone_normal", new SoulStone(), "blockSoulstone"); + SOULSTONE_SMOOTH = registerBlock("soulstone_smooth", new SoulStone(), "blockSoulstone"); + SOULSTONE_CHISELED = registerBlock("soulstone_chiseled", new SoulStone(), "blockSoulstone"); + SOULSTONE_FLAGSTONE = registerBlock("soulstone_flagstone", new SoulStone(), "blockSoulstone"); + + CLEAN_OAK = registerBlock("clean_oak", new CleanOak(), "blockCleanOak"); + CLEAN_BIRCH = registerBlock("clean_birch", new CleanBirch(), "blockCleanBirch"); + CLEAN_SPRUCE = registerBlock("clean_spruce", new CleanSpruce(), "blockCleanSpruce"); + CLEAN_JUNGLE = registerBlock("clean_jungle", new CleanJungle(), "blockCleanJungle"); + CLEAN_BIG_OAK = registerBlock("clean_big_oak", new CleanBigOak(), "blockCleanBigOak"); + CLEAN_ACACIA = registerBlock("clean_acacia", new CleanAcacia(), "blockCleanAcacia"); + CLEAN_IRONWOOD = registerBlock("clean_ironwood", new CleanIronwood(), "blockCleanIronwood"); + } + + public static void registerSubBlocks() + { + /// + // Thin PrimalFacing + /// + + /// + // Slats + /// + SLAT_ACACIA = registerBlock("slat_acacia", new Slats(Blocks.PLANKS.getDefaultState())); + SLAT_BIGOAK = registerBlock("slat_bigoak", new Slats(Blocks.PLANKS.getDefaultState())); + SLAT_BIRCH = registerBlock("slat_birch", new Slats(Blocks.PLANKS.getDefaultState())); + SLAT_JUNGLE = registerBlock("slat_jungle", new Slats(Blocks.PLANKS.getDefaultState())); + SLAT_OAK = registerBlock("slat_oak", new Slats(Blocks.PLANKS.getDefaultState())); + SLAT_SPRUCE = registerBlock("slat_spruce", new Slats(Blocks.PLANKS.getDefaultState())); + SLAT_IRON = registerBlock("slat_iron", new Slats(Blocks.IRON_BLOCK.getDefaultState())); + SLAT_NETHERPALM = registerBlock("slat_netherpalm", new Slats(NETHERPALM_PLANK.getDefaultState())); + SLAT_IRONWOOD = registerBlock("slat_ironwood", new Slats(IRONWOOD_PLANK.getDefaultState())); + + /// + // Stairs + /// + STAIRS_DIRT = registerBlock("stairs_dirt", new Stairs(Blocks.DIRT.getDefaultState(), true)); + STAIRS_GRASS = registerBlock("stairs_grass", new Stairs(Blocks.GRASS.getDefaultState(), true), true); + STAIRS_NETHERRACK = registerBlock("stairs_netherrack", new Stairs(Blocks.NETHERRACK.getDefaultState(), true), true); + STAIRS_MUD = registerBlock("stairs_mud", new Stairs(MUD_BLOCK_DRY.getDefaultState(), true)); + STAIRS_NETHERPALM = registerBlock("stairs_nether_palm", new Stairs(NETHERPALM_PLANK.getDefaultState(), true), true); + STAIRS_IRONWOOD = registerBlock("stairs_ironwood", new Stairs(IRONWOOD_PLANK.getDefaultState(), true), true); + STAIRS_CARBONATE_FLAG = registerBlock("stairs_carbonate_flag", new Stairs(CARBONATE_FLAG.getDefaultState()), "blockStair"); + STAIRS_CARBONATE_BRICK = registerBlock("stairs_carbonate_brick", new Stairs(CARBONATE_BRICK.getDefaultState()).setHardness(2.0F).setResistance(10.0F), "blockStair"); + STAIRS_FERRO_FLAG = registerBlock("stairs_ferro_flag", new Stairs(FERRO_FLAG.getDefaultState()), "blockStair"); + STAIRS_FERRO_BRICK = registerBlock("stairs_ferro_brick", new Stairs(FERRO_BRICK.getDefaultState()).setHardness(2.0F).setResistance(10.0F), "blockStair"); + STAIRS_COBBLESTONE_MOSSY = registerBlock("stairs_cobblestone_mossy", new Stairs(Blocks.COBBLESTONE.getDefaultState()).setHardness(2.0F).setResistance(10.0F), "blockStair"); + STAIRS_STONEBRICK_MOSSY = registerBlock("stairs_stonebrick_mossy", new Stairs(Blocks.STONEBRICK.getDefaultState()).setHardness(2.0F).setResistance(10.0F), "blockStair"); + + /// + // Wall + /// + WALL_NETHERRACK = registerBlock("wall_netherrack", new Wall(Blocks.NETHERRACK.getDefaultState()), "blockWall"); + WALL_NETHERSTONE = registerBlock("wall_netherstone", new Wall(NETHERSTONE.getDefaultState()), "blockWall"); + WALL_CARBONATE_FLAG = registerBlock("wall_carbonate_flag", new Wall(CARBONATE_FLAG.getDefaultState()), "blockWall"); + WALL_CARBONATE_BRICK = registerBlock("wall_carbonate_brick", new Wall(CARBONATE_BRICK.getDefaultState()), "blockWall"); + WALL_FERRO_FLAG = registerBlock("wall_ferro_flag", new Wall(CARBONATE_FLAG.getDefaultState()), "blockWall"); + WALL_FERRO_BRICK = registerBlock("wall_ferro_brick", new Wall(CARBONATE_BRICK.getDefaultState()), "blockWall"); + + /// + // Fence + /// + FENCE_IRONWOOD = registerBlock("fence_ironwood", new Fence(IRONWOOD_PLANK.getDefaultState())); + FENCE_NETHERPALM = registerBlock("fence_netherpalm", new Fence(NETHERPALM_PLANK.getDefaultState())); + //GATE_IRONWOOD = registerBlock(new Gates("gate_ironwood", IRONWOOD_PLANK.getDefaultState())); + //GATE_NETHERPALM = registerBlock(new Gates("gate_netherpalm", NETHERPALM_PLANK.getDefaultState())); + + /// + // Pressure Plates + /// + PRESSPLATE_DIRT = registerBlock("pressplate_dirt", new PressurePlate(Blocks.DIRT.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(0.5F).setResistance(0.0F); + PRESSPLATE_GRASS = registerBlock("pressplate_grass", new PressurePlate(Blocks.GRASS.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(0.6F).setResistance(0.0F); + PRESSPLATE_GLASS = registerBlock("pressplate_glass", new PressurePlate(Blocks.GLASS.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(0.3F).setResistance(0.0F); + PRESSPLATE_NETHERRACK = registerBlock("pressplate_netherrack", new PressurePlate(Blocks.NETHERRACK.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(2.0F).setResistance(10.0F); + PRESSPLATE_NETHERPALM = registerBlock("pressplate_netherpalm", new PressurePlate(NETHERPALM_PLANK.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(2.0F).setResistance(5.0F); + PRESSPLATE_IRONWOOD = registerBlock("pressplate_ironwood", new PressurePlate(IRONWOOD_PLANK.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(2.0F).setResistance(5.0F); + PRESSPLATE_THATCH = registerBlock("pressplate_thatch", new PressurePlateFacing(THATCH.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(2.0F).setResistance(5.0F); + + /// + // Lever, Misc + /// + LEVER_WOOD = registerBlock("lever_wood", new Lever(), "blockLever"); + LEVER_NETHER = registerBlock("lever_nether", new Lever(), "blockLever"); + } + + public static void registerPlants() + { + /// + // Solum Blocks + /// + LOAM_BLOCK = registerBlock("loam_block", new Loam().setHardness(1.2F).setResistance(1.2F)); + + /// + // Plants + /// + RUSHES = registerBlock("rush", new Rushes()); + CORN_STALK = registerBlock("corn_stalk", new CornStalk()); + STRANGLE_WEED = registerBlock("strangle_weed", new StrangleWeed()); + //NETHER_GRASS = registerBlock(new NetherGrass("nether_grass")); + //NETHER_GRASS_GROWING = registerBlock(new NetherGrassGrowing("nether_grass_growing")); + //SEARING_LACE = registerBlock(new SearingLace("searing_lace")); + //SEARING_LACE_GROWING = registerBlock(new SearingLaceGrowing("searing_lace_growing")); + } + + public static void registerOres() + { + /// + // .. + /// + ORE_IRON = registerBlock("ore_iron", new OreDensity().setHardness(4.0F).setResistance(15.0F)); + + /// + // Ferrum Storage Blocks + /// + BRASS_BLOCK = registerBlock("brass_block", new Ferrum().setHardness(4.0F).setResistance(15.0F), "blockBrass"); + BRONZE_BLOCK = registerBlock("bronze_block", new Ferrum().setHardness(4.0F).setResistance(15.0F), "blockBronze"); + COPPER_BLOCK = registerBlock("copper_block", new Ferrum().setHardness(3.0F).setResistance(10.0F), "blockCopper"); + LEAD_BLOCK = registerBlock("lead_block", new Ferrum().setHardness(2.0F).setResistance(18.0F), "blockLead"); + PIGIRON_BLOCK = registerBlock("pigiron_block", new Ferrum().setHardness(5.0F).setResistance(10.0F), "blockPigiron"); + SILVER_BLOCK = registerBlock("silver_block", new Ferrum().setHardness(5.0F).setResistance(12.0F), "blockSilver"); + TIN_BLOCK = registerBlock("tin_block", new Ferrum().setHardness(2.0F).setResistance(10.0F), "blockTin"); + VANADIUM_BLOCK = registerBlock("vanadium_block", new Ferrum().setHardness(10.0F).setResistance(20.0F), "blockVanadium"); + WOOTZ_BLOCK = registerBlock("wootz_block", new Ferrum().setHardness(8.0F).setResistance(16.0F), "blockWootz"); + ZINC_BLOCK = registerBlock("zinc_block", new Ferrum().setHardness(2.5F).setResistance(10.0F), "blockZinc"); + + /// + // Salt Ores + /// + SALT_HALITE_BLOCK = registerBlock("salt_halite_block", new SaltFlat(), "blockSalt"); + SALT_NETJRY_BLOCK = registerBlock("salt_netjry_block", new SaltFlat(), "blockSalt"); + SALT_FIRE_BLOCK = registerBlock("salt_fire_block", new SaltFlat(), "blockSalt"); + SALT_VOID_BLOCK = registerBlock("salt_void_block", new SaltFlat(), "blockSalt"); + } + + public static void registerTablesShelves() + { + /// + // Worktables + Shelves + /// + WORKTABLE_SANDSTONE = registerBlock("worktable_sandstone", new WorkTableShelf(Blocks.SANDSTONE.getDefaultState())); + WORKTABLE_NETHERSTONE = registerBlock("worktable_netherstone", new WorkTableShelf(NETHERSTONE.getDefaultState())); + WORKTABLE_END = registerBlock("worktable_endstone", new WorkTableShelf(Blocks.END_STONE.getDefaultState())); + WORKTABLE_MUD = registerBlock("worktable_mud", new WorkTableShelf(MUD_BLOCK_DRY.getDefaultState())); + WORKTABLE_ACACIA_LOG = registerBlock("worktable_acacia_log", new WorkTableShelf(Blocks.LOG.getDefaultState())); + WORKTABLE_BIGOAK_LOG = registerBlock("worktable_bigoak_log", new WorkTableShelf(Blocks.LOG.getDefaultState())); + WORKTABLE_BIRCH_LOG = registerBlock("worktable_birch_log", new WorkTableShelf(Blocks.LOG.getDefaultState())); + WORKTABLE_JUNGLE_LOG = registerBlock("worktable_jungle_log", new WorkTableShelf(Blocks.LOG.getDefaultState())); + WORKTABLE_OAK_LOG = registerBlock("worktable_oak_log", new WorkTableShelf(Blocks.LOG.getDefaultState())); + WORKTABLE_SPRUCE_LOG = registerBlock("worktable_spruce_log", new WorkTableShelf(Blocks.LOG.getDefaultState())); + WORKTABLE_IRONWOOD_LOG = registerBlock("worktable_ironwood_log", new WorkTableShelf(IRONWOOD_LOG.getDefaultState())); + + /// + // Worktable PrimalFacing + /// + WORKTABLE_MUD_SLAB = registerBlock("worktable_mud_slab", new WorkTableSlab(MUD_BLOCK_DRY.getDefaultState())); + WORKTABLE_ACACIA = registerBlock("worktable_acacia", new WorkTableSlab(Blocks.PLANKS.getDefaultState())); + WORKTABLE_BIGOAK = registerBlock("worktable_bigoak", new WorkTableSlab(Blocks.PLANKS.getDefaultState())); + WORKTABLE_BIRCH = registerBlock("worktable_birch", new WorkTableSlab(Blocks.PLANKS.getDefaultState())); + WORKTABLE_JUNGLE = registerBlock("worktable_jungle", new WorkTableSlab(Blocks.PLANKS.getDefaultState())); + WORKTABLE_OAK = registerBlock("worktable_oak", new WorkTableSlab(Blocks.PLANKS.getDefaultState())); + WORKTABLE_SPRUCE = registerBlock("worktable_spruce", new WorkTableSlab(Blocks.PLANKS.getDefaultState())); + WORKTABLE_NETHERPALM = registerBlock("worktable_netherpalm", new WorkTableSlab(NETHERPALM_PLANK.getDefaultState())); + WORKTABLE_IRONWOOD = registerBlock("worktable_ironwood", new WorkTableSlab(IRONWOOD_PLANK.getDefaultState())); + + /// + // Shelves + /// + SHELF_FULL_ACACIA = registerBlock("shelf_full_acacia", new ShelfBasic(Blocks.PLANKS.getDefaultState())); + SHELF_FULL_BIGOAK = registerBlock("shelf_full_bigoak", new ShelfBasic(Blocks.PLANKS.getDefaultState())); + SHELF_FULL_BIRCH = registerBlock("shelf_full_birch", new ShelfBasic(Blocks.PLANKS.getDefaultState())); + SHELF_FULL_END = registerBlock("shelf_full_end", new ShelfBasic(Blocks.END_STONE.getDefaultState())); + SHELF_FULL_IRONWOOD = registerBlock("shelf_full_ironwood", new ShelfBasic(IRONWOOD_PLANK.getDefaultState())); + SHELF_FULL_JUNGLE = registerBlock("shelf_full_jungle", new ShelfBasic(Blocks.PLANKS.getDefaultState())); + SHELF_FULL_OAK = registerBlock("shelf_full_oak", new ShelfBasic(Blocks.PLANKS.getDefaultState())); + SHELF_FULL_MUD = registerBlock("shelf_full_mud", new ShelfBasic(MUD_BLOCK_DRY.getDefaultState())); + SHELF_FULL_NETHERPALM = registerBlock("shelf_full_netherpalm", new ShelfBasic(NETHERPALM_PLANK.getDefaultState())); + SHELF_FULL_NETHERRACK = registerBlock("shelf_full_netherrack", new ShelfBasic(Blocks.NETHERRACK.getDefaultState())); + SHELF_FULL_NETHERSTONE = registerBlock("shelf_full_netherstone", new ShelfBasic(NETHERSTONE.getDefaultState())); + SHELF_FULL_SANDSTONE = registerBlock("shelf_full_sandstone", new ShelfBasic(Blocks.SANDSTONE.getDefaultState())); + SHELF_FULL_SPRUCE = registerBlock("shelf_full_spruce", new ShelfBasic(Blocks.PLANKS.getDefaultState())); + + SHELF_HALF_ACACIA = registerBlock("shelf_half_acacia", new ShelfHalf(Blocks.PLANKS.getDefaultState())); + SHELF_HALF_BIGOAK = registerBlock("shelf_half_bigoak", new ShelfHalf(Blocks.PLANKS.getDefaultState())); + SHELF_HALF_BIRCH = registerBlock("shelf_half_birch", new ShelfHalf(Blocks.PLANKS.getDefaultState())); + SHELF_HALF_END = registerBlock("shelf_half_end", new ShelfHalf(Blocks.END_STONE.getDefaultState())); + SHELF_HALF_IRONWOOD = registerBlock("shelf_half_ironwood", new ShelfHalf(IRONWOOD_PLANK.getDefaultState())); + SHELF_HALF_JUNGLE = registerBlock("shelf_half_jungle", new ShelfHalf(Blocks.PLANKS.getDefaultState())); + SHELF_HALF_OAK = registerBlock("shelf_half_oak", new ShelfHalf(Blocks.PLANKS.getDefaultState())); + SHELF_HALF_MUD = registerBlock("shelf_half_mud", new ShelfHalf(MUD_BLOCK_DRY.getDefaultState())); + SHELF_HALF_NETHERPALM = registerBlock("shelf_half_netherpalm", new ShelfHalf(NETHERPALM_PLANK.getDefaultState())); + SHELF_HALF_NETHERRACK = registerBlock("shelf_half_netherrack", new ShelfHalf(Blocks.NETHERRACK.getDefaultState())); + SHELF_HALF_NETHERSTONE = registerBlock("shelf_half_netherstone", new ShelfHalf(NETHERSTONE.getDefaultState())); + SHELF_HALF_SANDSTONE = registerBlock("shelf_half_sandstone", new ShelfHalf(Blocks.SANDSTONE.getDefaultState())); + SHELF_HALF_SPRUCE = registerBlock("shelf_half_spruce", new ShelfHalf(Blocks.PLANKS.getDefaultState())); + + /// + // Drying Racks + /// + DRYING_RACK_ACACIA = registerBlock("drying_rack_acacia", new DryingRack(Blocks.PLANKS.getDefaultState())); + DRYING_RACK_BIGOAK = registerBlock("drying_rack_bigoak", new DryingRack(Blocks.PLANKS.getDefaultState())); + DRYING_RACK_BIRCH = registerBlock("drying_rack_birch", new DryingRack(Blocks.PLANKS.getDefaultState())); + DRYING_RACK_IRONWOOD = registerBlock("drying_rack_ironwood", new DryingRack(IRONWOOD_PLANK.getDefaultState())); + DRYING_RACK_JUNGLE = registerBlock("drying_rack_jungle", new DryingRack(Blocks.PLANKS.getDefaultState())); + DRYING_RACK_OAK = registerBlock("drying_rack_oak", new DryingRack(Blocks.PLANKS.getDefaultState())); + DRYING_RACK_NETHERPALM = registerBlock("drying_rack_netherpalm", new DryingRack(NETHERPALM_PLANK.getDefaultState())); + DRYING_RACK_SPRUCE = registerBlock("drying_rack_spruce", new DryingRack(Blocks.PLANKS.getDefaultState())); + + FISH_TRAP_ACACIA = registerBlock("fish_trap_acacia", new FishTrap()); + FISH_TRAP_BIGOAK = registerBlock("fish_trap_bigoak", new FishTrap()); + FISH_TRAP_BIRCH = registerBlock("fish_trap_birch", new FishTrap()); + FISH_TRAP_IRONWOOD = registerBlock("fish_trap_ironwood", new FishTrap()); + FISH_TRAP_JUNGLE = registerBlock("fish_trap_jungle", new FishTrap()); + FISH_TRAP_OAK = registerBlock("fish_trap_oak", new FishTrap()); + FISH_TRAP_NETHERPALM = registerBlock("fish_trap_netherpalm", new FishTrap(Material.LAVA)); + FISH_TRAP_SPRUCE = registerBlock("fish_trap_spruce", new FishTrap()); + + /// + // Slabs + /// + SLAB_CARBONATE_BRICK = registerBlock("slab_carbonate_brick", new SlabFull(CARBONATE_BRICK.getDefaultState())); + SLAB_CARBONATE_FLAG = registerBlock("slab_carbonate_flag", new SlabFull(CARBONATE_FLAG.getDefaultState())); + SLAB_ENDBRICK = registerBlock("slab_endbrick", new SlabFull(Blocks.END_BRICKS.getDefaultState())); + SLAB_ENDSTONE = registerBlock("slab_endstone", new SlabFull(Blocks.END_STONE.getDefaultState())); + SLAB_FERRO_BRICK = registerBlock("slab_ferro_brick", new SlabFull(FERRO_BRICK.getDefaultState())); + SLAB_FERRO_FLAG = registerBlock("slab_ferro_flag", new SlabFull(FERRO_FLAG.getDefaultState())); + SLAB_GLASS = registerBlock("slab_glass", new SlabFull(Blocks.GLASS.getDefaultState())); + SLAB_IRONWOOD = registerBlock("slab_ironwood", new SlabFull(IRONWOOD_PLANK.getDefaultState())); + SLAB_MUD = registerBlock("slab_mud", new SlabFull(MUD_BLOCK_DRY.getDefaultState())); + //SLAB_NETHERBRICK = registerBlock("slab_netherbrick", new SlabFull(Blocks.NETHER_BRICK.getDefaultState())); + SLAB_NETHERPALM = registerBlock("slab_netherpalm", new SlabFull(NETHERPALM_PLANK.getDefaultState())); + SLAB_NETHERRACK = registerBlock("slab_netherrack", new SlabFull(Blocks.NETHERRACK.getDefaultState())); + SLAB_NETHERSTONE = registerBlock("slab_netherstone", new SlabFull(NETHERSTONE.getDefaultState())); + //SLAB_SANDSTONE = registerBlock("slab_sandstone", new SlabFull(Blocks.SANDSTONE.getDefaultState())); + SLAB_SOULSTONE = registerBlock("slab_soulstone", new SlabFull(SOULSTONE_SMOOTH.getDefaultState())); + SLAB_STONEBRICK_MOSSY = registerBlock("slab_stonebrick_mossy", new SlabFull(Blocks.STONEBRICK.getDefaultState())); + + /// + // Thin Slabs + /// + THIN_SLAB_ACACIA = registerBlock("thin_slab_acacia", new ThinSlab(Blocks.PLANKS.getDefaultState())); + THIN_SLAB_BIGOAK = registerBlock("thin_slab_bigoak", new ThinSlab(Blocks.PLANKS.getDefaultState())); + THIN_SLAB_BIRCH = registerBlock("thin_slab_birch", new ThinSlab(Blocks.PLANKS.getDefaultState())); + THIN_SLAB_CARBONATE_BRICK = registerBlock("thin_slab_carbonate_brick", new ThinSlab(CARBONATE_BRICK.getDefaultState())); + THIN_SLAB_CARBONATE_FLAG = registerBlock("thin_slab_carbonate_flag", new ThinSlab(CARBONATE_FLAG.getDefaultState())); + THIN_SLAB_ENDBRICK = registerBlock("thin_slab_endbrick", new ThinSlab(Blocks.END_BRICKS.getDefaultState())); + THIN_SLAB_ENDSTONE = registerBlock("thin_slab_endstone", new ThinSlab(Blocks.END_STONE.getDefaultState())); + THIN_SLAB_FERRO_BRICK = registerBlock("thin_slab_ferro_brick", new ThinSlab(FERRO_BRICK.getDefaultState())); + THIN_SLAB_FERRO_FLAG = registerBlock("thin_slab_ferro_flag", new ThinSlab(FERRO_FLAG.getDefaultState())); + THIN_SLAB_GLASS = registerBlock("thin_slab_glass", new ThinSlab(Blocks.GLASS.getDefaultState())); + THIN_SLAB_IRONWOOD = registerBlock("thin_slab_ironwood", new ThinSlab(IRONWOOD_PLANK.getDefaultState())); + THIN_SLAB_JUNGLE = registerBlock("thin_slab_jungle", new ThinSlab(Blocks.PLANKS.getDefaultState())); + THIN_SLAB_MUD = registerBlock("thin_slab_mud", new ThinSlab(MUD_BLOCK_DRY.getDefaultState())); + THIN_SLAB_NETHERBRICK = registerBlock("thin_slab_netherbrick", new ThinSlab(Blocks.NETHER_BRICK.getDefaultState())); + THIN_SLAB_NETHERPALM = registerBlock("thin_slab_netherpalm", new ThinSlab(NETHERPALM_PLANK.getDefaultState())); + THIN_SLAB_NETHERRACK = registerBlock("thin_slab_netherrack", new ThinSlab(Blocks.NETHERRACK.getDefaultState())); + THIN_SLAB_NETHERSTONE = registerBlock("thin_slab_netherstone", new ThinSlab(NETHERSTONE.getDefaultState())); + THIN_SLAB_OAK = registerBlock("thin_slab_oak", new ThinSlab(Blocks.PLANKS.getDefaultState())); + THIN_SLAB_SANDSTONE = registerBlock("thin_slab_sandstone", new ThinSlab(Blocks.SANDSTONE.getDefaultState())); + THIN_SLAB_SOULSTONE = registerBlock("thin_slab_soulstone", new ThinSlab(SOULSTONE_SMOOTH.getDefaultState())); + THIN_SLAB_SPRUCE = registerBlock("thin_slab_spruce", new ThinSlab(Blocks.PLANKS.getDefaultState())); + THIN_SLAB_STONEBRICK = registerBlock("thin_slab_stonebrick", new ThinSlab(Blocks.STONEBRICK.getDefaultState())); + THIN_SLAB_STONEBRICK_MOSSY = registerBlock("thin_slab_stonebrick_mossy", new ThinSlab(Blocks.STONEBRICK.getDefaultState())); + THIN_SLAB_THATCH = registerBlock("thin_slab_thatch", new ThinSlab(THATCH.getDefaultState(), true)); + + /// + // Smoke Grates + /// + GRATE_ACACIA = registerBlock("grate_acacia", new SmokeGrate(Blocks.PLANKS.getDefaultState())); + GRATE_BIGOAK = registerBlock("grate_bigoak", new SmokeGrate(Blocks.PLANKS.getDefaultState())); + GRATE_BIRCH = registerBlock("grate_birch", new SmokeGrate(Blocks.PLANKS.getDefaultState())); + GRATE_CARBONATE_BRICK = registerBlock("grate_carbonate_brick", new SmokeGrate(CARBONATE_BRICK.getDefaultState())); + GRATE_CARBONATE_FLAG = registerBlock("grate_carbonate_flag", new SmokeGrate(CARBONATE_FLAG.getDefaultState())); + GRATE_ENDBRICK = registerBlock("grate_endbrick", new SmokeGrate(Blocks.END_BRICKS.getDefaultState())); + GRATE_ENDSTONE = registerBlock("grate_endstone", new SmokeGrate(Blocks.END_STONE.getDefaultState())); + GRATE_FERRO_BRICK = registerBlock("grate_ferro_brick", new SmokeGrate(FERRO_BRICK.getDefaultState())); + GRATE_FERRO_FLAG = registerBlock("grate_ferro_flag", new SmokeGrate(FERRO_FLAG.getDefaultState())); + GRATE_IRONWOOD = registerBlock("grate_ironwood", new SmokeGrate(IRONWOOD_PLANK.getDefaultState())); + GRATE_JUNGLE = registerBlock("grate_jungle", new SmokeGrate(Blocks.PLANKS.getDefaultState())); + GRATE_MUD = registerBlock("grate_mud", new SmokeGrate(MUD_BLOCK_DRY.getDefaultState())); + GRATE_NETHERBRICK = registerBlock("grate_netherbrick", new SmokeGrate(Blocks.NETHER_BRICK.getDefaultState())); + GRATE_NETHERPALM = registerBlock("grate_netherpalm", new SmokeGrate(NETHERPALM_PLANK.getDefaultState())); + GRATE_NETHERRACK = registerBlock("grate_netherrack", new SmokeGrate(Blocks.NETHERRACK.getDefaultState())); + GRATE_NETHERSTONE = registerBlock("grate_netherstone", new SmokeGrate(NETHERSTONE.getDefaultState())); + GRATE_OAK = registerBlock("grate_oak", new SmokeGrate(Blocks.PLANKS.getDefaultState())); + GRATE_SANDSTONE = registerBlock("grate_sandstone", new SmokeGrate(Blocks.SANDSTONE.getDefaultState())); + GRATE_SOULSTONE = registerBlock("grate_soulstone", new SmokeGrate(SOULSTONE_SMOOTH.getDefaultState())); + GRATE_SPRUCE = registerBlock("grate_spruce", new SmokeGrate(Blocks.PLANKS.getDefaultState())); + GRATE_STONEBRICK = registerBlock("grate_stonebrick", new SmokeGrate(Blocks.STONEBRICK.getDefaultState())); + GRATE_STONEBRICK_MOSSY = registerBlock("grate_stonebrick_mossy", new SmokeGrate(Blocks.STONEBRICK.getDefaultState())); + GRATE_THATCH = registerBlock("grate_thatch", new SmokeGrate(THATCH.getDefaultState(), true)); + + DRAIN_CARBONATE_BRICK = registerBlock("drain_carbonate_brick", new Drain(CARBONATE_BRICK.getDefaultState())); + DRAIN_CARBONATE_FLAG = registerBlock("drain_carbonate_flag", new Drain(CARBONATE_FLAG.getDefaultState())); + DRAIN_ENDBRICK = registerBlock("drain_endbrick", new Drain(Blocks.END_BRICKS.getDefaultState())); + DRAIN_ENDSTONE = registerBlock("drain_endstone", new Drain(Blocks.END_STONE.getDefaultState())); + DRAIN_FERRO_BRICK = registerBlock("drain_ferro_brick", new Drain(FERRO_BRICK.getDefaultState())); + DRAIN_FERRO_FLAG = registerBlock("drain_ferro_flag", new Drain(FERRO_FLAG.getDefaultState())); + DRAIN_MUD = registerBlock("drain_mud", new Drain(MUD_BLOCK_DRY.getDefaultState())); + DRAIN_NETHERBRICK = registerBlock("drain_netherbrick", new Drain(Blocks.NETHER_BRICK.getDefaultState())); + DRAIN_NETHERRACK = registerBlock("drain_netherrack", new Drain(Blocks.NETHERRACK.getDefaultState())); + DRAIN_NETHERSTONE = registerBlock("drain_netherstone", new Drain(NETHERSTONE.getDefaultState())); + DRAIN_STONE = registerBlock("drain_stone", new Drain(Blocks.STONE.getDefaultState())); + DRAIN_STONEBRICK = registerBlock("drain_stonebrick", new Drain(Blocks.STONEBRICK.getDefaultState())); + DRAIN_STONEBRICK_MOSSY = registerBlock("drain_stonebrick_mossy", new Drain(Blocks.STONEBRICK.getDefaultState())); + DRAIN_THATCH = registerBlock("drain_thatch", new Drain(THATCH.getDefaultState())); + } + + public static void registerLighting() + { + /// + // Lanterns, Torch, etc + /// + LANTERN_EMPTY = registerBlock("lantern_empty", new Lantern()); + LANTERN_TORCH = registerBlock("lantern_torch", new Lantern(true, true, 0.8375F), false); + LANTERN_NETHER = registerBlock("lantern_nether", new Lantern(true, false, 0.7375F), false); + LANTERN_REDSTONE = registerBlock("lantern_redstone", new Lantern(true, false, 0.5F), false); + LANTERN_IGNIS = registerBlock("lantern_ignis", new Lantern(true, false, 0.8375F), false); + + TORCH_WOOD = registerBlock("torch_wood", new Torch(0.9375F, ModConfig.LIGHTING_TORCH_BURN_CHANCE, true), ItemTorchBlock::new, "torchUnlit"); + TORCH_NETHER = registerBlock("torch_nether", new Torch(0.8375F, 60, false), ItemTorchBlock::new, "torchUnlit"); + //TORCH_SMOKER = registerBlock(new Torch("torch_smoker", 0.6375F, 500, true)); + IGNIS_FATUUS = registerBlock("ignis_fatuus", new IgnisFatuus(), "torch"); + JACK_O_LANTERN = registerBlock("jackolantern", new JackOLanern()); + } + + /******************************************************************************* + * Block Registration Methods + * https://github.com/Choonster/TestMod3/blob/1e3b9be1448a93ff1c6e3ef2e16fb4388eefc1a4/src/main/java/com/choonster/testmod3/init/ModBlocks.java#L94-L124 + */ + public static BLOCK registerBlock(String name, BLOCK block, @Nullable Function itemFactory, @Nullable String dictionary_names, boolean hidden) + { + block.setRegistryName(name); + block.setUnlocalizedName(block.getRegistryName().toString()); + + ForgeRegistries.BLOCKS.register(block); + //PrimalCore.proxy.renderBlock(block); + BLOCKS.add(block); + + if (itemFactory != null) + { + //CommonUtils.debugLogger(2, "item register", "name: " + block.getRegistryName().toString().substring(7)); + ItemBlock item = itemFactory.apply(block); + item.setRegistryName(block.getRegistryName().toString().substring(7)); + ForgeRegistries.ITEMS.register(item); + PrimalCore.proxy.registerItemSided(item); + } else { + PrimalCore.proxy.registerItemSided(Item.getItemFromBlock(block)); + } + + if (dictionary_names != null) + { + String [] dictionary_name_array = dictionary_names.replaceAll("\\s+","").split(","); + //List name_list = Arrays.asList(names); + for (String dictionary_name : dictionary_name_array) { + OreDictionary.registerOre(dictionary_name, block); + } + } + + if (!hidden) { + block.setCreativeTab(ModInfo.TAB_PRIMAL); + } + + return block; + } + + public static BLOCK registerBlock(String name, BLOCK block) { + return registerBlock(name, block, ItemBlock::new, null, false); + } + + public static BLOCK registerBlock(String name, BLOCK block, @Nullable String dictionary_names) { + return registerBlock(name, block, ItemBlock::new, dictionary_names, false); + } + + public static BLOCK registerBlock(String name, BLOCK block, @Nullable Function itemFactory) { + return registerBlock(name, block, itemFactory, null, false); + } + + public static BLOCK registerBlock(String name, BLOCK block, @Nullable Function itemFactory, @Nullable String dictionary_names) { + return registerBlock(name, block, itemFactory, dictionary_names, false); + } + + public static BLOCK registerBlock(String name, BLOCK block, boolean hidden) { + return registerBlock(name, block, ItemBlock::new, null, hidden); + } + + public static BLOCK registerBlock(String name, BLOCK block, @Nullable String dictionary_names, boolean hidden) { + return registerBlock(name, block, ItemBlock::new, dictionary_names, hidden); + } + + public static BLOCK registerBlock(String name, BLOCK block, @Nullable Function itemFactory, boolean hidden) { + return registerBlock(name, block, itemFactory, null, hidden); + } +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModConfig.java b/src/main/java/nmd/primal/forgecraft/common/init/ModConfig.java new file mode 100644 index 00000000..1127f2d3 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModConfig.java @@ -0,0 +1,575 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraftforge.common.config.ConfigCategory; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.config.Property; + +import java.io.File; + +public class ModConfig +{ + /// ************************************************************************ /// + // features + /// + public static boolean FEATURE_ENABLE_FUELS; + public static boolean FEATURE_REPLACE_LEVERS; + public static boolean FEATURE_DISABLE_NETHER_PORTAL; + public static boolean FEATURE_DISABLE_BED_SLEEP; + public static boolean FEATURE_DISABLE_BED_SPAWN; + public static boolean FEATURE_AUTO_PLANT_SAPLINGS; + + /// ************************************************************************ /// + // survival + /// + + public static int SURVIVAL_MUD_DRY_TIME; + public static int SURVIVAL_THATCH_DRY_TIME; + public static int SURVIVAL_THATCH_SUPPORT_RANGE; + public static int SURVIVAL_ROCK_STACKSIZE; + public static int SURVIVAL_FIREBOW_DIFFICULTY; + public static int SURVIVAL_EXTRA_ROCK_DROPS; + public static int SURVIVAL_EXTRA_FLINT_DROPS; + public static double SURVIVAL_ROCK_DAMAGE; + public static boolean SURVIVAL_PLANT_FIBER_DROP; + public static boolean SURVIVAL_LEAF_STICK_DROP; + public static boolean SURVIVAL_LEAF_BREAK_FALL; + public static boolean SURVIVAL_NETHER_EARLYGAME; + public static boolean SURVIVAL_WOOD_HARVESTING_TOOLS; + public static boolean SURVIVAL_STONE_HARVESTING_ROCKS; + public static boolean SURVIVAL_BETTER_THAN_PLANKS; + public static boolean SURVIVAL_SHELVES_ACCEPT_FULL_STACK; + + + /// ************************************************************************ /// + // lighting + /// + public static int LIGHTING_TORCH_LIFESPAN; + public static int LIGHTING_TORCH_RECIPE_OUTPUT; + public static int LIGHTING_TORCH_LIT_STACKSIZE; + public static int LIGHTING_TORCH_BURN_CHANCE; + public static int LIGHTING_JACKOLANTERN_LIFESPAN; + + public static int LIGHTING_SMOKE_TORCH_CHANCE; + public static int LIGHTING_SMOKE_TORCH_ARROW_CHANCE; + public static int LIGHTING_SMOKE_LANTERN_CHANCE; + + public static double LIGHTING_JACKOLANTERN_LIGHT_LEVEL; + + public static boolean LIGHTING_JACKOLANTERN_REPLACE_VANILLA; + public static boolean LIGHTING_JACKOLANTERN_CAN_EXPIRE; + public static boolean LIGHTING_TORCHES_REPLACE_VANILLA; + public static boolean LIGHTING_TORCHES_DIE; + + + /// ************************************************************************ /// + // worldgen primal + /// + public static boolean WORLDGEN_ENABLE; + public static boolean WORLDGEN_IN_MOD_DIMENSIONS; + public static boolean WORLDGEN_OVERRIDE_NETHER; + + public static boolean WORLDGEN_LIMESTONE; + public static boolean WORLDGEN_BASALT; + public static boolean WORLDGEN_EARTHWAX; + public static boolean WORLDGEN_TERRACOTTA; + public static boolean WORLDGEN_CINISCOTTA; + public static boolean WORLDGEN_MUD; + public static boolean WORLDGEN_RUSH; + public static boolean WORLDGEN_CORN; + public static boolean WORLDGEN_NETHER_GRASS; + public static boolean WORLDGEN_NETHER_PALM; + public static boolean WORLDGEN_END_GRASS; + public static boolean WORLDGEN_END_WOOD; + public static boolean WORLDGEN_IRONWOOD; + public static boolean WORLDGEN_SALT_FLATS; + public static boolean WORLDGEN_SALT_ROCK; + public static boolean WORLDGEN_SALT_NETHER; + public static boolean WORLDGEN_SALT_END; + public static boolean WORLDGEN_PRIMAL_ORE_IRON; + public static boolean WORLDGEN_PRIMAL_ORE_GOLD; + + /// + // worldgen vanilla + /// + public static boolean WORLDGEN_DISABLE_VANILLA_ORE_IRON; + public static boolean WORLDGEN_DISABLE_VANILLA_ORE_GOLD; + public static boolean WORLDGEN_DISABLE_VANILLA_ORE_COAL; + public static boolean WORLDGEN_DISABLE_VANILLA_ORE_REDSTONE; + public static boolean WORLDGEN_DISABLE_VANILLA_ORE_LAPIS; + public static boolean WORLDGEN_DISABLE_VANILLA_ORE_DIAMOND; + public static boolean WORLDGEN_DISABLE_VANILLA_ORE_EMERALD; + public static boolean WORLDGEN_DISABLE_VANILLA_ORE_QUARTZ; + + + /// ************************************************************************ /// + // crafting overrides + /// + public static boolean CRAFTING_PRIMAL_TOOLS; + public static boolean CRAFTING_ENABLE_SADDLE; + public static boolean CRAFTING_ENABLE_HORSE_ARMOR; + public static boolean CRAFTING_DISABLE_ENDEREYE; + public static boolean CRAFTING_DISABLE_TOOLS_WOOD; + public static boolean CRAFTING_DISABLE_TOOLS_STONE; + public static boolean CRAFTING_DISABLE_TOOLS_IRON; + public static boolean CRAFTING_DISABLE_TOOLS_DIAMOND; + public static boolean CRAFTING_DISABLE_TOOLS_GOLD; + public static boolean CRAFTING_REPLACE_CHISELED_RECIPE; + public static boolean CRAFTING_REPLACE_ARROW_RECIPE; + public static boolean CRAFTING_SURVIVAL_FLINTNSTEEL; + public static boolean CRAFTING_FARMLAND; + + public static boolean CRAFTING_BARK_REMOVAL_ENABLE; + public static boolean CRAFTING_KNAPPING_ENABLE; + + public static double CRAFTING_KNAPPING_DIFFICULTY_FLINT; + public static double CRAFTING_KNAPPING_DIFFICULTY_QUARTZ; + public static double CRAFTING_KNAPPING_DIFFICULTY_OBSIDIAN; + + public static int CRAFTING_DRYING_RACK_BASE_TIME; + //public static int CRAFTING_KNAPPING_DIFFICULTY; + + /// ************************************************************************ /// + // development + /// + public static int DEBUG_LEVEL; + + + /// ************************************************************************ /// + // lists + /// + public static String[] SURVIVAL_WOOD_HARVESTING_ADDITIONS = { }; + public static String[] CRAFTING_REMOVE_NAMES = { }; + public static String[] removeRecipeDisplayNames = { }; + public static String[] FEATURE_CUSTOM_SAPLINGS = { }; + + + /// ************************************************************************ /// + // init config defaults + /// + public static void init(File configFile) + { + // you will be able to find the config file in .minecraft/config/ and it will be named "modname".cfg + // here our Configuration has been instantiated, and saved under the name "config" + Configuration config = new Configuration(configFile); + + // loading the configuration from its file + config.load(); + + + /// ************************************************************************ /// + // features + // + String features_title = "feature hooks"; + ConfigCategory featuresCategory = config.getCategory(features_title); + featuresCategory.setComment("Hooks for controlling various aspects of the mod"); + // + /// ************************************************************************ /// + + Property feature_enable_fuels = config.get(features_title, "FEATURE_ENABLE_FUELS", true); + feature_enable_fuels.setComment("Registration of various fuel items"); + FEATURE_ENABLE_FUELS = feature_enable_fuels.getBoolean(true); + + Property feature_replace_levers = config.get(features_title, "FEATURE_REPLACE_LEVERS", true); + feature_replace_levers.setComment("Replace vanilla levers during block placement"); + FEATURE_REPLACE_LEVERS = feature_replace_levers.getBoolean(true); + + Property feature_disable_nether_portal = config.get(features_title, "FEATURE_DISABLE_NETHER_PORTAL", false); + feature_disable_nether_portal.setComment("Disable Nether Portal Creation"); + FEATURE_DISABLE_NETHER_PORTAL = feature_disable_nether_portal.getBoolean(false); + + Property feature_disable_bed_sleep = config.get(features_title, "FEATURE_DISABLE_BED_SLEEP", false); + feature_disable_bed_sleep.setComment("Disable sleeping in a bed, hackish method of preventing night skipping, if you have a better way plz let me know"); + FEATURE_DISABLE_BED_SLEEP = feature_disable_bed_sleep.getBoolean(false); + + Property feature_disable_bed_spawn = config.get(features_title, "FEATURE_DISABLE_BED_SPAWN", false); + feature_disable_bed_spawn.setComment("Disable setting of spawn via beds or bed-like blocks"); + FEATURE_DISABLE_BED_SPAWN = feature_disable_bed_spawn.getBoolean(false); + + Property feature_auto_plant_saplings = config.get(features_title, "FEATURE_AUTO_PLANT_SAPLINGS", true); + feature_auto_plant_saplings.setComment("Saplings will plant themselves when left in the world"); + FEATURE_AUTO_PLANT_SAPLINGS = feature_auto_plant_saplings.getBoolean(true); + + /// ************************************************************************ /// + // survival + // + String survival_title = "survival settings"; + ConfigCategory survivalCategory = config.getCategory(survival_title); + survivalCategory.setComment("Options balanced toward a harder survival style game"); + // + /// ************************************************************************ /// + + Property survival_mud_dry_time = config.get(survival_title, "SURVIVAL_MUD_DRY_TIME", 40); + survival_mud_dry_time.setComment("Modifier for how long it takes wet mud to dry. Lack of air, rain, or near by water will slow or prevent mud from drying"); + SURVIVAL_MUD_DRY_TIME = survival_mud_dry_time.getInt(40); + + Property survival_thatch_dry_time = config.get(survival_title, "SURVIVAL_THATCH_DRY_TIME", 120); + survival_thatch_dry_time.setComment("Modifier for how long it takes wet thatch to dry, this values is reduced by half when thatch is exposed to the sun, however rain will pose a problem."); + SURVIVAL_THATCH_DRY_TIME = survival_thatch_dry_time.getInt(120); + + Property survival_thatch_support_range = config.get(survival_title, "SURVIVAL_THATCH_SUPPORT_RANGE", 2); + survival_thatch_support_range.setComment("Modifier for how far away wooden slats can be from thatch and still provide support."); + SURVIVAL_THATCH_SUPPORT_RANGE = survival_thatch_support_range.getInt(2); + + Property survival_rock_stacksize = config.get(survival_title, "SURVIVAL_ROCK_STACKSIZE", 16); + survival_rock_stacksize.setComment("How many rocks can a rock stacker stack?"); + SURVIVAL_ROCK_STACKSIZE = survival_rock_stacksize.getInt(16); + + Property survival_rock_damage = config.get(survival_title, "SURVIVAL_ROCK_DAMAGE", 1.5D); + survival_rock_damage.setComment("Amount of damage from a thrown rock"); + SURVIVAL_ROCK_DAMAGE = survival_rock_damage.getDouble(1.5D); + + Property survival_firebow_difficulty = config.get(survival_title, "SURVIVAL_FIREBOW_DIFFICULTY", 8); + survival_firebow_difficulty.setComment("Chance of success with the fire bow, higher is less likely."); + SURVIVAL_FIREBOW_DIFFICULTY = survival_firebow_difficulty.getInt(8); + + Property survival_extra_rock_drops = config.get(survival_title, "SURVIVAL_EXTRA_ROCK_DROPS", 50); + survival_extra_rock_drops.setComment("Harvesting Ground or Sand materials has a chance of dropping rocks, 0 will disable drop while higher values are less and less likely"); + SURVIVAL_EXTRA_ROCK_DROPS = survival_extra_rock_drops.getInt(50); + + Property survival_extra_flint_drops = config.get(survival_title, "SURVIVAL_EXTRA_FLINT_DROPS", 50); + survival_extra_flint_drops.setComment("Harvesting Ground or Sand materials has a chance of dropping flint, 0 will disable drop while higher values are less and less likely"); + SURVIVAL_EXTRA_FLINT_DROPS = survival_extra_flint_drops.getInt(50); + + Property survival_plant_fiber_drop = config.get(survival_title, "SURVIVAL_PLANT_FIBER_DROP", true); + survival_plant_fiber_drop.setComment("Breaking GrassBlocks, TallGrass, and Vines drops plant fibers"); + SURVIVAL_PLANT_FIBER_DROP = survival_plant_fiber_drop.getBoolean(true); + + Property survival_leaf_stick_drop = config.get(survival_title, "SURVIVAL_LEAF_STICK_DROP", true); + survival_leaf_stick_drop.setComment("Breaking leaf blocks will sometimes drop sticks"); + SURVIVAL_LEAF_STICK_DROP = survival_leaf_stick_drop.getBoolean(true); + + Property survival_leaf_break_fall = config.get(survival_title, "SURVIVAL_LEAF_BREAK_FALL", true); + survival_leaf_break_fall.setComment("Falling or jumping onto leaf blocks absorbs some damage and breaks the associated blocks"); + SURVIVAL_LEAF_BREAK_FALL = survival_leaf_break_fall.getBoolean(true); + + Property survival_Nether_earlygame = config.get(survival_title, "SURVIVAL_NETHER_EARLYGAME", true); + survival_Nether_earlygame.setComment("Settings to smooth early gameplay in the Nether, such as harvesting Netherrack without a tool"); + SURVIVAL_NETHER_EARLYGAME = survival_Nether_earlygame.getBoolean(true); + + Property stone_harvesting_rocks = config.get(survival_title, "SURVIVAL_STONE_HARVESTING_ROCKS", false); + stone_harvesting_rocks.setComment("Harvesting smooth stone with a pick drops a number of rocks based on tool level, cobble stone must be crafted"); + SURVIVAL_STONE_HARVESTING_ROCKS = stone_harvesting_rocks.getBoolean(false); + + Property survival_better_than_planks = config.get(survival_title, "SURVIVAL_BETTER_THAN_PLANKS", true); + survival_better_than_planks.setComment("Crafting planks and sticks require the use of a saw and workblade respectively"); + SURVIVAL_BETTER_THAN_PLANKS = survival_better_than_planks.getBoolean(true); + + //Property survival_shelves_accept_full_stack = config.get(survival_title, "SURVIVAL_SHELVES_ACCEPT_FULL_STACK", false); + //survival_shelves_accept_full_stack.setComment("Shelves with load/unload full stacks as opposed to one item at a time."); + //SURVIVAL_SHELVES_ACCEPT_FULL_STACK = survival_shelves_accept_full_stack.getBoolean(false); + + Property survival_wood_harvesting_tools = config.get(survival_title, "SURVIVAL_WOOD_HARVESTING_TOOLS", true); + survival_wood_harvesting_tools.setComment("Harvesting log blocks requires the use of appropriate tools"); + SURVIVAL_WOOD_HARVESTING_TOOLS = survival_wood_harvesting_tools.getBoolean(true); + + Property survival_wood_harvesting_additions = config.get(survival_title, "SURVIVAL_WOOD_HARVESTING_ADDITIONS", SURVIVAL_WOOD_HARVESTING_ADDITIONS); + survival_wood_harvesting_additions.setComment("List of Blocks to treat as wood logs, this is used by the SURVIVAL_WOOD_HARVESTING_TOOLS option."); + SURVIVAL_WOOD_HARVESTING_ADDITIONS = survival_wood_harvesting_additions.getStringList(); + + + /// ************************************************************************ /// + // lighting + // + String lighting_title = "lighting"; + ConfigCategory lightingCategory = config.getCategory(lighting_title); + lightingCategory.setComment("Torch, Lanterns, and other things"); + // + /// ************************************************************************ /// + + Property lighting_torch_lifespan = config.get(lighting_title, "LIGHTING_TORCH_LIFESPAN", 16); + lighting_torch_lifespan.setComment("How long will torches stay lit? higher is a longer life time, while 0 will disable the feature."); + LIGHTING_TORCH_LIFESPAN = lighting_torch_lifespan.getInt(16); + + Property lighting_torch_burn_chance = config.get(lighting_title, "LIGHTING_TORCH_BURN_CHANCE", 500); + lighting_torch_burn_chance.setComment("How likely are Overworld torches to set entities touching them on fire. Higher is less likely, think in large numbers as the check runs continually on block collision."); + LIGHTING_TORCH_BURN_CHANCE = lighting_torch_burn_chance.getInt(500); + + Property lighting_smoke_torch_chance = config.get(lighting_title, "LIGHTING_SMOKE_TORCH_CHANCE", 60); + lighting_smoke_torch_chance.setComment("How likely are torches to produce smoke when exposed to rain or snow. Higher is less likely."); + LIGHTING_SMOKE_TORCH_CHANCE = lighting_smoke_torch_chance.getInt(60); + + Property lighting_smoke_torch_arrow_chance = config.get(lighting_title, "LIGHTING_SMOKE_TORCH_ARROW_CHANCE", 36); + lighting_smoke_torch_arrow_chance.setComment("How likely are torch arrows to produce smoke on impact with a block."); + LIGHTING_SMOKE_TORCH_ARROW_CHANCE = lighting_smoke_torch_arrow_chance.getInt(36); + + Property lighting_smoke_lantern_chance = config.get(lighting_title, "LIGHTING_SMOKE_LANTERN_CHANCE", 40); + lighting_smoke_lantern_chance.setComment("How likely are lanterns to produce smoke when exposed to rain or snow. Higher is less likely."); + LIGHTING_SMOKE_LANTERN_CHANCE = lighting_smoke_lantern_chance.getInt(40); + + //Property lighting_smoke_in_doors = config.get(lighting_title, "LIGHTING_SMOKE_IN_DOORS", false); + //lighting_smoke_in_doors.setComment(""); + //LIGHTING_SMOKE_IN_DOORS = lighting_smoke_in_doors.getBoolean(false); + + Property lighting_jackolantern_light_level = config.get(lighting_title, "LIGHTING_JACKOLANTERN_LIGHT_LEVEL", 0.5D); + lighting_jackolantern_light_level.setComment("Amount of light produced by Jack o'Lanterns. Redstone torches 0.5D, Torch 0.9375D."); + LIGHTING_JACKOLANTERN_LIGHT_LEVEL = lighting_jackolantern_light_level.getDouble(0.5D); + + Property lighting_torch_recipe_output = config.get(lighting_title, "LIGHTING_TORCH_RECIPE_OUTPUT", 4); + lighting_torch_recipe_output.setComment("How many torches are produced from crafting. Currently you must also be overriding vanilla torches for this to work."); + LIGHTING_TORCH_RECIPE_OUTPUT = lighting_torch_recipe_output.getInt(4); + + Property lighting_jackolantern_replace_vanilla = config.get(lighting_title, "LIGHTING_JACKOLANTERN_REPLACE_VANILLA", true); + lighting_jackolantern_replace_vanilla.setComment("Replace vanilla jack-o-lanterns during block placement"); + LIGHTING_JACKOLANTERN_REPLACE_VANILLA = lighting_jackolantern_replace_vanilla.getBoolean(true); + + Property lighting_jackolantern_can_expire = config.get(lighting_title, "LIGHTING_JACKOLANTERN_CAN_EXPIRE", true); + lighting_jackolantern_can_expire.setComment("Jack-o-lanterns can get put out, and or will naturally go out according to how torches are configured"); + LIGHTING_JACKOLANTERN_CAN_EXPIRE = lighting_jackolantern_can_expire.getBoolean(true); + + Property lighting_torches_replace_vanilla = config.get(lighting_title, "LIGHTING_TORCHES_REPLACE_VANILLA", true); + lighting_torches_replace_vanilla.setComment("Replace vanilla torches during block placement, Use an updated recipe and configurable output amount."); + LIGHTING_TORCHES_REPLACE_VANILLA = lighting_torches_replace_vanilla.getBoolean(true); + + Property lighting_torches_die = config.get(lighting_title, "LIGHTING_TORCHES_DIE", false); + lighting_torches_die.setComment("Set this option for torches that will eventually go out even when not exposed to weather. This will also cause torches to create smoke regardless of weather. Separately weather sensitivity can be disabled by setting the lifespan to 0"); + LIGHTING_TORCHES_DIE = lighting_torches_die.getBoolean(false); + + + /// ************************************************************************ /// + // crafting + // + String crafting_title = "crafting control"; + ConfigCategory craftingCategory = config.getCategory(crafting_title); + craftingCategory.setComment("Control over Crafting"); + // + /// ************************************************************************ /// + + Property crafting_primal_tools = config.get(crafting_title, "CRAFTING_PRIMAL_TOOLS", true); + crafting_primal_tools.setComment("Enable crafting recipes for primal tools, currently: flint, quartz"); + CRAFTING_PRIMAL_TOOLS = crafting_primal_tools.getBoolean(true); + + Property crafting_enable_saddle = config.get(crafting_title, "CRAFTING_ENABLE_SADDLE", true); + crafting_enable_saddle.setComment("Enable Crafting recipe for the vanilla saddle"); + CRAFTING_ENABLE_SADDLE = crafting_enable_saddle.getBoolean(true); + + Property crafting_enable_horse_armor = config.get(crafting_title, "CRAFTING_ENABLE_HORSE_ARMOR", true); + crafting_enable_horse_armor.setComment("Enable Crafting recipe for the vanilla horse armor"); + CRAFTING_ENABLE_HORSE_ARMOR = crafting_enable_horse_armor.getBoolean(true); + + Property crafting_disable_endereye = config.get(crafting_title, "CRAFTING_DISABLE_ENDEREYE", false); + crafting_disable_endereye.setComment("Disable crafting recipe for ender eyes"); + CRAFTING_DISABLE_ENDEREYE = crafting_disable_endereye.getBoolean(false); + + Property crafting_disable_tools_wood = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_WOOD", true); + crafting_disable_tools_wood.setComment("Disable crafting recipes for vanilla wood tools, by default flint tools are meant to replace wood."); + CRAFTING_DISABLE_TOOLS_WOOD = crafting_disable_tools_wood.getBoolean(true); + + Property crafting_disable_tools_stone = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_STONE", false); + crafting_disable_tools_stone.setComment("Disable crafting recipes for vanilla stone tools"); + CRAFTING_DISABLE_TOOLS_STONE = crafting_disable_tools_stone.getBoolean(false); + + Property crafting_disable_tools_iron = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_IRON", false); + crafting_disable_tools_iron.setComment("Disable crafting recipes for vanilla iron tools"); + CRAFTING_DISABLE_TOOLS_IRON = crafting_disable_tools_iron.getBoolean(false); + + Property crafting_disable_tools_gold = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_GOLD", false); + crafting_disable_tools_gold.setComment("Disable crafting recipes for vanilla gold tools"); + CRAFTING_DISABLE_TOOLS_GOLD = crafting_disable_tools_gold.getBoolean(false); + + Property crafting_disable_tools_diamond = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_DIAMOND", false); + crafting_disable_tools_diamond.setComment("Disable crafting recipes for vanilla diamond tools"); + CRAFTING_DISABLE_TOOLS_DIAMOND = crafting_disable_tools_diamond.getBoolean(false); + + Property crafting_replace_chiseled_recipe = config.get(crafting_title, "CRAFTING_REPLACE_CHISELED_RECIPE", true); + crafting_replace_chiseled_recipe.setComment("Replace chiseled block recipes to require a work blade"); + CRAFTING_REPLACE_CHISELED_RECIPE = crafting_replace_chiseled_recipe.getBoolean(true); + + Property crafting_replace_arrow_recipe = config.get(crafting_title, "CRAFTING_REPLACE_ARROW_RECIPE", true); + crafting_replace_arrow_recipe.setComment("Replace vanilla arrow recipe to use knapped flint"); + CRAFTING_REPLACE_ARROW_RECIPE = crafting_replace_arrow_recipe.getBoolean(true); + + Property survival_crafting_flintsteel = config.get(crafting_title, "CRAFTING_SURVIVAL_FLINTNSTEEL", true); + survival_crafting_flintsteel.setComment("Enable a more realistic recipe for flint and steel, this drastically reduces the iron cost for early game"); + CRAFTING_SURVIVAL_FLINTNSTEEL = survival_crafting_flintsteel.getBoolean(true); + + Property crafting_farmland = config.get(crafting_title, "CRAFTING_FARMLAND", false); + crafting_farmland.setComment("Tilling Farmland no longer works on vanilla dirt, replaced with a craftable dirt type called loam."); + CRAFTING_FARMLAND = crafting_farmland.getBoolean(false); + + Property crafting_bark_removal_enable = config.get(crafting_title, "CRAFTING_BARK_REMOVAL_ENABLE", true); + crafting_bark_removal_enable.setComment("Enable the in-world bark removal. Used by the work blocks on log blocks"); + CRAFTING_BARK_REMOVAL_ENABLE = crafting_bark_removal_enable.getBoolean(true); + + Property crafting_in_world_knapping = config.get(crafting_title, "CRAFTING_KNAPPING_ENABLE", true); + crafting_in_world_knapping.setComment("Enable the in-world knapping event. Used by flint, quartz, and obsidian."); + CRAFTING_KNAPPING_ENABLE = crafting_in_world_knapping.getBoolean(true); + + Property crafting_drying_rack_base_time = config.get(crafting_title, "CRAFTING_DRYING_RACK_BASE_TIME", 1000); + crafting_drying_rack_base_time.setComment("Base time for the drying rack to complete work on a stack, this is further modified by environment and the item being dried."); + CRAFTING_DRYING_RACK_BASE_TIME = crafting_drying_rack_base_time.getInt(1000); + + Property crafting_knapping_difficulty_flint = config.get(crafting_title, "CRAFTING_KNAPPING_DIFFICULTY_FLINT", 0.40D); + crafting_knapping_difficulty_flint.setComment("Chance of dropping knapped flint from in-world knapping, 1.0D is 100% drop rate."); + CRAFTING_KNAPPING_DIFFICULTY_FLINT = crafting_knapping_difficulty_flint.getDouble(0.45D); + + Property crafting_knapping_difficulty_quartz = config.get(crafting_title, "CRAFTING_KNAPPING_DIFFICULTY_QUARTZ", 0.35D); + crafting_knapping_difficulty_quartz.setComment("Chance of dropping knapped quartz from in-world knapping, 1.0D is 100% drop rate."); + CRAFTING_KNAPPING_DIFFICULTY_QUARTZ = crafting_knapping_difficulty_quartz.getDouble(0.50D); + + Property crafting_knapping_difficulty_obsidian = config.get(crafting_title, "CRAFTING_KNAPPING_DIFFICULTY_OBSIDIAN", 0.25D); + crafting_knapping_difficulty_obsidian.setComment("Chance of dropping knapping output from in-world knapping, 1.0D is 100% drop rate."); + CRAFTING_KNAPPING_DIFFICULTY_OBSIDIAN = crafting_knapping_difficulty_obsidian.getDouble(0.30D); + + Property crafting_remove_names = config.get(crafting_title, "CRAFTING_REMOVE_NAMES", CRAFTING_REMOVE_NAMES); + crafting_remove_names.setComment("List of item/block names to remove from crafting."); + CRAFTING_REMOVE_NAMES = crafting_remove_names.getStringList(); + + + /// ************************************************************************ /// + // worldgen + // + String world_title = "world generation"; + ConfigCategory worldCategory = config.getCategory(world_title); + worldCategory.setComment("Control the world and retro generation"); + // + /// ************************************************************************ /// + + Property worldgen_enable = config.get(world_title, "WORLDGEN_ENABLE", true); + worldgen_enable.setComment("Global control for all primal worldgen"); + WORLDGEN_ENABLE = worldgen_enable.getBoolean(true); + + Property worldgen_override_Nether = config.get(world_title, "WORLDGEN_OVERRIDE_NETHER", true); + worldgen_override_Nether.setComment("Override the Nether World Provider, allows Nether spawn mechanics and additional features. Trust us."); + WORLDGEN_OVERRIDE_NETHER = worldgen_override_Nether.getBoolean(true); + + Property worldgen_in_mod_dimensions = config.get(world_title, "WORLDGEN_IN_MOD_DIMENSIONS", true); + worldgen_in_mod_dimensions.setComment("Allow Overworld generation to take place in custom dimensions"); + WORLDGEN_IN_MOD_DIMENSIONS = worldgen_in_mod_dimensions.getBoolean(true); + + Property worldgen_limestone = config.get(world_title, "WORLDGEN_LIMESTONE", true); + worldgen_limestone.setComment("Enable Worldgen for Limestone/Carbonate Stone, appears primarily in the Overworld"); + WORLDGEN_LIMESTONE = worldgen_limestone.getBoolean(true); + + Property worldgen_basalt = config.get(world_title, "WORLDGEN_BASALT", true); + worldgen_basalt.setComment("Enable Worldgen for Basalt/Ferrous Stone, appears primarily in the Nether"); + WORLDGEN_BASALT = worldgen_basalt.getBoolean(true); + + Property feature_worldgen_basalt = config.get(world_title, "WORLDGEN_EARTHWAX", true); + feature_worldgen_basalt.setComment("Enable Worldgen for Earthwax, appears in both Overworld and Nether"); + WORLDGEN_EARTHWAX = feature_worldgen_basalt.getBoolean(true); + + Property worldgen_earthwax = config.get(world_title, "WORLDGEN_EARTHWAX", true); + worldgen_earthwax.setComment("Enable Worldgen for Earthwax fuel, appears in both Overworld and Nether"); + WORLDGEN_EARTHWAX = worldgen_earthwax.getBoolean(true); + + Property worldgen_terracotta = config.get(world_title, "WORLDGEN_TERRACOTTA", true); + worldgen_terracotta.setComment("Enable Worldgen for Terracotta Clay, appears in Overworld"); + WORLDGEN_TERRACOTTA = worldgen_terracotta.getBoolean(true); + + Property worldgen_ciniscotta = config.get(world_title, "WORLDGEN_CINISCOTTA", true); + worldgen_ciniscotta.setComment("Enable Worldgen for Ciniscotta Clay, appears primarily in the Nether"); + WORLDGEN_CINISCOTTA = worldgen_ciniscotta.getBoolean(true); + + Property worldgen_mud = config.get(world_title, "WORLDGEN_MUD", true); + worldgen_mud.setComment("Enable Worldgen for Mud, appears in the Overworld near water"); + WORLDGEN_MUD = worldgen_mud.getBoolean(true); + + Property worldgen_rush = config.get(world_title, "WORLDGEN_RUSH", true); + worldgen_rush.setComment("Enable Worldgen for Rushes, primary resource for making Thatch, appears in the Overworld near water"); + WORLDGEN_RUSH = worldgen_rush.getBoolean(true); + + Property worldgen_corn = config.get(world_title, "WORLDGEN_CORN", true); + worldgen_corn.setComment("Enable Worldgen for Corn, appears in the Overworld"); + WORLDGEN_CORN = worldgen_corn.getBoolean(true); + + Property worldgen_Nether_grass = config.get(world_title, "WORLDGEN_NETHER_GRASS", true); + worldgen_Nether_grass.setComment("Enable Worldgen for Nether Grass, early game Nether progression"); + WORLDGEN_NETHER_GRASS = worldgen_Nether_grass.getBoolean(true); + + Property worldgen_Nether_palm = config.get(world_title, "WORLDGEN_NETHER_PALM", true); + worldgen_Nether_palm.setComment("Enable Worldgen for Nether Palm trees, also known as Corypha Pachyptila, early game Nether progression"); + WORLDGEN_NETHER_PALM = worldgen_Nether_palm.getBoolean(true); + + Property worldgen_end_grass = config.get(world_title, "WORLDGEN_END_GRASS", true); + worldgen_end_grass.setComment("Enable Worldgen for End Grass, early game End progression"); + WORLDGEN_END_GRASS = worldgen_end_grass.getBoolean(true); + + Property worldgen_end_wood = config.get(world_title, "WORLDGEN_END_WOOD", true); + worldgen_end_wood.setComment("Enable Worldgen for End trees, early game End progression"); + WORLDGEN_END_WOOD = worldgen_end_wood.getBoolean(true); + + Property worldgen_salt_flats = config.get(world_title, "WORLDGEN_SALT_FLATS", true); + worldgen_salt_flats.setComment("Enable Worldgen for Netjry Salt Falts, appears primarily in the Overworld"); + WORLDGEN_SALT_FLATS = worldgen_salt_flats.getBoolean(true); + + Property worldgen_salt_rock = config.get(world_title, "WORLDGEN_SALT_ROCK", true); + worldgen_salt_rock.setComment("Enable Worldgen for Halite Rock Salt, appears primarily in the Overworld"); + WORLDGEN_SALT_ROCK = worldgen_salt_rock.getBoolean(true); + + Property worldgen_salt_nether = config.get(world_title, "WORLDGEN_SALT_NETHER", true); + worldgen_salt_nether.setComment("Enable Worldgen for Fire Rock Salt, early game Nether progression"); + WORLDGEN_SALT_NETHER = worldgen_salt_nether.getBoolean(true); + + Property worldgen_salt_end = config.get(world_title, "WORLDGEN_SALT_END", true); + worldgen_salt_end.setComment("Enable Worldgen for End Rock Salt, early game End progression"); + WORLDGEN_SALT_END = worldgen_salt_end.getBoolean(true); + + Property worldgen_ironwood = config.get(world_title, "WORLDGEN_IRONWOOD", true); + worldgen_ironwood.setComment("Enable Worldgen for Ironwood trees, appear primarily in the Overworld"); + WORLDGEN_IRONWOOD = worldgen_ironwood.getBoolean(true); + + Property worldgen_primal_ore_iron = config.get(world_title, "WORLDGEN_PRIMAL_ORE_IRON", false); + worldgen_primal_ore_iron.setComment("Enable Worldgen for Primal Iron Ore, this generates in large deposits with ore blocks of varying density. EXPERIMENTAL"); + WORLDGEN_PRIMAL_ORE_GOLD = worldgen_primal_ore_iron.getBoolean(false); + + Property worldgen_primal_ore_gold = config.get(world_title, "WORLDGEN_PRIMAL_ORE_GOLD", false); + worldgen_primal_ore_gold.setComment("Enable Worldgen for Primal Gold Ore, this generates in large deposits with ore blocks of varying density. EXPERIMENTAL"); + WORLDGEN_PRIMAL_ORE_GOLD = worldgen_primal_ore_gold.getBoolean(false); + + Property vanilla_disable_ore_iron = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_IRON", false); + vanilla_disable_ore_iron.setComment("Disable worldgen for vanilla iron ore."); + WORLDGEN_DISABLE_VANILLA_ORE_IRON = vanilla_disable_ore_iron.getBoolean(false); + + Property vanilla_disable_ore_gold = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_GOLD", false); + vanilla_disable_ore_gold.setComment("Disable worldgen for vanilla gold ore"); + WORLDGEN_DISABLE_VANILLA_ORE_GOLD = vanilla_disable_ore_gold.getBoolean(false); + + Property vanilla_disable_ore_coal = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_COAL", false); + vanilla_disable_ore_coal.setComment("Disable worldgen for vanilla coal ore"); + WORLDGEN_DISABLE_VANILLA_ORE_COAL = vanilla_disable_ore_coal.getBoolean(false); + + Property vanilla_disable_ore_redstone = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_REDSTONE", false); + vanilla_disable_ore_redstone.setComment("Disable worldgen for vanilla redstone ore"); + WORLDGEN_DISABLE_VANILLA_ORE_REDSTONE = vanilla_disable_ore_redstone.getBoolean(false); + + Property vanilla_disable_ore_lapis = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_LAPIS", false); + vanilla_disable_ore_lapis.setComment("Disable worldgen for vanilla lapis ore"); + WORLDGEN_DISABLE_VANILLA_ORE_LAPIS = vanilla_disable_ore_lapis.getBoolean(false); + + Property vanilla_disable_ore_diamond = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_DIAMOND", false); + vanilla_disable_ore_diamond.setComment("Disable worldgen for vanilla diamond ore"); + WORLDGEN_DISABLE_VANILLA_ORE_DIAMOND = vanilla_disable_ore_diamond.getBoolean(false); + + Property vanilla_disable_ore_emerald = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_EMERALD", false); + vanilla_disable_ore_emerald.setComment("Disable worldgen for vanilla emerald ore"); + WORLDGEN_DISABLE_VANILLA_ORE_EMERALD = vanilla_disable_ore_emerald.getBoolean(false); + + Property vanilla_disable_ore_quartz = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_QUARTZ", false); + vanilla_disable_ore_quartz.setComment("Disable worldgen for vanilla quartz ore"); + WORLDGEN_DISABLE_VANILLA_ORE_QUARTZ = vanilla_disable_ore_quartz.getBoolean(false); + + + /// ************************************************************************ /// + // dev and debugging + // + String debug_title = "debug settings"; + ConfigCategory settingCategory = config.getCategory(debug_title); + settingCategory.setComment("Options useful for debugging and server operators"); + // + /// ************************************************************************ /// + + Property dev_debug_level = config.get(debug_title, "DEBUG_LEVEL", 0); + dev_debug_level.setComment("Debug levels 0-3, by default a zero value disables debug features."); + DEBUG_LEVEL = dev_debug_level.getInt(0); + + + /// ************************************************************************ /// + // save config + // + if(config.hasChanged()) { + config.save(); + } + // + /// ************************************************************************ /// + } +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModCrafting.java b/src/main/java/nmd/primal/forgecraft/common/init/ModCrafting.java new file mode 100644 index 00000000..c99572ad --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModCrafting.java @@ -0,0 +1,1213 @@ +package nmd.primal.forgecraft.common.init; + +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.registry.GameRegistry; +import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; +//import nmd.primal.core.api.ForgeCraftBlocks; +//import nmd.primal.core.api.ForgeCraftItems; +//import nmd.primal.core.api.ForgeCraftRegistries; +//import nmd.primal.core.common.crafting.*; + +import java.util.Map; + +public class ModCrafting +{ + /******************************************************************************* + * Register Recipes and Related Handlers + */ + public static void registerRecipes() + { + /// + // Start by removing vanilla recipes + /// + //ModCrafting.registerRecipeRemover(); + + /// + // + /// + /*ClipperRecipe.registerHandlerRecipe(); + ClipperRecipe.registerStaticRecipes(); + + WorkBladeRecipe.registerHandlerRecipe(); + WorkBladeRecipe.registerStaticRecipes(); + + WorkMalletRecipe.registerHandlerRecipe(); + WorkMalletRecipe.registerStaticRecipes(); + + ModCrafting.registerAxeRecipes(); + ModCrafting.registerSawRecipes(); + + ModCrafting.registerStaticRecipes(); + ModCrafting.registerToolArmorCrafting(); + + // new-style recipe handlers + ModCrafting.addDryingRackRecipes(); + ModCrafting.addKnappingRecipes();*/ + } + + + + /******************************************************************************* + * Knapping Recipes + */ + /*private static void addKnappingRecipes() + { + KnapRecipe.addRecipe(new ItemStack(Items.FLINT), new ItemStack(ForgeCraftItems.FLINT_KNAPP, 1), 1.5F, (float)ModConfig.CRAFTING_KNAPPING_DIFFICULTY_FLINT); + KnapRecipe.addRecipe(new ItemStack(Items.QUARTZ), new ItemStack(ForgeCraftItems.QUARTZ_KNAPP, 1), 2.0F, (float)ModConfig.CRAFTING_KNAPPING_DIFFICULTY_QUARTZ); + KnapRecipe.addRecipe(new ItemStack(ForgeCraftItems.OBSIDIAN_SHARD), new ItemStack(ForgeCraftItems.OBSIDIAN_KNAPP, 1), 2.0F, (float)ModConfig.CRAFTING_KNAPPING_DIFFICULTY_OBSIDIAN); + } + + /// + // Stone Basin Recipes + /// + public static void addBasicKernRecipes(Item tool) + { + ItemStack STONE_BASIN = new ItemStack(tool, 1, net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE); + + /// + // recipes + /// + ForgeCraftRegistries.addBasicKernRecipe(new ItemStack(Items.WHEAT), new ItemStack(ForgeCraftItems.WHEAT_GROUND)); + ForgeCraftRegistries.addBasicKernRecipe(new ItemStack(ForgeCraftItems.CORN_SEEDS, 2), new ItemStack(ForgeCraftItems.CORN_GROUND)); + ForgeCraftRegistries.addBasicKernRecipe("bone", new ItemStack(Items.DYE, 3, 15)); + + /// + // register + /// + for (Map.Entry entry : ForgeCraftRegistries.BASIC_KERN_CRAFTING_REGISTRY.entrySet()) + { + GameRegistry.addRecipe(new ShapedOreRecipe(entry.getValue(), true, new Object[]{"S", "I", "C", + ('S'), "rock", + ('I'), entry.getKey(), + ('C'), STONE_BASIN + })); + } + } + + /// + // Axe Recipes + /// + public static void registerAxeRecipes() + { + /// + // vanilla axes + /// + //ForgeCraftRegistries.addCraftingItem(Items.GOLDEN_AXE, SoundEvents.ITEM_HOE_TILL); + //ForgeCraftRegistries.addCraftingItem(Items.STONE_AXE, SoundEvents.ITEM_HOE_TILL); + //ForgeCraftRegistries.addCraftingItem(Items.IRON_AXE, SoundEvents.ITEM_HOE_TILL); + //ForgeCraftRegistries.addCraftingItem(Items.DIAMOND_AXE, SoundEvents.ITEM_HOE_TILL); + + //ForgeCraftRegistries.addAxe(Items.GOLDEN_AXE, Item.ToolMaterial.GOLD.getHarvestLevel()); + //ForgeCraftRegistries.addAxe(Items.STONE_AXE, Item.ToolMaterial.STONE.getHarvestLevel()); + //ForgeCraftRegistries.addAxe(Items.IRON_AXE, Item.ToolMaterial.IRON.getHarvestLevel()); + //ForgeCraftRegistries.addAxe(Items.DIAMOND_AXE, Item.ToolMaterial.DIAMOND.getHarvestLevel()); + + /// + // recipes + /// + ForgeCraftRegistries.addAxeRecipe("logWood", new ItemStack(Items.STICK, 8)); + ForgeCraftRegistries.addAxeRecipe("plankWood", new ItemStack(Items.STICK, 4)); + ForgeCraftRegistries.addAxeRecipe("slabWood", new ItemStack(Items.STICK, 2)); + ForgeCraftRegistries.addAxeRecipe(new ItemStack(ForgeCraftBlocks.NETHERPALM_LOG), new ItemStack(ForgeCraftItems.NETHERPALM_STICK, 8)); + ForgeCraftRegistries.addAxeRecipe(new ItemStack(ForgeCraftBlocks.NETHERPALM_PLANK), new ItemStack(ForgeCraftItems.NETHERPALM_STICK, 4)); + ForgeCraftRegistries.addAxeRecipe(new ItemStack(ForgeCraftBlocks.SLAB_NETHERPALM), new ItemStack(ForgeCraftItems.NETHERPALM_STICK, 2)); + ForgeCraftRegistries.addAxeRecipe(new ItemStack(ForgeCraftBlocks.MUD_BLOCK_DRY), new ItemStack(ForgeCraftBlocks.SLAB_MUD, 2)); + + ForgeCraftRegistries.addAxeSideRecipe(new ItemStack(Blocks.LOG, 1, 0), new ItemStack(ForgeCraftBlocks.WORKTABLE_OAK_LOG)); + ForgeCraftRegistries.addAxeSideRecipe(new ItemStack(Blocks.LOG, 1, 1), new ItemStack(ForgeCraftBlocks.WORKTABLE_SPRUCE_LOG)); + ForgeCraftRegistries.addAxeSideRecipe(new ItemStack(Blocks.LOG, 1, 2), new ItemStack(ForgeCraftBlocks.WORKTABLE_BIRCH_LOG)); + ForgeCraftRegistries.addAxeSideRecipe(new ItemStack(Blocks.LOG, 1, 3), new ItemStack(ForgeCraftBlocks.WORKTABLE_JUNGLE_LOG)); + ForgeCraftRegistries.addAxeSideRecipe(new ItemStack(Blocks.LOG2, 1, 0), new ItemStack(ForgeCraftBlocks.WORKTABLE_ACACIA_LOG)); + ForgeCraftRegistries.addAxeSideRecipe(new ItemStack(Blocks.LOG2, 1, 1), new ItemStack(ForgeCraftBlocks.WORKTABLE_BIGOAK_LOG)); + + + /// + // .. + /// + for (Map.Entry tool : ForgeCraftRegistries.AXE_REGISTRY.entrySet()) + { + /// + // tool + /// + ItemStack TOOL = new ItemStack(tool.getKey(), 1, net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE); + + /// + // register + /// + for (Map.Entry entry : ForgeCraftRegistries.AXE_CRAFTING_REGISTRY.entrySet()) + { + GameRegistry.addRecipe(new ShapedOreRecipe(entry.getValue(), true, new Object[]{"C", "I", + ('I'), entry.getKey(), + ('C'), TOOL + })); + } + + for (Map.Entry entry : ForgeCraftRegistries.AXE_SIDE_CRAFTING_REGISTRY.entrySet()) + { + GameRegistry.addRecipe(new ShapedOreRecipe(entry.getValue(), true, new Object[]{"IC", + ('I'), entry.getKey(), + ('C'), TOOL + })); + } + } + } + + /// + // Hand Saws + /// + public static void registerSawRecipes() + { + /// + // recipes + /// + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG, 1, 0), new ItemStack(Blocks.PLANKS, 4, 0)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG, 1, 1), new ItemStack(Blocks.PLANKS, 4, 1)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG, 1, 2), new ItemStack(Blocks.PLANKS, 4, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG, 1, 3), new ItemStack(Blocks.PLANKS, 4, 3)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG2, 1, 0), new ItemStack(Blocks.PLANKS, 4, 4)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG2, 1, 1), new ItemStack(Blocks.PLANKS, 4, 5)); + + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.MUD_BLOCK_DRY, 1), new ItemStack(ForgeCraftBlocks.SLAB_MUD, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.NETHERPALM_LOG, 1), new ItemStack(ForgeCraftBlocks.NETHERPALM_PLANK, 2)); + + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.PLANKS, 1, 0), new ItemStack(Blocks.WOODEN_SLAB, 2, 0)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.PLANKS, 1, 1), new ItemStack(Blocks.WOODEN_SLAB, 2, 1)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.PLANKS, 1, 2), new ItemStack(Blocks.WOODEN_SLAB, 2, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.PLANKS, 1, 3), new ItemStack(Blocks.WOODEN_SLAB, 2, 3)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.PLANKS, 1, 4), new ItemStack(Blocks.WOODEN_SLAB, 2, 4)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.PLANKS, 1, 5), new ItemStack(Blocks.WOODEN_SLAB, 2, 5)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.IRONWOOD_PLANK, 1), new ItemStack(ForgeCraftBlocks.SLAB_IRONWOOD, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.NETHERPALM_PLANK, 1), new ItemStack(ForgeCraftBlocks.SLAB_NETHERPALM, 2)); + + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.WOODEN_SLAB, 1, 4), new ItemStack(ForgeCraftBlocks.THIN_SLAB_ACACIA, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.WOODEN_SLAB, 1, 5), new ItemStack(ForgeCraftBlocks.THIN_SLAB_BIGOAK, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.WOODEN_SLAB, 1, 2), new ItemStack(ForgeCraftBlocks.THIN_SLAB_BIRCH, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.WOODEN_SLAB, 1, 3), new ItemStack(ForgeCraftBlocks.THIN_SLAB_JUNGLE, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.WOODEN_SLAB, 1, 0), new ItemStack(ForgeCraftBlocks.THIN_SLAB_OAK, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.WOODEN_SLAB, 1, 1), new ItemStack(ForgeCraftBlocks.THIN_SLAB_SPRUCE, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.SLAB_IRONWOOD), new ItemStack(ForgeCraftBlocks.THIN_SLAB_IRONWOOD, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.SLAB_NETHERPALM), new ItemStack(ForgeCraftBlocks.THIN_SLAB_NETHERPALM, 2)); + + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.THIN_SLAB_ACACIA), new ItemStack(ForgeCraftBlocks.SLAT_ACACIA, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.THIN_SLAB_BIGOAK), new ItemStack(ForgeCraftBlocks.SLAT_BIGOAK, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.THIN_SLAB_BIRCH), new ItemStack(ForgeCraftBlocks.SLAT_BIRCH, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.THIN_SLAB_JUNGLE), new ItemStack(ForgeCraftBlocks.SLAT_JUNGLE, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.THIN_SLAB_OAK), new ItemStack(ForgeCraftBlocks.SLAT_OAK, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.THIN_SLAB_SPRUCE), new ItemStack(ForgeCraftBlocks.SLAT_SPRUCE, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.THIN_SLAB_IRONWOOD), new ItemStack(ForgeCraftBlocks.SLAT_IRONWOOD, 2)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(ForgeCraftBlocks.THIN_SLAB_NETHERPALM), new ItemStack(ForgeCraftBlocks.SLAT_NETHERPALM, 2)); + + /// + // .. + /// + for (Map.Entry tool : ForgeCraftRegistries.SAW_REGISTRY.entrySet()) + { + /// + // tool + /// + ItemStack TOOL = new ItemStack(tool.getKey(), 1, net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE); + + /// + // register + /// + for (Map.Entry entry : ForgeCraftRegistries.SAW_CRAFTING_REGISTRY.entrySet()) + { + GameRegistry.addRecipe(new ShapedOreRecipe(entry.getValue(), true, new Object[]{"C", "I", + ('I'), entry.getKey(), + ('C'), TOOL + })); + } + } + } + + /// + // Hand Clipper + /// + public static void addBasicClipperRecipes(Item tool) + { + /// + // recipes + /// + ForgeCraftRegistries.addBasicClipperRecipe(new ItemStack(ForgeCraftItems.IRON_SHEET, 1, 0), new ItemStack(ForgeCraftItems.IRON_STRANDS, 4, 0)); + } + + /// + // WorkBlade Recipes + /// + public static void addCommonBladeRecipes(Item tool) + { + /// + // basic + /// + //ForgeCraftRegistries.addBladeRecipe(new ItemStack(Items.ARROW), new ItemStack(ForgeCraftItems.FLINT_KNAPP, 1)); + ForgeCraftRegistries.addBladeRecipe("stickWood", new ItemStack(ForgeCraftItems.WOOD_PINS, 1)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(ForgeCraftItems.NETHERPALM_STICK), new ItemStack(ForgeCraftItems.NETHERPALM_PINS, 1)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.LADDER), new ItemStack(Items.STICK, 4)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.CHEST), new ItemStack(Blocks.PLANKS, 5)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.TRAPDOOR), new ItemStack(Blocks.PLANKS, 4)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Items.BOAT), new ItemStack(Blocks.PLANKS, 2)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Items.LEATHER), new ItemStack(ForgeCraftItems.LEATHER_STRIP, 9)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Items.WHEAT), new ItemStack(Items.WHEAT_SEEDS, 1)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(ForgeCraftItems.CORN_COB), new ItemStack(ForgeCraftItems.CORN_SEEDS, 1)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(ForgeCraftItems.RUSH_TIPS_BLOOM), new ItemStack(ForgeCraftItems.RUSH_SEEDS, 1)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(ForgeCraftItems.RUSH_TIPS), new ItemStack(ForgeCraftItems.PLANT_FIBER, 2)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(ForgeCraftItems.RUSH_STEMS), new ItemStack(ForgeCraftItems.PLANT_FIBER, 4)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(ForgeCraftBlocks.MUD_BLOCK_DRY), new ItemStack(ForgeCraftBlocks.SLAB_MUD, 2)); + ForgeCraftRegistries.addBladeRecipe("bone", new ItemStack(ForgeCraftItems.SHARP_BONE, 1)); + + //if (!ModConfig.CRAFTING_BARK_REMOVAL_ENABLE) { + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG, 1, 0), new ItemStack(ForgeCraftItems.BARK_OAK, 4)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG, 1, 1), new ItemStack(ForgeCraftItems.BARK_SPRUCE, 4)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG, 1, 2), new ItemStack(ForgeCraftItems.BARK_BIRCH, 4)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG, 1, 3), new ItemStack(ForgeCraftItems.BARK_JUNGLE, 4)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG2, 1, 0), new ItemStack(ForgeCraftItems.BARK_ACACIA, 4)); + ForgeCraftRegistries.addBasicSawRecipe(new ItemStack(Blocks.LOG2, 1, 1), new ItemStack(ForgeCraftItems.BARK_BIGOAK, 4)); + //} + + if (ModConfig.CRAFTING_REPLACE_CHISELED_RECIPE) { + ItemStack removeItems[] = { new ItemStack(Blocks.STONEBRICK, 1, 3), new ItemStack(Blocks.SANDSTONE, 1, 1), new ItemStack(Blocks.RED_SANDSTONE, 1, 1), new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1) }; + RecipeRemover.removeRecipeByStack(removeItems); + + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.STONEBRICK), new ItemStack(Blocks.STONEBRICK, 1, 3)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.SANDSTONE), new ItemStack(Blocks.SANDSTONE, 1, 1)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.RED_SANDSTONE), new ItemStack(Blocks.RED_SANDSTONE, 1, 1)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.QUARTZ_BLOCK), new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1)); + ForgeCraftRegistries.addBladeRecipe(new ItemStack(ForgeCraftBlocks.SOULSTONE_SMOOTH), new ItemStack(ForgeCraftBlocks.SOULSTONE_CHISELED)); + + } else { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.SOULSTONE_CHISELED, 1), true, new Object[]{"S", "S", + ('S'), ForgeCraftBlocks.SLAB_SOULSTONE + })); + } + + /// + // doors + /// + //ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.OAK_DOOR), new ItemStack(Blocks.PLANKS, 4, 0)); + //ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.SPRUCE_DOOR), new ItemStack(Blocks.PLANKS, 4, 1)); + //ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.BIRCH_DOOR), new ItemStack(Blocks.PLANKS, 4, 2)); + //ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.JUNGLE_DOOR), new ItemStack(Blocks.PLANKS, 4, 3)); + //ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.ACACIA_DOOR), new ItemStack(Blocks.PLANKS, 4, 4)); + //ForgeCraftRegistries.addBladeRecipe(new ItemStack(Blocks.DARK_OAK_DOOR), new ItemStack(Blocks.PLANKS, 4, 5)); + } + + /// + // Gallagher Recipes + /// + public static void addGallagherRecipes(Item tool) + { + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(Blocks.STONE), new ItemStack(ForgeCraftItems.ROCK, 9)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(Blocks.COBBLESTONE), new ItemStack(ForgeCraftItems.ROCK, 5)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(Blocks.MOSSY_COBBLESTONE), new ItemStack(ForgeCraftItems.ROCK, 5)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(Blocks.STONE_SLAB), new ItemStack(ForgeCraftItems.ROCK, 2)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(Blocks.STONE_SLAB, 1, 1), new ItemStack(ForgeCraftItems.ROCK, 2)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(Blocks.COBBLESTONE_WALL), new ItemStack(Blocks.COBBLESTONE, 1)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(Blocks.COBBLESTONE_WALL, 1, 1), new ItemStack(Blocks.COBBLESTONE, 1)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(Blocks.IRON_BARS, 1, 1), new ItemStack(ForgeCraftBlocks.SLAT_IRON, 1)); + + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(ForgeCraftBlocks.WALL_CARBONATE_BRICK), new ItemStack(ForgeCraftBlocks.CARBONATE_BRICK, 1)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(ForgeCraftBlocks.WALL_CARBONATE_FLAG, 1, 1), new ItemStack(ForgeCraftBlocks.CARBONATE_FLAG, 1)); + + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(ForgeCraftBlocks.WALL_FERRO_BRICK), new ItemStack(ForgeCraftBlocks.FERRO_BRICK, 1)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(ForgeCraftBlocks.WALL_FERRO_FLAG, 1, 1), new ItemStack(ForgeCraftBlocks.FERRO_FLAG, 1)); + + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(ForgeCraftBlocks.WALL_NETHERSTONE), new ItemStack(ForgeCraftBlocks.NETHERSTONE, 1)); + ForgeCraftRegistries.addGallagherRecipe(new ItemStack(ForgeCraftBlocks.WALL_NETHERRACK, 1, 1), new ItemStack(Blocks.NETHERRACK, 1)); + + + //ForgeCraftRegistries.addGallagherRecipe("nuggetIron", new ItemStack(ForgeCraftItems.IRON_STRANDS)); + //ForgeCraftRegistries.addGallagherRecipe("nuggetPigiron", new ItemStack(ForgeCraftItems.IRON_STRANDS)); + ForgeCraftRegistries.addGallagherRecipe("ingotIron", new ItemStack(ForgeCraftItems.IRON_SHEET, 2)); + ForgeCraftRegistries.addGallagherRecipe("plateIron", new ItemStack(ForgeCraftItems.IRON_RING, 8)); + ForgeCraftRegistries.addGallagherRecipe("sheetIron", new ItemStack(ForgeCraftItems.IRON_RING, 4)); + //ForgeCraftRegistries.addGallagherRecipe("ingotPigiron", new ItemStack(ForgeCraftItems.IRON_RING, 9)); + ForgeCraftRegistries.addGallagherRecipe("strandIron", new ItemStack(ForgeCraftItems.IRON_PINS, 1)); + + /// + // double stack items + /// + //CraftingHelper.addLargeToolRecipe(tool, new ItemStack(ForgeCraftItems.IRON_STRANDS), new ItemStack(ForgeCraftItems.IRON_MESH, 2)); + } + + private static void addDryingRackRecipes() + { + DryingRecipe.addRecipe(new ItemStack(Items.FISH, 1, 0), new ItemStack(ForgeCraftItems.FISH_COD_DRIED), new ItemStack(ForgeCraftItems.FISH_COD_ROTTEN), 2600, 10); + DryingRecipe.addRecipe(new ItemStack(ForgeCraftItems.FISH_COD_SALTED), new ItemStack(ForgeCraftItems.FISH_COD_CURED), new ItemStack(ForgeCraftItems.FISH_COD_ROTTEN), 1600, 25); + + DryingRecipe.addRecipe(new ItemStack(Items.FISH, 1, 1), new ItemStack(ForgeCraftItems.FISH_SALMON_DRIED), new ItemStack(ForgeCraftItems.FISH_COD_ROTTEN), 2600, 10); + DryingRecipe.addRecipe(new ItemStack(ForgeCraftItems.FISH_SALMON_SALTED), new ItemStack(ForgeCraftItems.FISH_SALMON_CURED), new ItemStack(ForgeCraftItems.FISH_COD_ROTTEN), 1600, 25); + + DryingRecipe.addRecipe(new ItemStack(Items.FISH, 1, 2), new ItemStack(ForgeCraftItems.FISH_CLOWN_DRIED), new ItemStack(ForgeCraftItems.FISH_COD_ROTTEN), 2600, 10); + DryingRecipe.addRecipe(new ItemStack(ForgeCraftItems.FISH_CLOWN_SALTED), new ItemStack(ForgeCraftItems.FISH_CLOWN_CURED), new ItemStack(ForgeCraftItems.FISH_COD_ROTTEN), 1600, 25); + + DryingRecipe.addRecipe(new ItemStack(Items.FISH, 1, 3), new ItemStack(ForgeCraftItems.FISH_PUFFER_DRIED), new ItemStack(ForgeCraftItems.FISH_COD_ROTTEN), 2600, 10); + DryingRecipe.addRecipe(new ItemStack(ForgeCraftItems.FISH_PUFFER_SALTED), new ItemStack(ForgeCraftItems.FISH_PUFFER_CURED), new ItemStack(ForgeCraftItems.FISH_COD_ROTTEN), 1600, 25); + + DryingRecipe.addRecipe(new ItemStack(ForgeCraftItems.FISH_LAVAWORM_RAW, 1), new ItemStack(ForgeCraftItems.FISH_LAVAWORM_DRIED), new ItemStack(ForgeCraftItems.FISH_LAVAWORM_ROTTEN), 2600, 6); + DryingRecipe.addRecipe(new ItemStack(ForgeCraftItems.FISH_LAVAWORM_SALTED), new ItemStack(ForgeCraftItems.FISH_LAVAWORM_CURED), new ItemStack(ForgeCraftItems.FISH_LAVAWORM_ROTTEN), 1600, 3); + + } +/* + + /******************************************************************************* + * Static Recipes + */ + public static void registerToolArmorCrafting() + { + /*if (ModConfig.CRAFTING_PRIMAL_TOOLS) + { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.STONE_BASIN), true, new Object[]{"I I", " I ", ('I'), Blocks.STONE})); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.FIRE_BOW), " S", " SC", "S C", + ('S'), "stickWood", + ('C'), "cordageGeneral")); + + //GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ForgeCraftItems.SHARP_BONE, 1), "bone", new ItemStack(Items.FLINT, 1))); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ForgeCraftItems.SHARP_BONE, 1), Items.BONE, "knappedFlint")); + + /// + // Arrows + /// + if (ModConfig.CRAFTING_REPLACE_ARROW_RECIPE) { + ItemStack removeItems[] = { new ItemStack(Items.ARROW) }; + RecipeRemover.removeRecipeByStack(removeItems); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.ARROW, 4), "T", "S", "F", + ('T'), "knappedFlint", + ('S'), "stickWood", + ('F'), "feather")); + } + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.ARROW_QUARTZ, 4), "T", "S", "F", + ('T'), "knappedQuartz", + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('F'), ForgeCraftItems.NETHER_CORDAGE)); + + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.ARROW_TORCH_WOOD, 1), "T", "F", + ('T'), ForgeCraftItems.TORCH_WOOD_LIT, + ('F'), "feather")); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.ARROW_TORCH_WOOD, 1), "T", "F", + ('T'), Blocks.TORCH, + ('F'), "feather")); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.ARROW_TORCH_NETHER, 1), "T", "F", + ('T'), ForgeCraftItems.TORCH_NETHER_LIT, + ('F'), ForgeCraftItems.NETHER_CORDAGE)); + + /// + // Hand Saw + /// + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.IRON_SAW, "I ", " IP", " SS", + ('I'), "sheetIron", + ('S'), "stickWood", + ('P'), "pinBasic")); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.QUARTZ_SAW, "I ", " IP", " SS", + ('I'), "knappedQuartz", + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('P'), "pinBasic")); + + /// + // Hand Clippers + /// + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.IRON_CLIPPERS, " I ", "IPS", " S ", + ('I'), "sheetIron", + ('S'), "stickWood", + ('P'), "pinBasic")); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.QUARTZ_CLIPPERS, " I ", "IPS", " S ", + ('I'), "knappedQuartz", + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('P'), "pinBasic")); + + + /// + // Work Blades + /// + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.FLINT_WORKBLADE, " FB", "FCF", "SF ", + ('B'), Items.FLINT, + ('F'), "knappedFlint", + ('S'), "stickWood", + ('C'), "cordageGeneral")); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.QUARTZ_WORKBLADE, " FB", "FCF", "SF ", + ('B'), Items.QUARTZ, + ('F'), "knappedQuartz", + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('C'), "cordageNether")); + + /// + // Mallets + /// + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.STONE_GALLAGHER, "ICI", "ISI", " S ", + ('I'), Blocks.STONE, + ('S'), "stickWood", + ('C'), "cordageGeneral")); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.NETHER_GALLAGHER, "ICI", "ISI", " S ", + ('I'), ForgeCraftBlocks.NETHERSTONE, + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('C'), "cordageNether")); + + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.QUARTZ_GALLAGHER, "ICI", "ISI", " S ", + ('I'), Blocks.QUARTZ_BLOCK, + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('C'), "cordageNether")); + + /// + // Flint Tools + /// + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.FLINT_HATCHET), "KC", " S", + ('K'), "knappedFlint", + ('S'), "stickWood", + ('C'), "cordageGeneral")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.FLINT_PICKAXE), "KCK", "KSK", " S ", + ('K'), "knappedFlint", + ('S'), "stickWood", + ('C'), "cordageGeneral")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.FLINT_AXE), "KCK", "KS ", " S ", + //('F'), Items.FLINT, + ('K'), "knappedFlint", + ('S'), "stickWood", + ('C'), "cordageGeneral")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.FLINT_SHOVEL), " F ", " C ", " S ", + ('F'), Items.FLINT, + ('S'), "stickWood", + ('C'), "cordageGeneral")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.FLINT_HOE), "KKC", " S ", "S ", + ('K'), "knappedFlint", + ('S'), "stickWood", + ('C'), "cordageGeneral")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.FLINT_SHEARS), " F", "FC", + ('F'), "knappedFlint", + ('C'), "cordageGeneral")); + + /// + // Quartz Tools + /// + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.QUARTZ_HATCHET), "KC", " S", + ('K'), "knappedQuartz", + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('C'), "cordageNether")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.QUARTZ_PICKAXE), "KCK", "KSK", " S ", + ('K'), "knappedQuartz", + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('C'), "cordageNether")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.QUARTZ_AXE), "KCK", "KS ", " S ", + ('K'), "knappedQuartz", + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('C'), "cordageNether")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.QUARTZ_SHOVEL), " F ", " C ", " S ", + ('F'), Items.QUARTZ, + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('C'), "cordageNether")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.QUARTZ_HOE), "KKC", " S ", "S ", + ('K'), "knappedQuartz", + ('S'), ForgeCraftItems.NETHERPALM_STICK, + ('C'), "cordageNether")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.QUARTZ_SHEARS), " F", "FC", + ('F'), "knappedQuartz", + ('C'), "cordageNether")); + + }*/ + } + + + public static void registerStaticRecipes() + { + /* + /// + // Cordage + /// + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.PLANT_CORDAGE, true, new Object[]{" I", "II", ('I'), ForgeCraftItems.PLANT_FIBER})); + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.NETHER_CORDAGE, true, new Object[]{" I", "II", ('I'), ForgeCraftItems.NETHER_FIBER})); + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.LEATHER_CORDAGE, true, new Object[]{" I", "II", ('I'), ForgeCraftItems.LEATHER_STRIP})); + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.SILK_CORDAGE, true, new Object[]{" I", "II", ('I'), Items.STRING})); + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.SILK_CORDAGE_COILED, true, new Object[]{" I", "II", ('I'), ForgeCraftItems.SILK_CORDAGE})); + + /// + // Oak Slats + // pre-iron recipe + /// + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.SLAT_OAK, 1), true, new Object[]{"SSS", "SSS", + ('S'), "stickWood" + })); + + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.LANTERN_EMPTY, 1), true, new Object[]{"SIS", "W P", "SIS", + ('I'), ForgeCraftItems.IRON_SHEET, + ('P'), ForgeCraftItems.IRON_PINS, + ('S'), ForgeCraftItems.IRON_STRANDS, + ('W'), "stickWood" + })); + + //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.LANTERN_TORCH, 1), true, new Object[]{"L", "T", + // ('L'), ForgeCraftBlocks.LANTERN_EMPTY, + // ('T'), Blocks.TORCH + //})); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.LANTERN_TORCH, 1), true, new Object[]{"L", "T", + ('L'), ForgeCraftBlocks.LANTERN_EMPTY, + ('T'), ForgeCraftBlocks.TORCH_WOOD + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.LANTERN_NETHER, 1), true, new Object[]{"L", "T", + ('L'), ForgeCraftBlocks.LANTERN_EMPTY, + ('T'), ForgeCraftBlocks.TORCH_NETHER + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.LANTERN_REDSTONE, 1), true, new Object[]{"L", "T", + ('L'), ForgeCraftBlocks.LANTERN_EMPTY, + ('T'), Blocks.REDSTONE_TORCH + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.LANTERN_IGNIS, 1), true, new Object[]{"L", "T", + ('L'), ForgeCraftBlocks.LANTERN_EMPTY, + ('T'), ForgeCraftBlocks.IGNIS_FATUUS + })); + + /// + // .. + /// + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.PLANT_FIBER), new ItemStack(ForgeCraftItems.PLANT_TINDER, 1)); + CraftingHelper.add3x3Crafting(new ItemStack(ForgeCraftItems.PLANT_CORDAGE), new ItemStack(ForgeCraftItems.PLANT_CLOTH, 2)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.NETHER_FIBER), new ItemStack(ForgeCraftItems.NETHER_TINDER, 1)); + CraftingHelper.add3x3Crafting(new ItemStack(ForgeCraftItems.NETHER_CORDAGE), new ItemStack(ForgeCraftItems.NETHER_CLOTH, 2)); + + /// + // Cobble Stone + /// + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.MORTAR, 16), true, new Object[]{"SCS", "CSC", "SCS", + ('C'), "clayball", + ('S'), Blocks.SAND + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.MORTAR, 16), true, new Object[]{"SCS", "CSC", "SCS", + ('C'), "slimeball", + ('S'), Blocks.SAND + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.COBBLESTONE, 1), true, new Object[]{"SCS", "CSC", "SCS", + ('C'), ForgeCraftItems.MORTAR, + ('S'), ForgeCraftItems.ROCK + })); + + + /// LOAM + + //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.LOAM_BLOCK, 8), true, new Object[]{"DSD", "SCS", "DSD", + // ('C'), "clayball", + // ('S'), Blocks.SAND, + // ('D'), Blocks.DIRT + //})); + + /// + // Mossy + /// + + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_COBBLESTONE_MOSSY, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), new ItemStack(Blocks.MOSSY_COBBLESTONE, 1, 1) + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_STONEBRICK_MOSSY, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), new ItemStack(Blocks.STONEBRICK, 1, 1) + })); + + /// + // Nether + /// + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.NETHERRACK), new ItemStack(ForgeCraftBlocks.NETHERSTONE, 1)); + //CraftingHelper.add2x2Crafting(new ItemStack(Blocks.SOUL_SAND), new ItemStack(ForgeCraftBlocks.SOULSTONE, 1)); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.WALL_NETHERRACK, 6), true, new Object[]{"SSS", "SSS", + ('S'), Blocks.NETHERRACK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.WALL_NETHERSTONE, 6), true, new Object[]{"SSS", "SSS", + ('S'), ForgeCraftBlocks.NETHERSTONE + })); + + + /// + // Carbonate + /// + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.CARBONATE_SLACK), new ItemStack(ForgeCraftBlocks.CARBONATE_STONE, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftBlocks.CARBONATE_STONE), new ItemStack(ForgeCraftBlocks.CARBONATE_FLAG, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftBlocks.CARBONATE_FLAG), new ItemStack(ForgeCraftBlocks.CARBONATE_BRICK, 4)); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_CARBONATE_FLAG, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), ForgeCraftBlocks.CARBONATE_FLAG + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_CARBONATE_BRICK, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), ForgeCraftBlocks.CARBONATE_BRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.WALL_CARBONATE_BRICK, 6), true, new Object[]{"SSS", "SSS", + ('S'), ForgeCraftBlocks.CARBONATE_BRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.WALL_CARBONATE_FLAG, 6), true, new Object[]{"SSS", "SSS", + ('S'), ForgeCraftBlocks.CARBONATE_FLAG + })); + + /// FERRO /// + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.CARBONATE_FERRO_SLACK), new ItemStack(ForgeCraftBlocks.FERRO_STONE, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftBlocks.FERRO_STONE), new ItemStack(ForgeCraftBlocks.FERRO_FLAG, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftBlocks.FERRO_FLAG), new ItemStack(ForgeCraftBlocks.FERRO_BRICK, 4)); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_FERRO_FLAG, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), ForgeCraftBlocks.FERRO_FLAG + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_FERRO_BRICK, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), ForgeCraftBlocks.FERRO_BRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.WALL_FERRO_BRICK, 6), true, new Object[]{"SSS", "SSS", + ('S'), ForgeCraftBlocks.FERRO_BRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.WALL_FERRO_FLAG, 6), true, new Object[]{"SSS", "SSS", + ('S'), ForgeCraftBlocks.FERRO_FLAG + })); + + + /// + // IronWood, Netherpalm + /// + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.FENCE_IRONWOOD, 6), true, new Object[]{"BSB", "BSB", + ('B'), ForgeCraftBlocks.IRONWOOD_PLANK, + ('S'), ForgeCraftItems.IRONWOOD_STICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_IRONWOOD, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), ForgeCraftBlocks.IRONWOOD_PLANK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.FENCE_NETHERPALM, 6), true, new Object[]{"BSB", "BSB", + ('B'), ForgeCraftBlocks.NETHERPALM_PLANK, + ('S'), ForgeCraftItems.NETHERPALM_STICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_NETHERPALM, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), ForgeCraftBlocks.NETHERPALM_PLANK + })); + + + /// + // STAIRS, PRESSURE PLATES, ETC + /// + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.PRESSPLATE_DIRT, 1), true, new Object[]{"SS", + ('S'), Blocks.DIRT + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.PRESSPLATE_GRASS, 1), true, new Object[]{"SS", + ('S'), Blocks.GRASS + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.PRESSPLATE_GLASS, 1), true, new Object[]{"SS", + ('S'), Blocks.GLASS + })); + + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_NETHERRACK, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), Blocks.NETHERRACK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.PRESSPLATE_NETHERRACK, 1), true, new Object[]{"SS", + ('S'), Blocks.NETHERRACK + })); + + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_NETHERPALM, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), ForgeCraftBlocks.NETHERPALM_PLANK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.PRESSPLATE_NETHERPALM, 1), true, new Object[]{"SS", + ('S'), ForgeCraftBlocks.NETHERPALM_PLANK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.PRESSPLATE_THATCH, 1), true, new Object[]{"SS", + ('S'), ForgeCraftBlocks.THATCH + })); + + /// + // Grates + /// + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_ACACIA, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_ACACIA + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_BIGOAK, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_BIGOAK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_BIRCH, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_BIRCH + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_CARBONATE_BRICK, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_CARBONATE_BRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_CARBONATE_FLAG, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_CARBONATE_FLAG + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_ENDBRICK, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_ENDBRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_ENDSTONE, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_ENDSTONE + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_FERRO_BRICK, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_FERRO_BRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_FERRO_FLAG, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_FERRO_FLAG + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_IRONWOOD, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_IRONWOOD + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_JUNGLE, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_JUNGLE + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_MUD, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_OAK, + ('S'), ForgeCraftBlocks.THIN_SLAB_MUD + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_NETHERBRICK, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_NETHERBRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_NETHERPALM, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_NETHERPALM + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_NETHERRACK, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.NETHERPALM_STICK, + ('S'), ForgeCraftBlocks.THIN_SLAB_NETHERRACK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_NETHERSTONE, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_NETHERSTONE + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_OAK, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_OAK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_SANDSTONE, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_SANDSTONE + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_SOULSTONE, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_SOULSTONE + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_SPRUCE, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_SPRUCE + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_STONEBRICK, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_STONEBRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_STONEBRICK_MOSSY, 1), true, new Object[]{"I", "S", + ('I'), ForgeCraftItems.IRON_MESH, + ('S'), ForgeCraftBlocks.THIN_SLAB_STONEBRICK_MOSSY + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.GRATE_THATCH, 1), true, new Object[]{"I", "S", + ('I'), Items.STICK, + ('S'), ForgeCraftBlocks.THIN_SLAB_THATCH + })); + + /// + // Drains + /// + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_CARBONATE_BRICK, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), ForgeCraftBlocks.THIN_SLAB_THATCH + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_CARBONATE_FLAG, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), ForgeCraftBlocks.THIN_SLAB_THATCH + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_ENDBRICK, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), ForgeCraftBlocks.THIN_SLAB_THATCH + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_ENDSTONE, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), ForgeCraftBlocks.THIN_SLAB_THATCH + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_FERRO_BRICK, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), ForgeCraftBlocks.SLAB_FERRO_BRICK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_FERRO_FLAG, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), ForgeCraftBlocks.THATCH + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_MUD, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_OAK, + ('S'), ForgeCraftBlocks.SLAB_MUD + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_NETHERBRICK, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), new ItemStack(Blocks.STONE_SLAB2, 1) + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_NETHERRACK, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_NETHERPALM, + ('S'), ForgeCraftBlocks.SLAB_NETHERRACK + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_NETHERSTONE, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), ForgeCraftBlocks.SLAB_NETHERSTONE + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_STONE, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), new ItemStack(Blocks.STONE_SLAB, 1) + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_STONEBRICK, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), new ItemStack(Blocks.STONE_SLAB, 2) + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.DRAIN_STONEBRICK_MOSSY, true, new Object[]{"I", "S", + ('I'), ForgeCraftBlocks.SLAT_IRON, + ('S'), ForgeCraftBlocks.SLAB_STONEBRICK_MOSSY + })); + + /// + // TERRACOTTA + /// + GameRegistry.addSmelting(ForgeCraftItems.CINISCLAY_CLUMP, new ItemStack(ForgeCraftItems.CINISCOTTA, 1, 0), 0.35f); + GameRegistry.addSmelting(ForgeCraftItems.TERRACLAY_CLUMP, new ItemStack(ForgeCraftItems.TERRACOTTA, 1, 0), 0.35f); + + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.CINISCLAY_CLUMP), new ItemStack(ForgeCraftBlocks.CINISCLAY_BLOCK, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.TERRACLAY_CLUMP), new ItemStack(ForgeCraftBlocks.TERRACLAY_BLOCK, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.CINISCOTTA), new ItemStack(ForgeCraftBlocks.CINISCOTTA_BRICK, 4)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.TERRACOTTA), new ItemStack(ForgeCraftBlocks.TERRACOTTA_BRICK, 4)); + + /// LOAM AND MUD + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.MUD_CLUMP), new ItemStack(ForgeCraftBlocks.MUD_BLOCK_WET, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftBlocks.MUD_BLOCK_WET), new ItemStack(ForgeCraftBlocks.MUD_BRICK_WET, 4)); + + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.DIRT), new ItemStack(ForgeCraftBlocks.DIRT_BRICK, 1)); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_DIRT, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), Blocks.DIRT + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.STAIRS_MUD, 4), true, new Object[]{"S ", "SS ", "SSS", + ('S'), ForgeCraftBlocks.MUD_BLOCK_DRY + })); + + /// Thatch + CraftingHelper.add3x3Crafting(new ItemStack(Blocks.TALLGRASS, 1, 1), new ItemStack(ForgeCraftItems.THATCHING_WET, 1)); + CraftingHelper.add3x3Crafting(new ItemStack(ForgeCraftItems.RUSH_TIPS, 1), new ItemStack(ForgeCraftItems.THATCHING_WET, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftItems.RUSH_STEMS, 1), new ItemStack(ForgeCraftItems.THATCHING_WET, 1)); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.THATCH_WET, 1), true, new Object[]{"TTT", "TCT", "TTT", + ('T'), "thatchingWet", + ('C'), "cordagePlant" + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.THATCH, 2), true, new Object[]{"TTT", "TCT", "TTT", + ('T'), "thatchingDry", + ('C'), "cordagePlant" + })); + + /// + // WORKTABLES + /// + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.WOODEN_SLAB, 1, 4), new ItemStack(ForgeCraftBlocks.WORKTABLE_ACACIA, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.WOODEN_SLAB, 1, 5), new ItemStack(ForgeCraftBlocks.WORKTABLE_BIGOAK, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.WOODEN_SLAB, 1, 2), new ItemStack(ForgeCraftBlocks.WORKTABLE_BIRCH, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.WOODEN_SLAB, 1, 3), new ItemStack(ForgeCraftBlocks.WORKTABLE_JUNGLE, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.WOODEN_SLAB, 1, 0), new ItemStack(ForgeCraftBlocks.WORKTABLE_OAK, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.WOODEN_SLAB, 1, 1), new ItemStack(ForgeCraftBlocks.WORKTABLE_SPRUCE, 1)); + + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftBlocks.SLAB_MUD, 1), new ItemStack(ForgeCraftBlocks.WORKTABLE_MUD_SLAB, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftBlocks.SLAB_NETHERPALM, 1), new ItemStack(ForgeCraftBlocks.WORKTABLE_NETHERPALM, 1)); + + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.SANDSTONE, 1, 2), new ItemStack(ForgeCraftBlocks.WORKTABLE_SANDSTONE, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(Blocks.END_BRICKS, 1), new ItemStack(ForgeCraftBlocks.WORKTABLE_END, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftBlocks.MUD_BLOCK_DRY, 1), new ItemStack(ForgeCraftBlocks.WORKTABLE_MUD, 1)); + CraftingHelper.add2x2Crafting(new ItemStack(ForgeCraftBlocks.NETHERSTONE, 1), new ItemStack(ForgeCraftBlocks.WORKTABLE_NETHERSTONE, 1)); + + /// + // Torch + /// + if (ModConfig.LIGHTING_TORCHES_REPLACE_VANILLA) + { + ItemStack removeItems[] = { new ItemStack(Blocks.TORCH) }; + RecipeRemover.removeRecipeByStack(removeItems); + + String removeNames[] = { "tconstruct:stone_torch" }; + RecipeRemover.removeRecipeByString(removeNames); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.TORCH_WOOD, ModConfig.LIGHTING_TORCH_RECIPE_OUTPUT), "F", "C", "S", + ('F'), "clumpFuel", + ('C'), "cordageGeneral", + ('S'), "stickWood")); + } + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftBlocks.TORCH_NETHER, "S", "S", + ('S'), Blocks.NETHERRACK)); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.LEVER_NETHER, 2), "T", "S", + ('T'), ForgeCraftBlocks.TORCH_NETHER, + ('S'), Blocks.NETHERRACK)); + + GameRegistry.addRecipe(new ShapedOreRecipe(Blocks.LIT_PUMPKIN, "P", "T", + ('P'), Blocks.PUMPKIN, + ('T'), ForgeCraftItems.TORCH_WOOD_LIT)); + + GameRegistry.addRecipe(new ShapedOreRecipe(Blocks.LIT_PUMPKIN, "P", "T", + ('P'), Blocks.PUMPKIN, + ('T'), ForgeCraftItems.TORCH_NETHER_LIT)); + + GameRegistry.addRecipe(new ShapedOreRecipe(Blocks.LIT_PUMPKIN, "P", "T", + ('P'), Blocks.PUMPKIN, + ('T'), ForgeCraftBlocks.IGNIS_FATUUS)); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.JACK_O_LANTERN), "P", "T", + ('P'), Blocks.PUMPKIN, + ('T'), "torchUnlit")); + + CraftingHelper.addBasicToolRecipe(Items.FLINT_AND_STEEL, new ItemStack(ForgeCraftBlocks.JACK_O_LANTERN), new ItemStack(Blocks.LIT_PUMPKIN)); + CraftingHelper.addBasicToolRecipe(Items.FLINT_AND_STEEL, new ItemStack(ForgeCraftBlocks.TORCH_WOOD), new ItemStack(Blocks.TORCH)); + CraftingHelper.addBasicToolRecipe(Items.FLINT_AND_STEEL, new ItemStack(ForgeCraftBlocks.TORCH_NETHER), new ItemStack(ForgeCraftItems.TORCH_NETHER_LIT)); + + + /// + // fish + /// + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.FISH_COD_SALTED, true, new Object[]{"S", "F", + ('S'), "foodSalt", + ('F'), new ItemStack(Items.FISH, 1, 0) + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.FISH_SALMON_SALTED, true, new Object[]{"S", "F", + ('S'), "foodSalt", + ('F'), new ItemStack(Items.FISH, 1, 1) + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.FISH_CLOWN_SALTED, true, new Object[]{"S", "F", + ('S'), "foodSalt", + ('F'), new ItemStack(Items.FISH, 1, 2) + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.FISH_PUFFER_SALTED, true, new Object[]{"S", "F", + ('S'), "foodSalt", + ('F'), new ItemStack(Items.FISH, 1, 3) + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(ForgeCraftItems.FISH_LAVAWORM_SALTED, true, new Object[]{"S", "F", + ('S'), "foodSalt", + ('F'), new ItemStack(ForgeCraftItems.FISH_LAVAWORM_RAW, 1) + })); + + + /// + // ash + /// + CraftingHelper.add3x3Crafting(new ItemStack(ForgeCraftItems.ASH), new ItemStack(ForgeCraftBlocks.ASH_BLOCK, 1)); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.ASH_STABILIZED, 8), true, new Object[]{"III", "ICI", "III", + ('I'), ForgeCraftBlocks.ASH_BLOCK, + ('C'), "slimeball" + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.ASH_STABILIZED, 8), true, new Object[]{"III", "ICI", "III", + ('I'), ForgeCraftBlocks.ASH_BLOCK, + ('C'), "clumpClay" + })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftBlocks.ASH_STABILIZED, 8), true, new Object[]{"III", "ICI", "III", + ('I'), ForgeCraftBlocks.ASH_BLOCK, + ('C'), "mortar" + })); + + /// + // Foods + /// + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.SALO, 1), true, new Object[]{"S", "F", + ('F'), "foodFat", + ('S'), "foodSalt" + })); + + /// + // Crafting Config Hooks + /// + if (ModConfig.CRAFTING_SURVIVAL_FLINTNSTEEL) + { + GameRegistry.addShapelessRecipe(new ItemStack(Items.FLINT_AND_STEEL), new ItemStack(ForgeCraftItems.IRON_RING), new ItemStack(ForgeCraftItems.FLINT_KNAPP, 1)); + } + + if (ModConfig.CRAFTING_ENABLE_SADDLE) + { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.SADDLE), true, new Object[]{"CSC", "CWC", "I I", + ('S'), "leather", + ('W'), Blocks.WOOL, + ('I'), ForgeCraftItems.IRON_RING, + ('C'), "cordageLeather" + })); + } + + if (!ModConfig.CRAFTING_KNAPPING_ENABLE) { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ForgeCraftItems.SALO, 1), true, new Object[]{"S", "F", + ('F'), Items.FLINT, + ('S'), "rock" + })); + } + + /// + // vanilla smelting recipes + /// + GameRegistry.addSmelting(ForgeCraftItems.CORN_GROUND, new ItemStack(ForgeCraftItems.CORN_BREAD, 1, 0), 0.35f); + GameRegistry.addSmelting(ForgeCraftItems.WHEAT_GROUND, new ItemStack(Items.BREAD, 1, 0), 0.35f); + GameRegistry.addSmelting(ForgeCraftItems.HORSE_MEAT_RAW, new ItemStack(ForgeCraftItems.HORSE_MEAT_COOKED, 1, 0), 0.35f); + // + //GameRegistry.addSmelting(ForgeCraftItems.obsidianCrushed, new ItemStack(ForgeCraftItems.obsidianPlate, 1, 0), 0.1f); + //GameRegistry.addSmelting(ForgeCraftItems.valusMash, new ItemStack(ForgeCraftItems.valusBread, 1, 0), 0.06f); + //GameRegistry.addSmelting(ForgeCraftItems.netherMuttonRaw, new ItemStack(ForgeCraftItems.netherMuttonCooked, 1, 0), 0.05f); + //GameRegistry.addSmelting(ForgeCraftItems.overworldMuttonRaw, new ItemStack(ForgeCraftItems.overworldMuttonCooked, 1, 0), 0.05f); + //GameRegistry.addSmelting(ForgeCraftItems.wolfMeatRaw, new ItemStack(ForgeCraftItems.wolfMeatCooked, 1, 0), 0.05f); + //GameRegistry.addSmelting(ForgeCraftItems.vanadiumBar, new ItemStack(ForgeCraftItems.vanadiumBarHot, 1, 0), 0.06f); + //GameRegistry.addSmelting(ForgeCraftItems.netherClayBrick, new ItemStack(ForgeCraftItems.netherClayClump, 1, 0), 0.01f); + //GameRegistry.addSmelting(ForgeCraftBlocks.silverOreOverworld, new ItemStack(ForgeCraftItems.silverIngot, 1, 0), 0.05f); + //GameRegistry.addSmelting(Blocks.soul_sand, new ItemStack(ForgeCraftBlocks.soulGlass, 1, 0), 0.05f); + //GameRegistry.addSmelting(ModFluids.clayBucket_raw, new ItemStack(ModFluids.clayBucket_empty, 1, 0), 0.05f); + //GameRegistry.addSmelting(ModFluids.netherBucket_raw, new ItemStack(ModFluids.netherBucket_empty, 1, 0), 0.05f); + //GameRegistry.addSmelting(ForgeCraftItems.pittedBrickRaw, new ItemStack(ForgeCraftItems.pittedBrick, 1, 0), 0.05f); + //GameRegistry.addSmelting(ForgeCraftItems.netherClayBrickRaw, new ItemStack(ForgeCraftItems.netherClayBrick, 1, 0), 0.05f); + //GameRegistry.addSmelting(ForgeCraftItems.sinuousMash, new ItemStack(ForgeCraftItems.sinuousResin, 1, 0), 0.05f); + //GameRegistry.addSmelting(ForgeCraftBlocks.soulGlass, new ItemStack(Blocks.glass, 1, 0), 0.05f); + */ + } + + + /******************************************************************************* + * Recipes Overrides + */ + public static void registerRecipeRemover() + { + + /* + //if (ModConfig.torchReplaceVanilla) { + // //ItemStack removeTorches[] = { new ItemStack(Item.getItemFromBlock(Blocks.torch)), new ItemStack(Blocks.torch) }; + // ItemStack removeTorches[] = { new ItemStack(Blocks.torch) }; + // RecipeRemover.removeRecipeByStack(removeTorches); + //} + + if (ModConfig.CRAFTING_DISABLE_ENDEREYE) { + ItemStack removeItems[] = { new ItemStack(Items.ENDER_EYE) }; + RecipeRemover.removeRecipeByStack(removeItems); + } + + if (ModConfig.CRAFTING_DISABLE_TOOLS_WOOD) { + ItemStack removeItems[] = { new ItemStack(Items.WOODEN_PICKAXE), new ItemStack(Items.WOODEN_AXE), new ItemStack(Items.WOODEN_SHOVEL), new ItemStack(Items.WOODEN_HOE), new ItemStack(Items.WOODEN_SWORD) }; + RecipeRemover.removeRecipeByStack(removeItems); + } + + if (ModConfig.CRAFTING_DISABLE_TOOLS_STONE) { + ItemStack removeItems[] = { new ItemStack(Items.STONE_PICKAXE), new ItemStack(Items.STONE_AXE), new ItemStack(Items.STONE_SHOVEL), new ItemStack(Items.STONE_HOE), new ItemStack(Items.STONE_SWORD) }; + RecipeRemover.removeRecipeByStack(removeItems); + } + + if (ModConfig.CRAFTING_DISABLE_TOOLS_IRON) { + ItemStack removeItems[] = { new ItemStack(Items.IRON_PICKAXE), new ItemStack(Items.IRON_AXE), new ItemStack(Items.IRON_SHOVEL), new ItemStack(Items.IRON_HOE), new ItemStack(Items.IRON_SWORD) }; + RecipeRemover.removeRecipeByStack(removeItems); + } + + if (ModConfig.CRAFTING_DISABLE_TOOLS_GOLD) { + ItemStack removeItems[] = { new ItemStack(Items.GOLDEN_PICKAXE), new ItemStack(Items.GOLDEN_AXE), new ItemStack(Items.GOLDEN_SHOVEL), new ItemStack(Items.GOLDEN_HOE), new ItemStack(Items.GOLDEN_SWORD) }; + RecipeRemover.removeRecipeByStack(removeItems); + } + + if (ModConfig.CRAFTING_DISABLE_TOOLS_DIAMOND) { + ItemStack removeItems[] = { new ItemStack(Items.DIAMOND_PICKAXE), new ItemStack(Items.DIAMOND_AXE), new ItemStack(Items.DIAMOND_SHOVEL), new ItemStack(Items.DIAMOND_HOE), new ItemStack(Items.DIAMOND_SWORD) }; + RecipeRemover.removeRecipeByStack(removeItems); + } + + if (ModConfig.SURVIVAL_BETTER_THAN_PLANKS) { + ItemStack removeItems[] = { + new ItemStack(Blocks.PLANKS, 1, 0), + new ItemStack(Blocks.PLANKS, 1, 1), + new ItemStack(Blocks.PLANKS, 1, 2), + new ItemStack(Blocks.PLANKS, 1, 3), + new ItemStack(Blocks.PLANKS, 1, 4), + new ItemStack(Blocks.PLANKS, 1, 5), + + new ItemStack(Blocks.WOODEN_SLAB, 1, 0), + new ItemStack(Blocks.WOODEN_SLAB, 1, 1), + new ItemStack(Blocks.WOODEN_SLAB, 1, 2), + new ItemStack(Blocks.WOODEN_SLAB, 1, 3), + new ItemStack(Blocks.WOODEN_SLAB, 1, 4), + new ItemStack(Blocks.WOODEN_SLAB, 1, 5), + + new ItemStack(Items.STICK) + }; + RecipeRemover.removeRecipeByStack(removeItems); + //RecipeRemover.removeRecipeByItemName(removeItems); + } + + if (ModConfig.CRAFTING_REMOVE_NAMES.length > 0) { + RecipeRemover.removeRecipeByString(ModConfig.CRAFTING_REMOVE_NAMES); + } + + /** + if (ModConfig.removeRecipeDisplayNames.length > 0) { + RecipeRemover.removeRecipeByDisplayName(ModConfig.removeRecipeDisplayNames); + } **/ + } +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModDictionary.java b/src/main/java/nmd/primal/forgecraft/common/init/ModDictionary.java new file mode 100644 index 00000000..8510b3d8 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModDictionary.java @@ -0,0 +1,57 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class ModDictionary +{ + /******************************************************************************* + * Register Only Vanilla OreDictionary Entries Here + * Mod Items/Blocks have their names added through the respective + * registration methods as a list of comma delineated strings. + * + * EXAMPLE: + * LEATHER_CORDAGE = registerItem(new PrimalItem("leather_cordage"), "cordageGeneral, cordageLeather"); + * + */ + public static void registerDictionaryNames() + { + /// + // slimeball + /// + //OreDictionary.registerOre("slimeball", new ItemStack(Items.SLIME_BALL)); + //OreDictionary.registerOre("slimeball", new ItemStack(Items.MAGMA_CREAM)); + + /// + // paper + /// + OreDictionary.registerOre("paper", new ItemStack(Items.PAPER, 1, 0)); + + /// + // clay + /// + OreDictionary.registerOre("clayball", new ItemStack(Items.CLAY_BALL, 1, 0)); + + /// + // bone + /// + OreDictionary.registerOre("bone", new ItemStack(Items.BONE, 1, 0)); + + /// + // torch fuel + /// + OreDictionary.registerOre("clumpFuel", new ItemStack(Items.COAL, 1, 0)); + OreDictionary.registerOre("clumpFuel", new ItemStack(Items.COAL, 1, 1)); + + /// + // Foodstuff + /// + OreDictionary.registerOre("foodBread", new ItemStack(Items.BREAD, 1, 0)); + + /// + // Thatching + /// + //OreDictionary.registerOre("thatchingMaterial", new ItemStack(Blocks.TALLGRASS, 1, 0)); + } +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModEvents.java b/src/main/java/nmd/primal/forgecraft/common/init/ModEvents.java new file mode 100644 index 00000000..6324ca0c --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModEvents.java @@ -0,0 +1,41 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraftforge.common.MinecraftForge; +//import nmd.primal.forgecraft.common.CommonEvents; +import nmd.primal.forgecraft.common.ForgeCraft; +//import nmd.primal.forgecraft.common.crafting.CraftingEvents; +//import nmd.primal.forgecraft.common.world.WorldEvents; +import nmd.primal.forgecraft.common.ForgeCraft; + +public class ModEvents +{ + public static void registerCommonEvents() + { + ForgeCraft.LOGGER.info("Register Events"); + + /// + // Common Events + /// + //MinecraftForge.EVENT_BUS.register(new CommonEvents()); + //MinecraftForge.EVENT_BUS.register(new CraftingEvents()); + + /// + // OreGen Bus + /// + if (ModConfig.WORLDGEN_DISABLE_VANILLA_ORE_IRON) + //MinecraftForge.ORE_GEN_BUS.register(new WorldEvents()); + + /// + // Client Events + /// + ForgeCraft.proxy.registerClientEvents(); + //if (FMLCommonHandler.instance().getSide() == Side.CLIENT) { + // registerClientEvents(); + //} + } + + //@SideOnly(Side.CLIENT) + //private static void registerClientEvents() { + // MinecraftForge.EVENT_BUS.register(new GuiEventHandler()); + //} +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModFluids.java b/src/main/java/nmd/primal/forgecraft/common/init/ModFluids.java new file mode 100644 index 00000000..cb9f0cf5 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModFluids.java @@ -0,0 +1,181 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.BlockFluidFinite; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.IFluidBlock; +import nmd.primal.core.common.PrimalCore; +import nmd.primal.core.common.fluids.Smoke; +import nmd.primal.core.common.fluids.Steam; + +import java.util.HashSet; +import java.util.Set; +import java.util.function.Consumer; +import java.util.function.Function; + +public class ModFluids +{ + /** + * The fluid blocks from this mod only. Doesn't include blocks for fluids that were already registered by another mod. + */ + public static final Set FLUID_BLOCKS = new HashSet<>(); + public static final Set FLUIDS = new HashSet<>(); + + public static Fluid SMOKE; + public static Fluid STEAM; + public static Fluid WATER_CONDENSATION; + public static Fluid TANNIN; + + public static ResourceLocation getStill(String fluid) { + return new ResourceLocation(ModInfo.MOD_ID, "blocks/fluids/" + fluid + "_still"); + } + + public static ResourceLocation getFlowing(String fluid) { + return new ResourceLocation(ModInfo.MOD_ID, "blocks/fluids/" + fluid + "_flow"); + } + + public static void registerFluids() + { + /** + STATIC = createFluid("static", false, + fluid -> fluid.setLuminosity(10).setDensity(800).setViscosity(1500), + fluid -> new BlockFluidNoFlow(fluid, new MaterialLiquid(MapColor.BROWN))); + + STATIC_GAS = createFluid("staticGas", false, + fluid -> fluid.setLuminosity(10).setDensity(-800).setViscosity(1500).setGaseous(true), + fluid -> new BlockFluidNoFlow(fluid, new MaterialLiquid(MapColor.BROWN))); + + NORMAL = createFluid("normal", true, + fluid -> fluid.setLuminosity(10).setDensity(1600).setViscosity(100), + fluid -> new BlockFluidClassic(fluid, new MaterialLiquid(MapColor.ADOBE))); + + NORMAL_GAS = createFluid("normalGas", true, + fluid -> fluid.setLuminosity(10).setDensity(-1600).setViscosity(100).setGaseous(true), + fluid -> new BlockFluidClassic(fluid, new MaterialLiquid(MapColor.ADOBE))); + + FINITE = createFluid("finite", false, + fluid -> fluid.setLuminosity(10).setDensity(800).setViscosity(1500), + fluid -> new BlockFluidFinite(fluid, new MaterialLiquid(MapColor.BLACK))); + **/ + + SMOKE = createFluid("smoke", false, + fluid -> fluid.setLuminosity(0).setDensity(-1600).setViscosity(2000).setTemperature(600).setGaseous(true), + fluid -> new Smoke(fluid)); + + STEAM = createFluid("steam", false, + fluid -> fluid.setLuminosity(0).setDensity(-1600).setViscosity(2000).setTemperature(1600).setGaseous(true), + fluid -> new Steam(fluid)); + + WATER_CONDENSATION = createFluid("water_condensation", false, + fluid -> fluid.setLuminosity(0).setDensity(1600).setViscosity(100).setGaseous(false), + fluid -> new BlockFluidFinite(fluid, Material.WATER)); + + //TANNIN = createFluid("tannin", true, + // fluid -> fluid.setLuminosity(0).setDensity(1600).setViscosity(100).setGaseous(false), + // fluid -> new BlockFluidClassic(fluid, new MaterialLiquid(MapColor.BROWN))); + + } + + /** + @SideOnly(Side.CLIENT) + public void registerRenderers() { + MinecraftForge.EVENT_BUS.register(this); + registerFluidBlockRendering(fluidNutrientDistillation, NUTRIENT_DISTILLATION_NAME); + registerFluidBlockRendering(fluidHootch, HOOTCH_NAME); + registerFluidBlockRendering(fluidFireWater, FIRE_WATER_NAME); + registerFluidBlockRendering(fluidRocketFuel, ROCKET_FUEL_NAME); + registerFluidBlockRendering(fluidLiquidSunshine, LIQUID_SUNSHINE_NAME); + registerFluidBlockRendering(fluidCloudSeed, CLOUD_SEED_NAME); + registerFluidBlockRendering(fluidCloudSeedConcentrated, CLOUD_SEED_CONCENTRATED_NAME); + } + + @SideOnly(Side.CLIENT) + public void registerFluidBlockRendering(Fluid fluid, String name) { + + FluidStateMapper mapper = new FluidStateMapper(fluid); + Block block = fluid.getBlock(); + Item item = Item.getItemFromBlock(block); + + // item-model + if (item != null) { + ModelLoader.registerItemVariants(item); + ModelLoader.setCustomMeshDefinition(item, mapper); + } + // block-model + if (block != null) { + ModelLoader.setCustomStateMapper(block, mapper); + } + } + **/ + + /******************************************************************************* + * Registration Methods + * https://github.com/Choonster/TestMod3/blob/1.10.2/src/main/java/choonster/testmod3/init/ModFluids.java + */ + /** + * Create a {@link Fluid} and its {@link IFluidBlock}, or use the existing ones if a fluid has already been registered with the same name. + * + * @param name The name of the fluid + * @param hasFlowIcon Does the fluid have a flow icon? + * @param fluidPropertyApplier A function that sets the properties of the {@link Fluid} + * @param blockFactory A function that creates the {@link IFluidBlock} + * @return The fluid and block + * + * PrimalCore.proxy.registerFluidRendering(fluidBlock, name); + */ + private static Fluid createFluid(String name, boolean hasFlowIcon, Consumer fluidPropertyApplier, Function blockFactory) + { + final String texturePrefix = ModInfo.MOD_PREFIX + "blocks/fluids/"; + final ResourceLocation still = new ResourceLocation(texturePrefix + name + "_still"); + final ResourceLocation flowing = hasFlowIcon ? new ResourceLocation(texturePrefix + name + "_flow") : still; + + //final ResourceLocation still = new ResourceLocation(ModInfo.MOD_PREFIX + "blocks/fluids/" + name + "_still"); + ///final ResourceLocation flowing = hasFlowIcon ? new ResourceLocation(ModInfo.MOD_PREFIX + "blocks/fluids/" + name + "_flow") : still; + + Fluid fluid = new Fluid(name, still, flowing); + final boolean useOwnFluid = FluidRegistry.registerFluid(fluid); + + if (useOwnFluid) { + fluidPropertyApplier.accept(fluid); + registerFluidBlock(blockFactory.apply(fluid), name); + } else { + fluid = FluidRegistry.getFluid(name); + } + + + FLUIDS.add(fluid); + + return fluid; + } + + private static T registerFluidBlock(T block, String name) + { + //block.setRegistryName("fluid." + block.getFluid().getName()); + //block.setRegistryName(block.getFluid().getName()); + block.setUnlocalizedName(ModInfo.MOD_PREFIX + block.getFluid().getUnlocalizedName()); + + //block.setCreativeTab(ModInfo.TAB_PRIMAL); + + ModBlocks.registerBlock("fluid." + name, block, true); + //PrimalCore.proxy.registerFluidModel(block, block.getFluid().getName()); + + //PrimalCore.proxy.registerFluidModel(block); + PrimalCore.proxy.registerFluidBlockRendering(block, name); + FLUID_BLOCKS.add(block); + + return block; + } + + /** + private static void registerBucket(Fluid fluid) { + FluidRegistry.addBucketForFluid(fluid); + } + + private static void registerTank(Fluid fluid) { + final FluidStack fluidStack = new FluidStack(fluid, TileEntityFluidTank.CAPACITY); + ((ItemFluidTank) Item.getItemFromBlock(ModBlocks.FLUID_TANK)).addFluid(fluidStack); + } **/ +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModInfo.java b/src/main/java/nmd/primal/forgecraft/common/init/ModInfo.java new file mode 100644 index 00000000..4deb9549 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModInfo.java @@ -0,0 +1,47 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import nmd.primal.forgecraft.api.ForgeCraftItems; +//import nmd.primal.core.api.ForgeCraftItems; + +public class ModInfo +{ + /** Mod Details**/ + public static final String DEPENDENCIES = "after:tconstruct;after:survivalist;after:BiomesOPlenty;after:biomesoplenty;after:natura;after:stellarapi;after:stellarsky;after:waila;after:IC2;after:ic2;"; + public static final String MOD_ID = "forgecraft"; + public static final String MOD_PREFIX = MOD_ID + ":"; + public static final String MOD_CHANNEL = MOD_ID; + public static final String MOD_VERSION = "0.1"; + public static final String MC_VERSIONS = "[1.9.4, 1.11.0)"; + + /** Mod Structures **/ + public static final String COMMON_PROXY = "nmd.primal.forgecraft.common.CommonProxy"; + public static final String CLIENT_PROXY = "nmd.primal.forgecraft.client.ClientProxy"; + public static final String GUI_FACTORY = "nmd.primal.forgecraft.client.gui.GuiFactory"; + public static final String UPDATE_JSON = "http://insecure.www.nmd.so/update-primal.json"; + + /** GUI IDs **/ + public static final int WORKTABLE_BASIC = 0; + public static final int WORKTABLE_SHELF = 1; + public static final int WORKTABLE_CHEST = 2; + public static final int STORAGE_CRATE = 4; + public static final int CHEST_NETHER = 5; + public static final int QUERN = 6; + public static final int KLIN = 7; + public static final int OVEN = 8; + + /** Creative Tabs **/ + public static CreativeTabs TAB_FORGECRAFT = new CreativeTabs(MOD_ID) + { + + @Override + @SideOnly(Side.CLIENT) + public Item getTabIconItem() { + return ForgeCraftItems.TEST; + } + + }; +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModItems.java b/src/main/java/nmd/primal/forgecraft/common/init/ModItems.java new file mode 100644 index 00000000..73eb7be5 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModItems.java @@ -0,0 +1,124 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraft.init.MobEffects; +import net.minecraft.item.Item; +import net.minecraft.potion.PotionEffect; +import net.minecraftforge.fml.common.registry.ForgeRegistries; +import net.minecraftforge.oredict.OreDictionary; +import nmd.primal.forgecraft.api.ForgeCraftBlocks; +import nmd.primal.forgecraft.api.ForgeCraftMaterials; +import nmd.primal.forgecraft.common.ForgeCraft; +//import nmd.primal.forgecraft.common.items.*; +import nmd.primal.forgecraft.common.ForgeCraft; + +import javax.annotation.Nullable; +import java.util.HashSet; +import java.util.Set; + +//import static nmd.primal.core.api.PrimalItems.*; + + +public class ModItems +{ + //public static final Set ITEMS = new HashSet<>(); + public static final Set ITEMS = new HashSet(); + + /******************************************************************************* + * Items + */ + public static void registerItems() + { + // ***************************************************************************** // + // items + // plantTwine = new Cordage("plantTwine", plantFiber).thaumcraftAspects((new AspectList()).add(Aspect.PLANT, 1).add(Aspect.CRAFT, 1)); + // + + + /// ***************************************************************************** // + // Projectiles + // + //MUCK = registerItem("muck", new Muck(), "muck"); + + /// ***************************************************************************** // + // parts + // + //EMERALD_POINT = registerItem("emerald_point", new PrimalItem()); + + + // ***************************************************************************** // + // FoodStuff, Plants, Seeds, etc + // COD(0, "cod", 2, 0.1F, 5, 0.6F), + // SALMON(1, "salmon", 2, 0.1F, 6, 0.8F), + // CLOWNFISH(2, "clownfish", 1, 0.1F), + // PUFFERFISH(3, "pufferfish", 1, 0.1F); + // + //LARD = registerItem("lard", new Foodstuff(1, 0.5F, true).setPotionEffect(new PotionEffect(MobEffects.HUNGER, 200, 0), 0.6F), "foodFat"); + + + // ***************************************************************************** // + // Ores + // + //ASH = registerItem("ash", new Ash(), "dustAsh"); + + + // ***************************************************************************** // + // Tools and Armor + // + + /// + // crating tools + /// + //STONE_BASIN = registerItem("stone_basin", new StoneBasin(16)); + //FIRE_BOW = registerItem("fire_bow", new FireBow(24)); + //QUARTZ_SAW = registerItem("quartz_saw", new HandSaw(ForgeCraftMaterials.TOOL_QUARTZ.getMaxUses())); + //QUARTZ_CLIPPERS = registerItem("quartz_clippers", new HandClipper(ForgeCraftMaterials.TOOL_QUARTZ)); + //IRON_SAW = registerItem("iron_saw", new HandSaw(Item.ToolMaterial.IRON.getMaxUses())); + //IRON_CLIPPERS = registerItem("iron_clippers", new HandClipper(Item.ToolMaterial.IRON)); + + //TORCH_WOOD_LIT = registerItem("torch_wood_lit", new LitTorch(ForgeCraftBlocks.TORCH_WOOD), "torch"); + //TORCH_NETHER_LIT = registerItem("torch_nether_lit", new LitTorch(ForgeCraftBlocks.TORCH_NETHER), "torch"); + } + + + /******************************************************************************* + * Item Registration Methods + */ + private static ITEM registerItem(String name, ITEM item, @Nullable String dictionary_names, Boolean hidden) + { + item.setRegistryName(name); + item.setUnlocalizedName(item.getRegistryName().toString()); + + ForgeRegistries.ITEMS.register(item); + //PrimalCore.proxy.renderItem(item); + ForgeCraft.proxy.registerItemSided(item); + ITEMS.add(item); + + if (dictionary_names != null) + { + String [] dictionary_name_array = dictionary_names.replaceAll("\\s+","").split(","); + //List dictionary_name_list = Arrays.asList(dictionary_name_array); + for (String dictionary_name : dictionary_name_array) { + OreDictionary.registerOre(dictionary_name, item); + } + } + + if (!hidden) { + item.setCreativeTab(ModInfo.TAB_FORGECRAFT); + } + + return item; + } + + private static ITEM registerItem(String name, ITEM item) { + return registerItem(name, item, null, false); + } + + private static ITEM registerItem(String name, ITEM item, Boolean hidden) { + return registerItem(name, item, null, hidden); + } + + private static ITEM registerItem(String name, ITEM item, @Nullable String dictionary_names) { + return registerItem(name, item, dictionary_names, false); + } + +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModRegistries.java b/src/main/java/nmd/primal/forgecraft/common/init/ModRegistries.java new file mode 100644 index 00000000..5183a005 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModRegistries.java @@ -0,0 +1,117 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.init.SoundEvents; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.registry.GameRegistry; +//import nmd.primal.core.api.ForgeCraftBlocks; +//import nmd.primal.core.api.ForgeCraftItems; +//import nmd.primal.core.api.ForgeCraftMaterials; +//import nmd.primal.core.api.ForgeCraftRegistries; +import nmd.primal.forgecraft.common.compat.FuelHandler; + +public class ModRegistries +{ + //public static final IForgeRegistry HEATSOURCES ; + //public static final IForgeRegistry KNAPPING; + + /******************************************************************************* + * Parent Block Registry + */ + public static void registerVanillaParentBlocks() + { + //ForgeCraftRegistries.addParentBlock(new ItemStack(Blocks.DIRT)); + //ForgeCraftRegistries.addParentBlock(new ItemStack(Blocks.GRASS)); + //ForgeCraftRegistries.addParentBlock(new ItemStack(Blocks.GLASS)); + //ForgeCraftRegistries.addParentBlock(new ItemStack(Blocks.NETHERRACK)); + } + + + /******************************************************************************* + * Fuel Registry + */ + //public static Hashtable FUEL_REGISTRY = new Hashtable<>(); + + //public static void addFuel(ItemStack stack, int value) + //{ + // ModRegistries.FUEL_REGISTRY.put(stack, value); + //} + + public static void registerFuels() + { + if (ModConfig.FEATURE_ENABLE_FUELS) + { + GameRegistry.registerFuelHandler(new FuelHandler()); + + //ForgeCraftRegistries.addFuel(new ItemStack(Items.PAPER), 48); + //ForgeCraftRegistries.addFuel(new ItemStack(Items.BOOK), 178); + //ForgeCraftRegistries.addFuel(new ItemStack(ForgeCraftItems.PLANT_FIBER), 16); + //ForgeCraftRegistries.addFuel(new ItemStack(ForgeCraftItems.PLANT_CORDAGE), 48); + //ForgeCraftRegistries.addFuel(new ItemStack(ForgeCraftItems.PLANT_TINDER), 64); + //ForgeCraftRegistries.addFuel(new ItemStack(ModItems.PLANT_PAPYRUS, 72); + //ForgeCraftRegistries.addFuel(new ItemStack(ForgeCraftItems.PLANT_CLOTH), 144); + + /** + * new ItemStack(ModItems.netherPearl)) ) { return 6600 + * new ItemStack(ModBlocks.earthWax)) ) { return 3600 + * new ItemStack(ModItems.earthwaxClump)) ) { return 900 + * new ItemStack(ModItems.clarifiedWax)) ) { return 900 + * new ItemStack(ModItems.paraffinWax)) ) { return 900 + * new ItemStack(ModBlocks.netherGrowth)) ) { return 625 + * new ItemStack(ModBlocks.netherReed)) ) { return 127 + * new ItemStack(ModItems.daucusMurnFronds)) ) { return 192 + * new ItemStack(ModItems.daucusMurnStem)) ) { return 288 + */ + } + } + + public static void registerVanillaTorches() + { + //ForgeCraftRegistries.addTorch(new ItemStack(Blocks.TORCH)); + //ForgeCraftRegistries.addTorch(new ItemStack(Blocks.MAGMA)); + //ForgeCraftRegistries.addTorch(new ItemStack(Items.LAVA_BUCKET)); + //ForgeCraftRegistries.addTorch(new ItemStack(ForgeCraftBlocks.IGNIS_FATUUS)); + } + + /******************************************************************************* + * Repair Registry + */ + public static void registerRepairItems() + { + /* + ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_BONE, new ItemStack(Items.BONE)); + ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_FLINT, new ItemStack(Items.FLINT)); + ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_FLINT, new ItemStack(ForgeCraftItems.FLINT_KNAPP)); + ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_EMERALD, new ItemStack(Items.EMERALD)); + ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_OBSIDIAN, new ItemStack(Blocks.OBSIDIAN)); + ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_QUARTZ, new ItemStack(Items.QUARTZ)); + ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_QUARTZ, new ItemStack(Blocks.QUARTZ_BLOCK)); + */ + } + + public static void registerToolBreakItems() + { + /* + ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.SHARP_BONE, new ItemStack[] { new ItemStack(Items.DYE, 1)}); + ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_HATCHET, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 1)}); + ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_AXE, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 2), new ItemStack(Items.STICK, 1) }); + ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_PICKAXE, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 2), new ItemStack(Items.STICK, 1) }); + ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_SHOVEL, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 1), new ItemStack(Items.STICK, 1) }); + ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_HOE, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 1), new ItemStack(Items.STICK, 1) }); + */ + } + + + /******************************************************************************* + * Repair Registry + */ + public static void registerAdditionalCraftingItems() + { + //ForgeCraftRegistries.addCraftingItem(Items.FLINT_AND_STEEL, SoundEvents.ITEM_FLINTANDSTEEL_USE); + } + + /// + // end + /// +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModSoundHandler.java b/src/main/java/nmd/primal/forgecraft/common/init/ModSoundHandler.java new file mode 100644 index 00000000..60fd08b0 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModSoundHandler.java @@ -0,0 +1,33 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.SoundEvent; + +/** + * Created by kitsu on 11/20/2016. + */ +public class ModSoundHandler { + //public static SoundEvent bulletCreate; + //public static SoundEvent woodsaw; + //public static SoundEvent scrape; + + private static int size = 0; + + public static void init() { + size = SoundEvent.REGISTRY.getKeys().size(); + //woodsaw = register("woodsaw"); + //scrape = register("scrape"); + //bulletCreate = register("bulletCreate"); + } + + public static SoundEvent register(String name) { + ResourceLocation loc = new ResourceLocation("forgecraft:" + name); + SoundEvent e = new SoundEvent(loc); + + SoundEvent.REGISTRY.register(size, loc, e); + size++; + + return e; + } + +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModTileEntities.java b/src/main/java/nmd/primal/forgecraft/common/init/ModTileEntities.java new file mode 100644 index 00000000..c75a154f --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModTileEntities.java @@ -0,0 +1,28 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fml.common.registry.GameRegistry; +//import nmd.primal.forgecraft.common.tiles.*; + +public class ModTileEntities +{ + /******************************************************************************* + * Tile Entities + */ + public static void registerTileEntities() // init + { + //registerTileEntity(TileWorkTableBasic.class, "WORKTABLE_BASIC"); + //registerTileEntity(TileWorkTableShelf.class, "WORKTABLE_SHELVES"); + //registerTileEntity(TileShelf.class, "shelf"); + //registerTileEntity(TileDryingRack.class, "rack"); + //registerTileEntity(TileFishTrap.class, "fishtrap"); + } + + /******************************************************************************* + * registration Methods + */ + private static void registerTileEntity(Class tile_class, String baseName) + { + GameRegistry.registerTileEntity(tile_class, "tile.forgecraft." + baseName); + } +} \ No newline at end of file diff --git a/src/main/java/nmd/primal/forgecraft/common/init/ModWorldGen.java b/src/main/java/nmd/primal/forgecraft/common/init/ModWorldGen.java new file mode 100644 index 00000000..8280caa5 --- /dev/null +++ b/src/main/java/nmd/primal/forgecraft/common/init/ModWorldGen.java @@ -0,0 +1,36 @@ +package nmd.primal.forgecraft.common.init; + +import net.minecraft.world.DimensionType; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fml.common.registry.GameRegistry; +//import nmd.primal.forgecraft.common.world.ForgeCraftWorldGenerator; + + +public class ModWorldGen +{ + public static void registerMapGen() + { + //MapGenStructureIO.registerStructure(MapGenScatteredFeatureModBiomes.Start.class, "testmod3:MapGenScatteredFeatureModBiomes"); + //MinecraftForge.TERRAIN_GEN_BUS.register(new MapGenHandler()); + } + + public static void registerWorldGenerators() + { + if (ModConfig.WORLDGEN_ENABLE) + { + //GameRegistry.registerWorldGenerator(new PrimalWorldGenerator(), 0); + } + + } + + + /** + if (ModConfig.) { + + } + + if (ModConfig.FEA) { + GameRegistry.registerWorldGenerator(new ModWorldGen(), 0); + } + **/ +} diff --git a/src/main/resources/assets.forgecraft/lang/en_US.lang b/src/main/resources/assets.forgecraft/lang/en_US.lang new file mode 100644 index 00000000..e69de29b diff --git a/src/main/resources/assets.forgecraft/sounds.json b/src/main/resources/assets.forgecraft/sounds.json new file mode 100644 index 00000000..e69de29b diff --git a/src/main/resources/assets.forgecraft/textures/blocks/firebox_pins.png b/src/main/resources/assets.forgecraft/textures/blocks/firebox_pins.png new file mode 100644 index 0000000000000000000000000000000000000000..c8e875292c70ef773f05b21455b45e47d8d172c1 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPNw>X0+uVz>29-xqHW=KSdbAE1aYF-JD%fR4Vl$uzQ znxasiS(2gP?&%wlqL<1JQt0X87-Dfcd5f6f&+`t92}uhCdZY}p4y<5oKFYvw?*U`e T=fIyJCoy=s`njxgN@xNAqj)ig literal 0 HcmV?d00001 diff --git a/src/main/resources/assets.forgecraft/textures/blocks/firebox_racks.png b/src/main/resources/assets.forgecraft/textures/blocks/firebox_racks.png new file mode 100644 index 0000000000000000000000000000000000000000..996061ce3219a42f62a23ff321bc3e8920abec2a GIT binary patch literal 454 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)3EPoD7^Z>gF8>if|Tq zL>4nJa0`PlBg3pY5H=O_6OYJ4B}!FZ{E8E6q3yhi70W-&&^HED*Kczyaeol(k=jVSWFMK303$|OPidn@;)OyHQyuiJh0w@vY+ybJov zZ@Q>;`~G@UZFqsw}Y=8;=*d)ZSis%{e*0 zs^H}gRV60x71C-8JbGqNbZ3#?mmBr0>;6XeO!d>fXO_7f=g8D;_sz~V&-YI2&hL3( zJlS#4t?Y^Kj!$%4bhGA~*WQdG$~Qmdo|g7(tDKvzQXBm5Z4IMT!};ZY2G-`F;PiC$b6Mw<&;$U&*Rdr4 literal 0 HcmV?d00001 diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index f4806675..9bc30672 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,16 +1,14 @@ -[ -{ - "modid": "examplemod", - "name": "Example Mod", - "description": "Example placeholder mod.", - "version": "${version}", - "mcversion": "${mcversion}", +[{ + "modid": "forgecraft", + "name": "ForgeCraft", + "description": "Forge your Future", + "version": "0.1", + "mcversion": "1.10.2", "url": "", "updateUrl": "", - "authorList": ["ExampleDude"], - "credits": "The Forge and FML guys, for making this example", - "logoFile": "", + "authorList": ["KitsuShadow"], + "credits": "KitsuShadow, Fluid1C3, Ishvad, Sygmarr", + "logoFile": "assets/primal/textures/logo.png", "screenshots": [], - "dependencies": [] -} -] + "dependencies": [PrimalCore] +}] \ No newline at end of file