diff options
author | GlodBlock <1356392126@qq.com> | 2021-07-25 22:20:51 +0800 |
---|---|---|
committer | GlodBlock <1356392126@qq.com> | 2021-07-25 22:20:51 +0800 |
commit | e1bc1013d5fa8a579d509da6e97901b6410959e0 (patch) | |
tree | f29057473b790057cef2cea7734cecd0b4000440 /src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java | |
parent | 5ae6979d18f6a729a5267563cc03c66e6f227286 (diff) | |
download | GT5-Unofficial-e1bc1013d5fa8a579d509da6e97901b6410959e0.tar.gz GT5-Unofficial-e1bc1013d5fa8a579d509da6e97901b6410959e0.tar.bz2 GT5-Unofficial-e1bc1013d5fa8a579d509da6e97901b6410959e0.zip |
add blocks for LargeEssentiaGenerator
Diffstat (limited to 'src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java')
-rw-r--r-- | src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java b/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java index 1f856da921..271079a590 100644 --- a/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java +++ b/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java @@ -1,5 +1,6 @@ package GoodGenerator.Blocks.RegularBlock; +import GoodGenerator.Main.GoodGenerator; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -9,10 +10,14 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.EnumCreatureType; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import java.util.List; + public class Casing extends Block { @SideOnly(Side.CLIENT) @@ -27,6 +32,7 @@ public class Casing extends Block { this.name = name; this.textureNames = texture; this.setHarvestLevel("wrench",2); + this.setCreativeTab(GoodGenerator.GG); GregTech_API.registerMachineBlock(this, -1); } @@ -37,6 +43,7 @@ public class Casing extends Block { this.name = name; this.textureNames = texture; this.setHarvestLevel("wrench",2); + this.setCreativeTab(GoodGenerator.GG); GregTech_API.registerMachineBlock(this, -1); } @@ -47,6 +54,7 @@ public class Casing extends Block { this.name = name; this.textureNames = texture; this.setHarvestLevel("wrench",2); + this.setCreativeTab(GoodGenerator.GG); GregTech_API.registerMachineBlock(this, -1); } @@ -71,6 +79,15 @@ public class Casing extends Block { } @Override + @SideOnly(Side.CLIENT) + @SuppressWarnings("unchecked") + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < this.textureNames.length; i++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); |