From b7c71edf4f2b55b3478c4c6864db7dd22cc4493b Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Mon, 14 Mar 2016 08:34:15 +0000 Subject: [PATCH] Added MFE and MFSU blocks and tiles, gui and textures to come later --- .../blocks/storage/BlockBatBox.java | 4 +- .../techreborn/blocks/storage/BlockMFE.java | 48 +++++++++++++++++++ .../techreborn/blocks/storage/BlockMFSU.java | 48 +++++++++++++++++++ src/main/java/techreborn/init/ModBlocks.java | 12 +++++ .../techreborn/tiles/storage/TileMFE.java | 37 ++++++++++++++ .../techreborn/tiles/storage/TileMFSU.java | 37 ++++++++++++++ 6 files changed, 183 insertions(+), 3 deletions(-) create mode 100644 src/main/java/techreborn/blocks/storage/BlockMFE.java create mode 100644 src/main/java/techreborn/blocks/storage/BlockMFSU.java create mode 100644 src/main/java/techreborn/tiles/storage/TileMFE.java create mode 100644 src/main/java/techreborn/tiles/storage/TileMFSU.java diff --git a/src/main/java/techreborn/blocks/storage/BlockBatBox.java b/src/main/java/techreborn/blocks/storage/BlockBatBox.java index a937fce92..f1e3efdd0 100644 --- a/src/main/java/techreborn/blocks/storage/BlockBatBox.java +++ b/src/main/java/techreborn/blocks/storage/BlockBatBox.java @@ -6,8 +6,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import reborncore.common.blocks.BlockMachineBase; import reborncore.common.blocks.IRotationTexture; -import techreborn.Core; -import techreborn.client.GuiHandler; import techreborn.client.TechRebornCreativeTab; import techreborn.tiles.storage.TileBatBox; @@ -27,7 +25,7 @@ public class BlockBatBox extends BlockMachineBase implements IRotationTexture { return new TileBatBox(); } - private final String prefix = "techreborn:blocks/machine/storage/"; + protected final String prefix = "techreborn:blocks/machine/storage/"; @Override public String getFrontOff() { diff --git a/src/main/java/techreborn/blocks/storage/BlockMFE.java b/src/main/java/techreborn/blocks/storage/BlockMFE.java new file mode 100644 index 000000000..04f89d5ad --- /dev/null +++ b/src/main/java/techreborn/blocks/storage/BlockMFE.java @@ -0,0 +1,48 @@ +package techreborn.blocks.storage; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import techreborn.client.TechRebornCreativeTab; +import techreborn.tiles.storage.TileMFE; + +/** + * Created by modmuss50 on 14/03/2016. + */ +public class BlockMFE extends BlockBatBox { + + public BlockMFE() { + super(); + setUnlocalizedName("techreborn.mfe"); + setCreativeTab(TechRebornCreativeTab.instance); + } + + @Override + public TileEntity createNewTileEntity(World world, int p_149915_2_) { + return new TileMFE(); + } + + @Override + public String getFrontOff() { + return prefix + "batbox_front"; + } + + @Override + public String getFrontOn() { + return prefix + "batbox_front"; + } + + @Override + public String getSide() { + return prefix + "batbox_side"; + } + + @Override + public String getTop() { + return prefix + "batbox_side"; + } + + @Override + public String getBottom() { + return prefix + "batbox_side"; + } +} diff --git a/src/main/java/techreborn/blocks/storage/BlockMFSU.java b/src/main/java/techreborn/blocks/storage/BlockMFSU.java new file mode 100644 index 000000000..b8d948405 --- /dev/null +++ b/src/main/java/techreborn/blocks/storage/BlockMFSU.java @@ -0,0 +1,48 @@ +package techreborn.blocks.storage; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import techreborn.client.TechRebornCreativeTab; +import techreborn.tiles.storage.TileMFSU; + +/** + * Created by modmuss50 on 14/03/2016. + */ +public class BlockMFSU extends BlockBatBox { + + public BlockMFSU() { + super(); + setUnlocalizedName("techreborn.mfsu"); + setCreativeTab(TechRebornCreativeTab.instance); + } + + @Override + public TileEntity createNewTileEntity(World world, int p_149915_2_) { + return new TileMFSU(); + } + + @Override + public String getFrontOff() { + return prefix + "batbox_front"; + } + + @Override + public String getFrontOn() { + return prefix + "batbox_front"; + } + + @Override + public String getSide() { + return prefix + "batbox_side"; + } + + @Override + public String getTop() { + return prefix + "batbox_side"; + } + + @Override + public String getBottom() { + return prefix + "batbox_side"; + } +} diff --git a/src/main/java/techreborn/init/ModBlocks.java b/src/main/java/techreborn/init/ModBlocks.java index 09cd02018..7884c3f4a 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -78,6 +78,8 @@ import techreborn.tiles.idsu.TileIDSU; import techreborn.tiles.lesu.TileLesu; import techreborn.tiles.lesu.TileLesuStorage; import techreborn.tiles.storage.TileBatBox; +import techreborn.tiles.storage.TileMFE; +import techreborn.tiles.storage.TileMFSU; import techreborn.tiles.teir1.TileCompressor; import techreborn.tiles.teir1.TileElectricFurnace; import techreborn.tiles.teir1.TileExtractor; @@ -137,6 +139,8 @@ public class ModBlocks { public static Block windMill; public static Block recycler; public static Block batBox; + public static Block mfe; + public static Block mfsu; public static BlockOre ore; public static BlockOre2 ore2; @@ -383,6 +387,14 @@ public class ModBlocks { batBox = new BlockBatBox(); GameRegistry.registerBlock(batBox, "batBox"); GameRegistry.registerTileEntity(TileBatBox.class, "TileBatBox"); + + mfe = new BlockMFE(); + GameRegistry.registerBlock(mfe, "mfe"); + GameRegistry.registerTileEntity(TileMFE.class, "TileMFE"); + + mfsu = new BlockMFSU(); + GameRegistry.registerBlock(mfsu, "mfsu"); + GameRegistry.registerTileEntity(TileMFSU.class, "TileMFSU"); ironFurnace = new BlockIronFurnace(); GameRegistry.registerBlock(ironFurnace, "ironfurnace"); diff --git a/src/main/java/techreborn/tiles/storage/TileMFE.java b/src/main/java/techreborn/tiles/storage/TileMFE.java new file mode 100644 index 000000000..4b486a5f5 --- /dev/null +++ b/src/main/java/techreborn/tiles/storage/TileMFE.java @@ -0,0 +1,37 @@ +package techreborn.tiles.storage; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import reborncore.api.power.EnumPowerTier; +import techreborn.init.ModBlocks; + +/** + * Created by modmuss50 on 14/03/2016. + */ +public class TileMFE extends TileBatBox { + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(ModBlocks.mfe); + } + + @Override + public double getMaxPower() { + return 4000000; + } + + @Override + public double getMaxOutput() { + return 512; + } + + @Override + public double getMaxInput() { + return 512; + } + + @Override + public EnumPowerTier getTier() { + return EnumPowerTier.MEDIUM; + } +} diff --git a/src/main/java/techreborn/tiles/storage/TileMFSU.java b/src/main/java/techreborn/tiles/storage/TileMFSU.java new file mode 100644 index 000000000..efb69112f --- /dev/null +++ b/src/main/java/techreborn/tiles/storage/TileMFSU.java @@ -0,0 +1,37 @@ +package techreborn.tiles.storage; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import reborncore.api.power.EnumPowerTier; +import techreborn.init.ModBlocks; + +/** + * Created by modmuss50 on 14/03/2016. + */ +public class TileMFSU extends TileBatBox { + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(ModBlocks.mfsu); + } + + @Override + public double getMaxPower() { + return 40000000; + } + + @Override + public double getMaxOutput() { + return 2048; + } + + @Override + public double getMaxInput() { + return 2048; + } + + @Override + public EnumPowerTier getTier() { + return EnumPowerTier.HIGH; + } +}