diff options
author | Volence <32358820+Volence@users.noreply.github.com> | 2024-07-31 13:04:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-01 00:04:23 +0700 |
commit | b4ee66356b06d0fcc75654506ed67aa57755393b (patch) | |
tree | e79fb57466260353d5128c73ee01a3b18847a5fe /src/main/java/gregtech/common/blocks/GT_Block_Casings11.java | |
parent | 5c07f729139fff33afd43f2cdfc2ae7a1eb050e0 (diff) | |
download | GT5-Unofficial-b4ee66356b06d0fcc75654506ed67aa57755393b.tar.gz GT5-Unofficial-b4ee66356b06d0fcc75654506ed67aa57755393b.tar.bz2 GT5-Unofficial-b4ee66356b06d0fcc75654506ed67aa57755393b.zip |
Add multi lathe (#2783)
* first few files outlining new lathe multi
* MultiLathe: Attempt to add tiers based on pipes
* MultiLathe: Added Item Pipe Casing blocks and tiers
* MultiLathe: Finished Machine and its mechanics
* MultiLathe: Add recipe map and recipes for new precision lathe mode
* MultiLathe: Apply Spotless
* Revert recipe map changes
* remove a few more recipe additions
* revert to basic lathe recipe map for the multi
* fix imports and make them all explicit
* remove a few more * imports, update tooltip info
* Update src/main/java/gregtech/common/blocks/GT_Block_Casings11.java
Co-authored-by: Mary <33456283+FourIsTheNumber@users.noreply.github.com>
* Added to the texture list documentation for blocks
---------
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: Mary <33456283+FourIsTheNumber@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/common/blocks/GT_Block_Casings11.java')
-rw-r--r-- | src/main/java/gregtech/common/blocks/GT_Block_Casings11.java | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings11.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings11.java new file mode 100644 index 0000000000..b4ec07ab70 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings11.java @@ -0,0 +1,58 @@ +package gregtech.common.blocks; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; + +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ +public class GT_Block_Casings11 extends GT_Block_Casings_Abstract { + + public GT_Block_Casings11() { + super(GT_Item_Casings11.class, "gt.blockcasings11", GT_Material_Casings.INSTANCE, 16); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Tin Item Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Brass Item Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Electrum Item Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Platinum Item Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Osmium Item Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Quantium Item Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Fluxed Electrum Item Pipe Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Black Plutonium Item Pipe Casing"); + + ItemList.Casing_Item_Pipe_Tin.set(new ItemStack(this, 1, 0)); + ItemList.Casing_Item_Pipe_Brass.set(new ItemStack(this, 1, 1)); + ItemList.Casing_Item_Pipe_Electrum.set(new ItemStack(this, 1, 2)); + ItemList.Casing_Item_Pipe_Platinum.set(new ItemStack(this, 1, 3)); + ItemList.Casing_Item_Pipe_Osmium.set(new ItemStack(this, 1, 4)); + ItemList.Casing_Item_Pipe_Quantium.set(new ItemStack(this, 1, 5)); + ItemList.Casing_Item_Pipe_Fluxed_Electrum.set(new ItemStack(this, 1, 6)); + ItemList.Casing_Item_Pipe_Black_Plutonium.set(new ItemStack(this, 1, 7)); + } + + @Override + public int getTextureIndex(int aMeta) { + return (16 << 7) | (aMeta + 64); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int ordinalSide, int aMeta) { + return switch (aMeta) { + case 1 -> Textures.BlockIcons.MACHINE_CASING_ITEM_PIPE_BRASS.getIcon(); + case 2 -> Textures.BlockIcons.MACHINE_CASING_ITEM_PIPE_ELECTRUM.getIcon(); + case 3 -> Textures.BlockIcons.MACHINE_CASING_ITEM_PIPE_PLATINUM.getIcon(); + case 4 -> Textures.BlockIcons.MACHINE_CASING_ITEM_PIPE_OSMIUM.getIcon(); + case 5 -> Textures.BlockIcons.MACHINE_CASING_ITEM_PIPE_QUANTIUM.getIcon(); + case 6 -> Textures.BlockIcons.MACHINE_CASING_ITEM_PIPE_FLUXED_ELECTRUM.getIcon(); + case 7 -> Textures.BlockIcons.MACHINE_CASING_ITEM_PIPE_BLACK_PLUTONIUM.getIcon(); + default -> Textures.BlockIcons.MACHINE_CASING_ITEM_PIPE_TIN.getIcon(); + }; + } +} |