diff options
| author | NotAPenguin <michiel.vandeginste@gmail.com> | 2024-08-03 23:21:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-03 23:21:44 +0200 |
| commit | b65ace37de4f585b8089ad413ee877b792da11ca (patch) | |
| tree | 2e0445785c5008df15151f729da148fb70dbc21d /src/main/java/gregtech/common/blocks | |
| parent | e180e49fc6305f71b1f1b18141b946f794a7012b (diff) | |
| download | GT5-Unofficial-b65ace37de4f585b8089ad413ee877b792da11ca.tar.gz GT5-Unofficial-b65ace37de4f585b8089ad413ee877b792da11ca.tar.bz2 GT5-Unofficial-b65ace37de4f585b8089ad413ee877b792da11ca.zip | |
Waterline rework (#2577)
* Add barebones PurificationPlant class
* Make simple 3x3 structure to form purification plant
* Add base purification unit class and dummy sifter unit MTE
* Make sifter unit form
* Fix accidental wildcard import
* Implement basic linking of units to controller using data stick
* Make linking more robust, save bidirectional links, add scanner output
* add linking range, error message and unregister old controller when re-linking
* Add link status of purification units to waila body
* Disable maintenance issues on purification plant units
* spotless
* Check structure of linked purification units in main controller
* Remove all star imports
* Small refactor to avoid updating status from main controller
* spotless
* Attempt to document current code
* Convert some comments to javadoc
* Implement basic processing cycle, sync it with linked purification units
* Make water purification plant drain power
* Calculate power drain from active units and remove controller power drain
* spotless
* Add very barebones recipemap
* Fix recipemap name in lang file
* spotless
* Fix purification unit recipemap name
* spotless
* more sane amount of max fluid outputs
* add some item outputs to sifter unit
* Very simple recipe processing, may be buggy
* spotless
* Implement recipe failure
* Implement void protection for purification units
* spotless
* buff item output odds slightly
* Add WIP grade 1 structure
* spotless
* Store base success chance in recipe metadata and display it in NEI
* Fill sifter plant with water
* Add comment
* Allow construction sifter unit in survival
* Implement water boost
* Fix water boost allowing output chance to go over 100%
* Implement failed recipes outputting lower tier water
* Fix typo
* Fix deformed purification unit still drawing power
* Slightly refactor recipe check so base class can read result
* Create empty ModularUI container for purification plant
* The great gui struggle part 1
* More gui struggles, we have a button now
* Adjust button text and size
* gui wars: the rise of the sync
* gui wars: a new hope
* fix the sync
* is pengu old enough to know exceeder?
* Fix being able to link the same unit multiple times
* Sync status string to client
* Sign sifter with my name
* Show status somewhat properly
* Adjust sifter base chance and structure
* Fully implement sifter unit
* More tooltip refactoring
* Add structure info to sifter tooltip.
* nitpicking tooltips
* Adding sound to Purification Plant Main Unit.
* fix star imports
* Add basic coagulator unit, add recipemap for it
* Write coagulator tooltip
* comma nitpicking
* more tooltip work
* small refactor to purification plant controller
* start work on custom recipemap frontend
* Fully implement coagulator
* Update structure requirements in tooltips
* Move controller text in structure tooltips to be consistent
* fix NPE on world load
* Add base ph adjustment unit MTE
* Add info to main controller and energy hatch check
* Fixing tooltip of Main Controller & Energy/Exotic Hatch check.
* Create full pH adjustment structure
* disallow any voiding on purification unit
* Small custom RecipeMap frontend for ph adjustment
* Generate random initial pH value
* Implement inserting NaOH and HCl to adjust pH
* Add easter egg
* Implement pH sensor hatch
* Properly consume HCl and round pH value to 2 digits
* Write ph adjustment unit tooltip
* Tooltip nitpicking
* Try to fix some structurelib hints
* More trying to fix hints
* Add industrial strength concrete casing block
* Add water loop sound to the game
* Document random initial pH in tooltip
* Add glass material base
* Fix spotless formatting in Textures docs because I cannot take it anymore
* Add glass texture
* Try adding transparent glass
* Transparent glass working
* Create pH resistant glass and update pH structure to use it
* Create full structure for main purification plant
* Create custom water purification casing block
* Properly balance ferrous wastewater reprocessing and reduce input by a factor 10
* Add pH factor to NEI tooltip and fix coagulator structure
* Structure tooltip for Purification Plant base
* Add GT_Block_Glass2 and properly set maxMeta
* Add Tinted Industrial Glass blocks
* Fix BlockCasing9 not showing custom tooltip
* Register tinted glass as EV glass
* Add sterile water plant casing and revert tooltip change
* Mention required water in sifter tooltip
* Add more textures and casings
* Add more textures, sounds and add structure info for pH adjustment
* Rename sifter unit to clarifier
* Rename coagulation unit to flocculation unit
* Add activated carbon line
* Fix unintended activated carbon recipe
* Add activated carbon filter
* Add polyaluminium chloride + solution
* Add new custom textures by @BlueHero233
* Wip recipe page with new background for flocculation
* Fix flocculation background image mostly
* Finally aligned the slots
* angery mumbles
* Finish flocculation recipe page
* All the recipe pages!
* Add new reworked textures
* Fix ph adjustment being t3 instead of t4
* Fix invisible casing
* apply chembalance to polyaluminium chloride properly
* Fix ferrous wastewater -> flocculation waste liquid
* Move flocculation to grade 3
* create ozonation unit with placeholder blocks
* add new blocks for ozonation with placeholder textures
* Add water to ozonation structure
* Create ozone gas material
* Add ozone recipe
* Add textures for ozone unit
* Add sound loop for ozonation
* fix
* implement ozonation mechanics
* Finalize ozonation tooltip
* Create dummy plasma heater multi
* Update textures for plasma heater
* Add grade 5 recipemap
* Add hatches to plasma heater multi
* Add basic plasma heating unit variables
* Implement plasma heating unit mechanics
* Add plasma heater tooltip
* Add structure info to plasma heater tooltip
* fix ozonation tooltip, add frontend
* Fix positioning on ozonation tooltip and fix plasma heater crash
* Add UV treatment MTE and structure without textures
* Revert accidental addition of debug dependencies
* Add initial version of uv unit textures
* update naquadria casing, add water color gradient
* Some minor cleanup and added docs
* Create lens housing bus
* Add lens bus to UV treatment unit
* Add lens indicator hatch
* Merge GT_MetaGeneratedItem_03.java
* Add lens indicator hatch
* Add the lens cycle, uv treatment recipe map and fix eut of flocculation recipe
* Implement lens swapping mechanic
* Clean up first lens swap
* Fix uv recipemap lang and move lens cycle to recipe
* Write uv treatment tooltip
* Add sounds for uv and plasma steps
* Create empty degasifier class
* Create temporary debug structure for degasifier
* set temp casing index for degasifier
* create degasifier control hatch
* create slightly less temporary but still temporary structure for degasifier
* Start impl of degasifier
* fix fluid consumption and nbt loading of degasifier
* Degasifier implementation should work now
* Rename and reformat some things and start work on degasser tooltiop
* give last bit much lower chance of being on to avoid cheesing
* Finish degasifier tooltip
* Integrate some deleno lore
* hopefully fix all moved casing meta ids after merge
* Create finalized degasser structure
* Integrate more deleno lore
* Add even more lore
* Create placeholder particle catalysts and fetch particle items from gt++
* Fix wrong casing and recipemap localization
* Create parallel config menu
* refactor purification recipecheck slightly
* implement parallel amount on water i/o and power
* add tooltip info about parallel config
* fix text
* update block names in structure tooltips
* create structure tooltip for degasser
* create textureless quark catalyst items
* add the purple glass
* fix lore typos
* fix some casing indices
* remove concrete floor from water plant and reword tooltip
* fix main plant structure and add placeholder structure for t8 step
* fix structurecheck for main plant and add random catalyst generation for t8
* implement basic mechanics for particle extractor (wip)
* Create plasma heater frontend
* implement final mechanics and bugfixes for particle extractor
* add recipes for re-aligning quark catalysts
* add simple recipes for catalyst alignment
* initial replacement of purified water in engraver recipes
* add purified water to all wafer cutting recipes
* fix purified water amounts
* buff quark cyclotron recipe again
* extract t8 unit casings into their own icons
* Write initial tooltip for t8 module
* add purified water to mask recipes
* Add recipe comparator to show low tier purified water recipes first
* add min casing check to waterline multis
* buff ozone production
* update t8 structure
* make purified water optional again for naq wafers
* Fix blockrenderer for purification plant
* fix nei previews
* fix nei
* really fix nei this time
* add t8 lore
* fix hatch recipe locking blocking automation on some steps
* try to solve weirdness with grade 3 recipe
* fix issues with recipecheck
* fix missing null check
* make ph sensor use a strict inequality check
* fix min casings on t5
* significantly nerf purified water usage for beamline masks
* disable void protection for waterline
* small adjustments to t6 unit
* more small adjustments to t6 unit to prevent easy automation cheese
* fix degasser redstone output and missing return statement
* remove water QFT catalyst recipes
---------
Co-authored-by: Tianyou Mei <meitianyou94@gmail.com>
Co-authored-by: OlliedeLeeuw <ollie.riemersma@xs4all.nl>
Co-authored-by: Ollie_de_Leeuw <154506304+OlliedeLeeuw@users.noreply.github.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/common/blocks')
7 files changed, 297 insertions, 1 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings10.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings10.java index 660c709886..83219f45ee 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings10.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings10.java @@ -20,7 +20,10 @@ public class GT_Block_Casings10 extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "MagTech Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Laser Containment Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Quark Exclusion Casing"); + ItemList.Casing_Electromagnetic_Separator.set(new ItemStack(this, 1, 0)); + ItemList.BlockQuarkContainmentCasing.set(new ItemStack(this, 1, 2)); ItemList.Casing_Laser.set(new ItemStack(this, 1, 1)); } @@ -35,6 +38,7 @@ public class GT_Block_Casings10 extends GT_Block_Casings_Abstract { return switch (aMeta) { case 0 -> Textures.BlockIcons.MACHINE_CASING_EMS.getIcon(); case 1 -> Textures.BlockIcons.MACHINE_CASING_LASER.getIcon(); + case 2 -> Textures.BlockIcons.BLOCK_QUARK_CONTAINMENT_CASING.getIcon(); default -> Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); }; } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java index 4441885f30..6f33cda013 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java @@ -22,15 +22,51 @@ public class GT_Block_Casings9 extends GT_Block_Casings_Abstract { GT_LanguageManager .addStringLocalization(getUnlocalizedName() + ".1.tooltip", "Less than five 0.1μm particles per m^3"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Primitive Wooden Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".3.name", "Superplasticizer-Treated High Strength Concrete"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Sterile Water Plant Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".5.name", "Reinforced Sterile Water Plant Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Slick Sterile Flocculation Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".7.name", "Stabilized Naquadah Water Plant Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".8.name", "Inert Neutralization Water Plant Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Reactive Gas Containment Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Inert Filtration Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".11.name", "Heat-Resistant Trinium Plated Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".12.name", "Naquadria-Reinforced Water Plant Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".13.name", "High Energy Ultraviolet Emitter Casing"); + // placeholder name + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".14.name", "Particle Beam Guidance Pipe Casing"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".15.name", "Femtometer-Calibrated Particle Beam Casing"); ItemList.Casing_Pipe_Polybenzimidazole.set(new ItemStack(this, 1, 0)); ItemList.Casing_Vent_T2.set(new ItemStack(this, 1, 1)); ItemList.WoodenCasing.set(new ItemStack(this, 1, 2)); + ItemList.BlockIndustrialStrengthConcrete.set(new ItemStack(this, 1, 3)); + ItemList.BlockIndustrialWaterPlantCasing.set(new ItemStack(this, 1, 4)); + ItemList.BlockSterileWaterPlantCasing.set(new ItemStack(this, 1, 5)); + ItemList.BlockFlocculationCasing.set(new ItemStack(this, 1, 6)); + ItemList.BlockNaquadahReinforcedWaterPlantCasing.set(new ItemStack(this, 1, 7)); + ItemList.BlockExtremeCorrosionResistantCasing.set(new ItemStack(this, 1, 8)); + ItemList.BlockHighPressureResistantCasing.set(new ItemStack(this, 1, 9)); + ItemList.BlockOzoneCasing.set(new ItemStack(this, 1, 10)); + ItemList.BlockPlasmaHeatingCasing.set(new ItemStack(this, 1, 11)); + ItemList.BlockNaquadriaReinforcedWaterPlantCasing.set(new ItemStack(this, 1, 12)); + ItemList.BlockUltraVioletLaserEmitter.set(new ItemStack(this, 1, 13)); + ItemList.BlockQuarkPipe.set(new ItemStack(this, 1, 14)); + ItemList.BlockQuarkReleaseChamber.set(new ItemStack(this, 1, 15)); } @Override public int getTextureIndex(int aMeta) { - return (1 << 7) | (aMeta + 64); + return (16 << 7) | (aMeta + 16); } @Override @@ -41,6 +77,19 @@ public class GT_Block_Casings9 extends GT_Block_Casings_Abstract { case 1 -> Textures.BlockIcons.MACHINE_CASING_VENT_T2.getIcon(); case 2 -> ordinalSide >= 2 ? Textures.BlockIcons.TEXTURE_METAL_PANEL_E.getIcon() : Textures.BlockIcons.TEXTURE_METAL_PANEL_E_A.getIcon(); + case 3 -> Textures.BlockIcons.INDUSTRIAL_STRENGTH_CONCRETE.getIcon(); + case 4 -> Textures.BlockIcons.MACHINE_CASING_INDUSTRIAL_WATER_PLANT.getIcon(); + case 5 -> Textures.BlockIcons.WATER_PLANT_CONCRETE_CASING.getIcon(); + case 6 -> Textures.BlockIcons.MACHINE_CASING_FLOCCULATION.getIcon(); + case 7 -> Textures.BlockIcons.MACHINE_CASING_NAQUADAH_REINFORCED_WATER_PLANT.getIcon(); + case 8 -> Textures.BlockIcons.MACHINE_CASING_EXTREME_CORROSION_RESISTANT.getIcon(); + case 9 -> Textures.BlockIcons.MACHINE_CASING_HIGH_PRESSURE_RESISTANT.getIcon(); + case 10 -> Textures.BlockIcons.MACHINE_CASING_OZONE.getIcon(); + case 11 -> Textures.BlockIcons.MACHINE_CASING_PLASMA_HEATER.getIcon(); + case 12 -> Textures.BlockIcons.NAQUADRIA_REINFORCED_WATER_PLANT_CASING.getIcon(); + case 13 -> Textures.BlockIcons.UV_BACKLIGHT_STERILIZER_CASING.getIcon(); + case 14 -> Textures.BlockIcons.BLOCK_QUARK_PIPE.getIcon(); + case 15 -> Textures.BlockIcons.BLOCK_QUARK_RELEASE_CHAMBER.getIcon(); default -> Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); }; } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Glass1.java b/src/main/java/gregtech/common/blocks/GT_Block_Glass1.java new file mode 100644 index 0000000000..0665411259 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Glass1.java @@ -0,0 +1,106 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Facing; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +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 glass is split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + * + * This class hosts various special types of tiered glass with not many tiers. + */ +public class GT_Block_Glass1 extends GT_Block_Casings_Abstract { + + public GT_Block_Glass1() { + super(GT_Item_Glass1.class, "gt.blockglass1", Material.glass, 4); + this.opaque = false; + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Chemical Grade Glass"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".0.tooltip", + "Able to resist the most extreme chemical conditions."); + + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".1.name", "Electron-Permeable Neutronium Coated Glass"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Omni-Purpose Infinity Fused Glass"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".3.name", "Non-Photonic Matter Exclusion Glass"); + + ItemList.GlassPHResistant.set(new ItemStack(this, 1, 0)); + ItemList.GlassUVResistant.set(new ItemStack(this, 1, 1)); + ItemList.GlassOmniPurposeInfinityFused.set(new ItemStack(this, 1, 2)); + ItemList.GlassQuarkContainment.set(new ItemStack(this, 1, 3)); + } + + @Override + public int getTextureIndex(int aMeta) { + // Page 16, 0-16 + return (16 << 7) | (aMeta); + } + + @Override + public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() { + return 1; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int ordinalSide, int aMeta) { + return switch (aMeta) { + case 0 -> Textures.BlockIcons.GLASS_PH_RESISTANT.getIcon(); + case 1 -> Textures.BlockIcons.NEUTRONIUM_COATED_UV_RESISTANT_GLASS.getIcon(); + case 2 -> Textures.BlockIcons.OMNI_PURPOSE_INFINITY_FUSED_GLASS.getIcon(); + case 3 -> Textures.BlockIcons.GLASS_QUARK_CONTAINMENT.getIcon(); + default -> Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + }; + } + + /** + * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given + * coordinates. Args: blockAccess, x, y, z, side + */ + @SideOnly(Side.CLIENT) + @Override + public boolean shouldSideBeRendered(IBlockAccess worldIn, int x, int y, int z, int side) { + Block block = worldIn.getBlock(x, y, z); + + if (worldIn.getBlockMetadata(x, y, z) != worldIn.getBlockMetadata( + x - Facing.offsetsXForSide[side], + y - Facing.offsetsYForSide[side], + z - Facing.offsetsZForSide[side])) { + return true; + } + + if (block == this) { + return false; + } + + return super.shouldSideBeRendered(worldIn, x, y, z, side); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Block_TintedIndustrialGlass.java b/src/main/java/gregtech/common/blocks/GT_Block_TintedIndustrialGlass.java new file mode 100644 index 0000000000..93c6ebb298 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_TintedIndustrialGlass.java @@ -0,0 +1,98 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Facing; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.oredict.OreDictionary; + +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; + +public class GT_Block_TintedIndustrialGlass extends GT_Block_Casings_Abstract { + + public GT_Block_TintedIndustrialGlass() { + super(GT_Item_Glass1.class, "gt.blocktintedglass", Material.glass, 4); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Tinted Industrial Glass (White)"); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".1.name", "Tinted Industrial Glass (Light Gray)"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Tinted Industrial Glass (Gray)"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Tinted Industrial Glass (Black)"); + ItemList.GlassTintedIndustrialWhite.set(new ItemStack(this, 1, 0)); + ItemList.GlassTintedIndustrialLightGray.set(new ItemStack(this, 1, 1)); + ItemList.GlassTintedIndustrialGray.set(new ItemStack(this, 1, 2)); + ItemList.GlassTintedIndustrialBlack.set(new ItemStack(this, 1, 3)); + + // Register tinted industrial glass as EV-Tier glass + OreDictionary.registerOre("blockGlassEV", this); + + this.opaque = false; + } + + @Override + public int getTextureIndex(int aMeta) { + // Page 16, 32-47 + return (16 << 7) | (aMeta + 32); + } + + @Override + public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() { + return 1; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int ordinalSide, int aMeta) { + return switch (aMeta) { + case 0 -> Textures.BlockIcons.GLASS_TINTED_INDUSTRIAL_WHITE.getIcon(); + case 1 -> Textures.BlockIcons.GLASS_TINTED_INDUSTRIAL_LIGHT_GRAY.getIcon(); + case 2 -> Textures.BlockIcons.GLASS_TINTED_INDUSTRIAL_GRAY.getIcon(); + case 3 -> Textures.BlockIcons.GLASS_TINTED_INDUSTRIAL_BLACK.getIcon(); + default -> Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + }; + } + + /** + * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given + * coordinates. Args: blockAccess, x, y, z, side + */ + @SideOnly(Side.CLIENT) + @Override + public boolean shouldSideBeRendered(IBlockAccess worldIn, int x, int y, int z, int side) { + Block block = worldIn.getBlock(x, y, z); + + if (worldIn.getBlockMetadata(x, y, z) != worldIn.getBlockMetadata( + x - Facing.offsetsXForSide[side], + y - Facing.offsetsYForSide[side], + z - Facing.offsetsZForSide[side])) { + return true; + } + + if (block == this) { + return false; + } + + return super.shouldSideBeRendered(worldIn, x, y, z, side); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java index 678a2424be..e9b39ee2cd 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java @@ -11,4 +11,18 @@ public class GT_Item_Casings9 extends GT_Item_Casings_Abstract { public GT_Item_Casings9(Block block) { super(block); } + + /* + * @Override + * public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> aList, boolean aF3_H) { + * // Add tooltip info if it was given + * String localizedTooltip = GT_LanguageManager.getTranslation(aStack.getUnlocalizedName() + ".tooltip"); + * // getTranslation returns the key if no translation was found, but this just means + * // no tooltip was set. + * if (localizedTooltip.startsWith("gt.")) { + * aList.add(localizedTooltip); + * } + * super.addInformation(aStack, aPlayer, aList, aF3_H); + * } + */ } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Glass1.java b/src/main/java/gregtech/common/blocks/GT_Item_Glass1.java new file mode 100644 index 0000000000..7fbb33ff6e --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Item_Glass1.java @@ -0,0 +1,15 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; + +/** + * The glass types 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_Item_Glass1 extends GT_Item_Casings_Abstract { + + public GT_Item_Glass1(Block block) { + super(block); + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_TintedIndustrialGlass.java b/src/main/java/gregtech/common/blocks/GT_Item_TintedIndustrialGlass.java new file mode 100644 index 0000000000..9f633922ac --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Item_TintedIndustrialGlass.java @@ -0,0 +1,10 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; + +public class GT_Item_TintedIndustrialGlass extends GT_Item_Casings_Abstract { + + public GT_Item_TintedIndustrialGlass(Block block) { + super(block); + } +} |
