Merge pull request #356 from ProfessorProspector/1.8.9

Add iron fence and fence gate
This commit is contained in:
Modmuss50 2016-02-22 08:15:10 +00:00
commit e98bc2dbeb
23 changed files with 316 additions and 8 deletions

View file

@ -23,6 +23,7 @@ import techreborn.api.TechRebornAPI;
import techreborn.api.recipe.RecipeHandler;
import techreborn.api.recipe.recipeConfig.RecipeConfigManager;
import techreborn.client.GuiHandler;
import techreborn.client.RegisterItemJsons;
import techreborn.command.TechRebornDevCommand;
import techreborn.compat.CompatManager;
import techreborn.compat.ICompatModule;

View file

@ -0,0 +1,18 @@
package techreborn.blocks;
import net.minecraft.block.BlockFence;
import net.minecraft.block.material.Material;
import techreborn.client.TechRebornCreativeTabMisc;
public class BlockIronFence extends BlockFence {
public BlockIronFence() {
super(Material.iron);
setUnlocalizedName("techreborn.ironfence");
setCreativeTab(TechRebornCreativeTabMisc.instance);
setStepSound(soundTypeMetal);
setHardness(2.0F);
setHarvestLevel("pickaxe", 2);
}
}

View file

@ -0,0 +1,36 @@
package techreborn.blocks;
import net.minecraft.block.BlockFenceGate;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import techreborn.client.TechRebornCreativeTabMisc;
public class BlockIronFenceGate extends BlockFenceGate {
public BlockIronFenceGate() {
super(BlockPlanks.EnumType.OAK);
setUnlocalizedName("techreborn.ironfencegate");
setCreativeTab(TechRebornCreativeTabMisc.instance);
setStepSound(soundTypeMetal);
setHardness(2.0F);
setHarvestLevel("pickaxe", 2);
}
@Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
return true;
}
@Override
public Material getMaterial(){
return Material.iron;
}
}

View file

@ -22,6 +22,7 @@ public class BlockRubberSapling extends BlockSapling {
public BlockRubberSapling() {
setUnlocalizedName("techreborn.rubbersapling");
setCreativeTab(TechRebornCreativeTabMisc.instance);
setStepSound(soundTypeGrass);
this.setDefaultState(this.blockState.getBaseState().withProperty(STAGE, Integer.valueOf(0)));
}

View file

@ -0,0 +1,26 @@
package techreborn.client;
import jline.internal.Log;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.oredict.OreDictionary;
import reborncore.common.util.LogHelper;
import techreborn.init.ModBlocks;
import techreborn.init.ModItems;
public class RegisterItemJsons {
public static void registerModels() {
registerItems();
registerBlocks();
}
private static void registerItems() {
}
private static void registerBlocks() {
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(ModBlocks.ironFence), 0, new ModelResourceLocation("techreborn:ironFence", "inventory"));
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(ModBlocks.ironFenceGate), 0, new ModelResourceLocation("techreborn:ironFenceGate", "inventory"));
}
}

View file

