aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java
diff options
context:
space:
mode:
authorNotAPenguin <michiel.vandeginste@gmail.com>2024-09-02 23:17:17 +0200
committerGitHub <noreply@github.com>2024-09-02 23:17:17 +0200
commit1b820de08a05070909a267e17f033fcf58ac8710 (patch)
tree02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java
parentafd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff)
downloadGT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip
The Great Renaming (#3014)
* move kekztech to a single root dir * move detrav to a single root dir * move gtnh-lanthanides to a single root dir * move tectech and delete some gross reflection in gt++ * remove more reflection inside gt5u * delete more reflection in gt++ * fix imports * move bartworks and bwcrossmod * fix proxies * move galactigreg and ggfab * move gtneioreplugin * try to fix gt++ bee loader * apply the rename rules to BW * apply rename rules to bwcrossmod * apply rename rules to detrav scanner mod * apply rename rules to galacticgreg * apply rename rules to ggfab * apply rename rules to goodgenerator * apply rename rules to gtnh-lanthanides * apply rename rules to gt++ * apply rename rules to kekztech * apply rename rules to kubatech * apply rename rules to tectech * apply rename rules to gt apply the rename rules to gt * fix tt import * fix mui hopefully * fix coremod except intergalactic * rename assline recipe class * fix a class name i stumbled on * rename StructureUtility to GTStructureUtility to prevent conflict with structurelib * temporary rename of GTTooltipDataCache to old name * fix gt client/server proxy names
Diffstat (limited to 'src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java')
-rw-r--r--src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java91
1 files changed, 91 insertions, 0 deletions
diff --git a/src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java b/src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java
new file mode 100644
index 0000000000..47e4cf57c6
--- /dev/null
+++ b/src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java
@@ -0,0 +1,91 @@
+package kekztech.common.blocks;
+
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.client.renderer.texture.TextureMap;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.ResourceLocation;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GTUtility;
+import kekztech.KekzCore;
+import kekztech.common.itemBlocks.ItemBlockTFFTStorageField;
+import kekztech.common.tileentities.MTETankTFFT;
+
+public class BlockTFFTStorageField extends BaseGTUpdateableBlock {
+
+ private static final BlockTFFTStorageField INSTANCE = new BlockTFFTStorageField();
+ private static final int SUB_BLOCK_COUNT = MTETankTFFT.Field.VALUES.length + 1;
+ private static final IIcon[] textures = new IIcon[SUB_BLOCK_COUNT];
+
+ public enum TFFTCasingIcon implements IIconContainer {
+
+ INSTANCE;
+
+ @Override
+ public IIcon getIcon() {
+ return textures[0];
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return null;
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return TextureMap.locationBlocksTexture;
+ }
+ }
+
+ // I guess glodblock won't mind
+ static {
+ GTUtility.addTexturePage((byte) 12);
+ Textures.BlockIcons
+ .setCasingTexture((byte) 12, (byte) 127, TextureFactory.of(BlockTFFTStorageField.TFFTCasingIcon.INSTANCE));
+ }
+
+ private BlockTFFTStorageField() {
+ super(Material.iron);
+ }
+
+ public static Block registerBlock() {
+ final String blockName = "kekztech_tfftstoragefield_block";
+ INSTANCE.setBlockName(blockName);
+ INSTANCE.setCreativeTab(CreativeTabs.tabMisc);
+ INSTANCE.setHardness(5.0f);
+ INSTANCE.setResistance(6.0f);
+ GameRegistry.registerBlock(INSTANCE, ItemBlockTFFTStorageField.class, blockName);
+
+ return INSTANCE;
+ }
+
+ @Override
+ public void registerBlockIcons(IIconRegister ir) {
+ textures[0] = ir.registerIcon(KekzCore.MODID + ":" + "TFFTCasing");
+ for (int i = 1; i < SUB_BLOCK_COUNT; i++) {
+ textures[i] = ir.registerIcon(KekzCore.MODID + ":" + "TFFTStorageFieldBlock" + i);
+ }
+ }
+
+ @Override
+ public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
+ for (int i = 0; i < SUB_BLOCK_COUNT; i++) {
+ par3List.add(new ItemStack(par1, 1, i));
+ }
+ }
+
+ @Override
+ public IIcon getIcon(int side, int meta) {
+ return textures[meta];
+ }
+}