Browse Source

Attempt at fixing rendering for Ocean again

Gregorius Techneticies 2 months ago
parent
commit
418a0916d2
Signed by: Gregorius Techneticies <gregoriustech@gmail.com> GPG Key ID: 1B693EA14F2FD70F

+ 2
- 1
src/main/java/gregapi/block/fluid/BlockBaseFluid.java View File

@@ -305,7 +305,7 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
305 305
 	@Override public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) {return F;}
306 306
 	@Override public int getRenderType() {return RendererBlockFluid.RENDER_ID;}
307 307
 	
308
-
308
+	
309 309
 	public boolean mLighterThanWater = F;
310 310
 	public BlockBaseFluid setLighterThanWater() {
311 311
 		mLighterThanWater = T;
@@ -318,6 +318,7 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
318 318
 		return this;
319 319
 	}
320 320
 	
321
+	
321 322
 	/** This Function has been named wrong. It should be onEntityOverlapWithBlock */
322 323
 	@Override
323 324
 	public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) {

+ 1
- 1
src/main/java/gregtech/blocks/fluids/BlockOcean.java View File

@@ -154,7 +154,7 @@ public class BlockOcean extends BlockWaterlike {
154 154
 		return;
155 155
 	}
156 156
 	
157
-	@Override public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) {if (aWorld.getBlock(aX, aY-3, aZ) != this || aWorld.getBlockMetadata(aX, aY, aZ) > 0) return LIGHT_OPACITY_NONE; Block tBlock = aWorld.getBlock(aX, aY+1, aZ); return !tBlock.getMaterial().isLiquid() && tBlock.getLightOpacity(aWorld, aX, aY+1, aZ) <= 0 && !WD.visOpq(tBlock) ? 16 : LIGHT_OPACITY_NONE;}
157
+	@Override public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) {return aWorld.getBlockMetadata(aX, aY, aZ) == 0 && WD.air(aWorld.getBlock(aX, aY+1, aZ)) && WD.air(aWorld.getBlock(aX, aY+2, aZ)) ? 16 : LIGHT_OPACITY_NONE;}
158 158
 	@Override public IIcon getIcon(int aSide, int aMeta) {return Blocks.water.getIcon(aSide, aMeta);}
159 159
 	@Override @SideOnly(Side.CLIENT) public int getRenderColor(int aMeta) {return 0x00c0c0c0;}
160 160
 	@Override @SideOnly(Side.CLIENT) public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) {return 0x00c0c0c0;}

+ 1
- 1
src/main/java/gregtech/blocks/fluids/BlockWaterlike.java View File

@@ -190,7 +190,7 @@ public abstract class BlockWaterlike extends BlockFluidClassic implements IBlock
190 190
 	@Override public final String getUnlocalizedName() {return FL.name(mFluid, F);}
191 191
 	@Override public String getLocalizedName() {return FL.name(mFluid, T);}
192 192
 	@Override public void registerBlockIcons(IIconRegister aIconRegister) {/**/}
193
-	@Override public int getLightOpacity() {return 16;}
193
+	@Override public int getLightOpacity() {return LIGHT_OPACITY_WATER;}
194 194
 	@Override public IIcon getIcon(int aSide, int aMeta) {return Blocks.water.getIcon(aSide, aMeta);}
195 195
 	@Override public boolean getTickRandomly() {return F;}
196 196
 	@Override public boolean canDisplace(IBlockAccess aWorld, int aX, int aY, int aZ) {return !aWorld.getBlock(aX, aY, aZ).getMaterial().isLiquid() && super.canDisplace(aWorld, aX, aY, aZ);}

Loading…
Cancel
Save