@ -1,7 +1,6 @@
package techreborn.init;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@ -9,9 +8,54 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import reborncore.common.tile.TileMachineBase;
import techreborn.Core;
import techreborn.blocks.*;
import techreborn.blocks.generator.*;
import techreborn.blocks.machine.*;
import techreborn.blocks.BlockChunkLoader;
import techreborn.blocks.BlockComputerCube;
import techreborn.blocks.BlockDigitalChest;
import techreborn.blocks.BlockElectricCraftingTable;
import techreborn.blocks.BlockFusionCoil;
import techreborn.blocks.BlockFusionControlComputer;
import techreborn.blocks.BlockHighlyAdvancedMachine;
import techreborn.blocks.BlockIronFence;
import techreborn.blocks.BlockIronFenceGate;
import techreborn.blocks.BlockMachineCasing;
import techreborn.blocks.BlockMachineFrame;
import techreborn.blocks.BlockOre;
import techreborn.blocks.BlockPlayerDetector;
import techreborn.blocks.BlockQuantumChest;
import techreborn.blocks.BlockQuantumTank;
import techreborn.blocks.BlockRubberLeaves;
import techreborn.blocks.BlockRubberLog;
import techreborn.blocks.BlockRubberPlank;
import techreborn.blocks.BlockRubberSapling;
import techreborn.blocks.BlockStorage;
import techreborn.blocks.BlockStorage2;
import techreborn.blocks.BlockSupercondensator;
import techreborn.blocks.generator.BlockDieselGenerator;
import techreborn.blocks.generator.BlockDragonEggSiphoner;
import techreborn.blocks.generator.BlockGasTurbine;
import techreborn.blocks.generator.BlockGenerator;
import techreborn.blocks.generator.BlockHeatGenerator;
import techreborn.blocks.generator.BlockLightningRod;
import techreborn.blocks.generator.BlockMagicEnergyAbsorber;
import techreborn.blocks.generator.BlockMagicEnergyConverter;
import techreborn.blocks.generator.BlockPlasmaGenerator;
import techreborn.blocks.generator.BlockSemiFluidGenerator;
import techreborn.blocks.generator.BlockThermalGenerator;
import techreborn.blocks.machine.BlockAlloyFurnace;
import techreborn.blocks.machine.BlockAlloySmelter;
import techreborn.blocks.machine.BlockAssemblingMachine;
import techreborn.blocks.machine.BlockBlastFurnace;
import techreborn.blocks.machine.BlockCentrifuge;
import techreborn.blocks.machine.BlockChargeBench;
import techreborn.blocks.machine.BlockChemicalReactor;
import techreborn.blocks.machine.BlockDistillationTower;
import techreborn.blocks.machine.BlockImplosionCompressor;
import techreborn.blocks.machine.BlockIndustrialElectrolyzer;
import techreborn.blocks.machine.BlockIndustrialGrinder;
import techreborn.blocks.machine.BlockIndustrialSawmill;
import techreborn.blocks.machine.BlockMatterFabricator;
import techreborn.blocks.machine.BlockRollingMachine;
import techreborn.blocks.machine.BlockVacuumFreezer;
import techreborn.blocks.storage.BlockAesu;
import techreborn.blocks.storage.BlockIDSU;
import techreborn.blocks.storage.BlockLesu;
@ -20,8 +64,39 @@ import techreborn.blocks.teir1.BlockCompressor;
import techreborn.blocks.teir1.BlockElectricFurnace;
import techreborn.blocks.teir1.BlockExtractor;
import techreborn.blocks.teir1.BlockGrinder;
import techreborn.itemblocks.*;
import techreborn.tiles.*;
import techreborn.itemblocks.ItemBlockAesu;
import techreborn.itemblocks.ItemBlockDigitalChest;
import techreborn.itemblocks.ItemBlockMachineCasing;
import techreborn.itemblocks.ItemBlockMachineFrame;
import techreborn.itemblocks.ItemBlockOre;
import techreborn.itemblocks.ItemBlockPlayerDetector;
import techreborn.itemblocks.ItemBlockQuantumChest;
import techreborn.itemblocks.ItemBlockQuantumTank;
import techreborn.itemblocks.ItemBlockRubberSapling;
import techreborn.itemblocks.ItemBlockStorage;
import techreborn.itemblocks.ItemBlockStorage2;
import techreborn.tiles.TileAesu;
import techreborn.tiles.TileAlloyFurnace;
import techreborn.tiles.TileAlloySmelter;
import techreborn.tiles.TileAssemblingMachine;
import techreborn.tiles.TileBlastFurnace;
import techreborn.tiles.TileCentrifuge;
import techreborn.tiles.TileChargeBench;
import techreborn.tiles.TileChemicalReactor;
import techreborn.tiles.TileChunkLoader;
import techreborn.tiles.TileDigitalChest;
import techreborn.tiles.TileImplosionCompressor;
import techreborn.tiles.TileIndustrialElectrolyzer;
import techreborn.tiles.TileIndustrialGrinder;
import techreborn.tiles.TileIndustrialSawmill;
import techreborn.tiles.TileMachineCasing;
import techreborn.tiles.TileMatterFabricator;
import techreborn.tiles.TilePlayerDectector;
import techreborn.tiles.TileQuantumChest;
import techreborn.tiles.TileQuantumTank;
import techreborn.tiles.TileRollingMachine;
import techreborn.tiles.TileThermalGenerator;
import techreborn.tiles.TileVacuumFreezer;
import techreborn.tiles.fusionReactor.TileEntityFusionController;
import techreborn.tiles.generator.TileDieselGenerator;
import techreborn.tiles.generator.TileDragonEggSiphoner;
@ -96,6 +171,9 @@ public class ModBlocks {
public static Block rubberSapling;
public static Block rubberPlanks;
public static Block ironFence;
public static Block ironFenceGate;
public static void init() {
thermalGenerator = new BlockThermalGenerator();
GameRegistry.registerBlock(thermalGenerator, "techreborn.thermalGenerator");
@ -298,6 +376,11 @@ public class ModBlocks {
rubberSapling = new BlockRubberSapling();
GameRegistry.registerBlock(rubberSapling, ItemBlockRubberSapling.class, "rubberSapling");
ironFence = new BlockIronFence();
GameRegistry.registerBlock(ironFence, "ironFence");
ironFenceGate = new BlockIronFenceGate();
GameRegistry.registerBlock(ironFenceGate, "ironFenceGate");
registerOreDict();
Core.logHelper.info("TechReborns Blocks Loaded");
@ -354,9 +437,15 @@ public class ModBlocks {
OreDictionary.registerOre("machineBasic", new ItemStack(machineframe, 1));
OreDictionary.registerOre("treeSapling", rubberSapling);
OreDictionary.registerOre("saplingRubber", rubberSapling);
OreDictionary.registerOre("logWood", new ItemStack(rubberLog, 1 , OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("logRubber", new ItemStack(rubberLog, 1 , OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("plankWood", new ItemStack(rubberPlanks, 1 , OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("plankRubber", new ItemStack(rubberPlanks, 1 , OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("treeLeaves", new ItemStack(rubberLeaves, 1 , OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("leavesRubber", new ItemStack(rubberLeaves, 1 , OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("fenceIron", ironFence);
}
}

View file

@ -1,12 +1,11 @@
package techreborn.proxies;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.client.model.ModelLoaderRegistry;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import reborncore.client.multiblock.MultiblockRenderEvent;
import techreborn.client.ClientMultiBlocks;
import techreborn.client.IconSupplier;
import techreborn.client.RegisterItemJsons;
import techreborn.client.StackToolTipEvent;
import techreborn.client.VersionCheckerClient;
import techreborn.client.hud.ChargeHud;
@ -19,6 +18,7 @@ public class ClientProxy extends CommonProxy {
@Override
public void init() {
super.init();
RegisterItemJsons.registerModels();
MinecraftForge.EVENT_BUS.register(new IconSupplier());
MinecraftForge.EVENT_BUS.register(new ChargeHud());
MinecraftForge.EVENT_BUS.register(new VersionCheckerClient());

View file

@ -0,0 +1,20 @@
{
"variants": {
"facing=south,in_wall=false,open=false": { "model": "oak_fence_gate_closed" },
"facing=west,in_wall=false,open=false": { "model": "oak_fence_gate_closed", "y": 90, "uvlock": true },
"facing=north,in_wall=false,open=false": { "model": "oak_fence_gate_closed", "y": 180, "uvlock": true },
"facing=east,in_wall=false,open=false": { "model": "oak_fence_gate_closed", "y": 270, "uvlock": true },
"facing=south,in_wall=false,open=true": { "model": "oak_fence_gate_open" },
"facing=west,in_wall=false,open=true": { "model": "oak_fence_gate_open", "y": 90, "uvlock": true },
"facing=north,in_wall=false,open=true": { "model": "oak_fence_gate_open", "y": 180, "uvlock": true },
"facing=east,in_wall=false,open=true": { "model": "oak_fence_gate_open", "y": 270, "uvlock": true },
"facing=south,in_wall=true,open=false": { "model": "oak_wall_gate_closed" },
"facing=west,in_wall=true,open=false": { "model": "oak_wall_gate_closed", "y": 90, "uvlock": true },
"facing=north,in_wall=true,open=false": { "model": "oak_wall_gate_closed", "y": 180, "uvlock": true },
"facing=east,in_wall=true,open=false": { "model": "oak_wall_gate_closed", "y": 270, "uvlock": true },
"facing=south,in_wall=true,open=true": { "model": "oak_wall_gate_open" },
"facing=west,in_wall=true,open=true": { "model": "oak_wall_gate_open", "y": 90, "uvlock": true },
"facing=north,in_wall=true,open=true": { "model": "oak_wall_gate_open", "y": 180, "uvlock": true },
"facing=east,in_wall=true,open=true": { "model": "oak_wall_gate_open", "y": 270, "uvlock": true }
}
}

View file

@ -0,0 +1,20 @@
{
"variants": {
"east=false,north=false,south=false,west=false": { "model": "techreborn:iron_fence_post" },
"east=false,north=true,south=false,west=false": { "model": "techreborn:iron_fence_n", "uvlock": true },
"east=true,north=false,south=false,west=false": { "model": "techreborn:iron_fence_n", "y": 90, "uvlock": true },
"east=false,north=false,south=true,west=false": { "model": "techreborn:iron_fence_n", "y": 180, "uvlock": true },
"east=false,north=false,south=false,west=true": { "model": "techreborn:iron_fence_n", "y": 270, "uvlock": true },
"east=true,north=true,south=false,west=false": { "model": "techreborn:iron_fence_ne", "uvlock": true },
"east=true,north=false,south=true,west=false": { "model": "techreborn:iron_fence_ne", "y": 90, "uvlock": true },
"east=false,north=false,south=true,west=true": { "model": "techreborn:iron_fence_ne", "y": 180, "uvlock": true },
"east=false,north=true,south=false,west=true": { "model": "techreborn:iron_fence_ne", "y": 270, "uvlock": true },
"east=false,north=true,south=true,west=false": { "model": "techreborn:iron_fence_ns", "uvlock": true },
"east=true,north=false,south=false,west=true": { "model": "techreborn:iron_fence_ns", "y": 90, "uvlock": true },
"east=true,north=true,south=true,west=false": { "model": "techreborn:iron_fence_nse", "uvlock": true },
"east=true,north=false,south=true,west=true": { "model": "techreborn:iron_fence_nse", "y": 90, "uvlock": true },
"east=false,north=true,south=true,west=true": { "model": "techreborn:iron_fence_nse", "y": 180, "uvlock": true },
"east=true,north=true,south=false,west=true": { "model": "techreborn:iron_fence_nse", "y": 270, "uvlock": true },
"east=true,north=true,south=true,west=true": { "model": "techreborn:iron_fence_nsew", "uvlock": true }
}
}

View file

@ -67,6 +67,9 @@ tile.techreborn.rubberplank.name=Rubber Wood Planks
tile.techreborn.rubberleaves.name=Rubber Leaves
tile.techreborn.rubbersapling.name=Rubber Sapling
tile.techreborn.ironfence.name=Iron Fence
tile.techreborn.ironfencegate.name=Iron Fence Gate
#Ores
tile.techreborn.ore.Galena.name=Galena Ore
tile.techreborn.ore.Iridium.name=Iridium Ore

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_gate_closed",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_gate_open",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_inventory",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_n",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_ne",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_ns",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_nse",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_nsew",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_post",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/wall_gate_closed",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/wall_gate_open",
"textures": {
"texture": "blocks/iron_block"
}
}

View file

@ -0,0 +1,13 @@
{
"parent": "techreborn:block/iron_fence_inventory",
"display": {
"thirdperson": {
"rotation": [ 0, 0, 180 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
},
"gui": {
"rotation": [ 0, 90, 0 ]
}
}
}

View file

@ -0,0 +1,15 @@
{
"parent": "techreborn:block/iron_fence_gate_closed",
"display": {
"thirdperson": {
"rotation": [ 0, -90, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
},
"firstperson": {
"rotation": [ 0, 90, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 1, 1, 1 ]
}
}
}