mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 21:20:06 +00:00
Fix fluid icons when default changes the used liquid
This commit is contained in:
1 parent
c098192864
commit
017a7f7058
2 files changed
+10
No files matched your search
@@ -1026,6 +1026,9 @@ public class TinkerSmeltery
|
||||
block.setBlockName(blockName);
|
||||
GameRegistry.registerBlock(block, blockName);
|
||||
|
||||
fluid.setBlock(block);
|
||||
block.setFluid(fluid);
|
||||
|
||||
// if the fluid was already registered we use that one instead
|
||||
if (isFluidPreRegistered)
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@ public class TConstructFluid extends BlockFluidClassic
|
||||
public IIcon stillIcon;
|
||||
public IIcon flowIcon;
|
||||
boolean overwriteFluidIcons = true;
|
||||
private Fluid fluid = null;
|
||||
|
||||
public TConstructFluid(Fluid fluid, Material material, String texture)
|
||||
{
|
||||
@@ -42,6 +43,9 @@ public class TConstructFluid extends BlockFluidClassic
|
||||
|
||||
if (overwriteFluidIcons)
|
||||
this.getFluid().setIcons(stillIcon, flowIcon);
|
||||
|
||||
if(this.getFluid().getBlock() != this && fluid != null)
|
||||
fluid.setIcons(stillIcon, flowIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,4 +62,7 @@ public class TConstructFluid extends BlockFluidClassic
|
||||
overwriteFluidIcons = false;
|
||||
}
|
||||
|
||||
public void setFluid(Fluid fluid) {
|
||||
this.fluid = fluid;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user