Browse Source

Things that might work to fix this

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

+ 10
- 6
src/main/java/gregapi/block/fluid/BlockBaseFluid.java View File

@@ -289,22 +289,26 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
289 289
 	@Override public final String getUnlocalizedName() {return mFluid.getUnlocalizedName();}
290 290
 	@Override public String getLocalizedName() {return LH.get(mFluid.getUnlocalizedName());}
291 291
 	@Override public void registerBlockIcons(IIconRegister aIconRegister) {/**/}
292
-	@Override public int getLightOpacity() {return LIGHT_OPACITY_WATER;}
293 292
 	@Override public IIcon getIcon(int aSide, int aMeta) {return SIDES_VERTICAL[aSide]?mFluid.getStillIcon():mFluid.getFlowingIcon();}
294 293
 	@Override @SideOnly(Side.CLIENT) public int getRenderColor(int aMeta) {return mFluid.getColor();}
295 294
 	@Override @SideOnly(Side.CLIENT) public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) {return mFluid.getColor();}
296
-	@Override public boolean isAir(IBlockAccess aWorld, int aX, int aY, int aZ) {return F;}
297
-	@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);}
298
-	@Override public boolean displaceIfPossible(World aWorld, int aX, int aY, int aZ) {return !aWorld.getBlock(aX, aY, aZ).getMaterial().isLiquid() && super.displaceIfPossible(aWorld, aX, aY, aZ);}
295
+	@Override public int getRenderType() {return RendererBlockFluid.RENDER_ID;}
296
+	@Override public int getRenderBlockPass() {return 1;}
297
+	@Override public int getLightOpacity() {return LIGHT_OPACITY_WATER;}
298
+	
299 299
 	@Override public int getFireSpreadSpeed(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aDirection) {return mFlammability;}
300 300
 	@Override public int getFlammability(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aDirection) {return mFlammability;}
301
-	@Override public boolean canCollideCheck(int meta, boolean fullHit) {return fullHit && meta >= 7;}
301
+	@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);}
302
+	@Override public boolean displaceIfPossible(World aWorld, int aX, int aY, int aZ) {return !aWorld.getBlock(aX, aY, aZ).getMaterial().isLiquid() && super.displaceIfPossible(aWorld, aX, aY, aZ);}
303
+	@Override public boolean canCollideCheck(int aMeta, boolean aFullHit) {return aFullHit && aMeta >= 7;}
304
+	@Override public boolean getBlocksMovement(IBlockAccess aWorld, int aX, int aY, int aZ) {return mActLikeWeb || !mEffects.isEmpty();}
302 305
 	@Override public boolean isNormalCube() {return F;}
303 306
 	@Override public boolean isOpaqueCube() {return F;}
304 307
 	@Override public boolean func_149730_j() {return F;}
308
+	@Override public boolean getTickRandomly() {return F;}
305 309
 	@Override public boolean renderAsNormalBlock() {return F;}
310
+	@Override public boolean isAir(IBlockAccess aWorld, int aX, int aY, int aZ) {return F;}
306 311
 	@Override public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) {return F;}
307
-	@Override public int getRenderType() {return RendererBlockFluid.RENDER_ID;}
308 312
 	
309 313
 	
310 314
 	public boolean mLighterThanWater = F;

+ 1
- 15
src/main/java/gregapi/render/RendererBlockFluid.java View File

@@ -23,7 +23,6 @@ import static gregapi.data.CS.*;
23 23
 
24 24
 import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
25 25
 import gregapi.data.FL;
26
-import gregapi.old.Textures;
27 26
 import gregapi.util.UT;
28 27
 import net.minecraft.block.Block;
29 28
 import net.minecraft.client.renderer.RenderBlocks;
@@ -95,20 +94,7 @@ public class RendererBlockFluid implements ISimpleBlockRenderingHandler {
95 94
 			aFluid.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5)
96 95
 		};
97 96
 		
98
-		if (!renderTop && !renderBottom && !renderSides[0] && !renderSides[1] && !renderSides[2] && !renderSides[3]) {
99
-			IIcon tIcon = Textures.BlockIcons.VOID.getIcon(0);
100
-			double
101
-			u2 = tIcon.getInterpolatedU(0), v2 = tIcon.getInterpolatedV(0),
102
-			u1 = u2, v1 = tIcon.getInterpolatedV(16),
103
-			u4 = tIcon.getInterpolatedU(16), v4 = v1,
104
-			u3 = u4, v3 = v2;
105
-			
106
-			tTesselator.addVertexWithUV(0, -128, 0, u3, v3);
107
-			tTesselator.addVertexWithUV(0, -128, 0, u4, v4);
108
-			tTesselator.addVertexWithUV(0, -128, 0, u1, v1);
109
-			tTesselator.addVertexWithUV(0, -128, 0, u2, v2);
110
-			return T;
111
-		}
97
+		if (!renderTop && !renderBottom && !renderSides[0] && !renderSides[1] && !renderSides[2] && !renderSides[3]) return F;
112 98
 		
113 99
 		double heightNW, heightSW, heightSE, heightNE;
114 100
 		float flow11 = getFluidHeightForRender(aWorld, aX, aY, aZ, aFluid, aFluid);

+ 2
- 2
src/main/java/gregapi/tileentity/connectors/MultiTileEntityPipeItem.java View File

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2019 Gregorius Techneticies
2
+ * Copyright (c) 2021 GregTech-6 Team
3 3
  *
4 4
  * This file is part of GregTech.
5 5
  *
@@ -268,7 +268,7 @@ public class MultiTileEntityPipeItem extends TileEntityBase10ConnectorRendered i
268 268
 	@Override public boolean canExtractItem2(int aSlot, ItemStack aStack, byte aSide) {return SIDES_INVALID[aSide] || connected(aSide);}
269 269
 	@Override public ItemStack[] getDefaultInventory(NBTTagCompound aNBT) {ItemStack[] rStack = super.getDefaultInventory(aNBT); ACCESSIBLE_SLOTS = new int[rStack.length]; for (int i = 0; i < ACCESSIBLE_SLOTS.length; i++) ACCESSIBLE_SLOTS[i] = i; return rStack;}
270 270
 	
271
-	@Override public boolean canEmitItemsTo                 (byte aSide, Object aSender) {return (aSender != this || aSide != mLastReceivedFrom) && connected(aSide);}
271
+	@Override public boolean canEmitItemsTo                 (byte aSide, Object aSender) {return (aSender != this || aSide != mLastReceivedFrom) && connected(aSide) && !getAirAtSide(aSide);}
272 272
 	@Override public boolean canAcceptItemsFrom             (byte aSide, Object aSender) {return connected(aSide);}
273 273
 	
274 274
 	@Override public boolean canConnect                     (byte aSide, DelegatorTileEntity<TileEntity> aDelegator) {return aDelegator.mTileEntity instanceof ISidedInventory ? aDelegator.mTileEntity instanceof ITileEntityCanDelegate || ((ISidedInventory)aDelegator.mTileEntity).getAccessibleSlotsFromSide(aDelegator.mSideOfTileEntity).length > 0 : ST.canConnect(aDelegator);}

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

@@ -69,7 +69,6 @@ public abstract class BlockWaterlike extends BlockFluidClassic implements IBlock
69 69
 		LH.add(getUnlocalizedName()+".name", getLocalizedName());
70 70
 		LH.add(getUnlocalizedName(), getLocalizedName());
71 71
 		setFluidStack(FL.make(aFluid, 1000));
72
-		setTickRandomly(F);
73 72
 		ST.hide(this);
74 73
 	}
75 74
 	
@@ -191,17 +190,24 @@ public abstract class BlockWaterlike extends BlockFluidClassic implements IBlock
191 190
 	@Override public final String getUnlocalizedName() {return FL.name(mFluid, F);}
192 191
 	@Override public String getLocalizedName() {return FL.name(mFluid, T);}
193 192
 	@Override public void registerBlockIcons(IIconRegister aIconRegister) {/**/}
194
-	@Override public int getLightOpacity() {return LIGHT_OPACITY_WATER;}
195 193
 	@Override public IIcon getIcon(int aSide, int aMeta) {return Blocks.water.getIcon(aSide, aMeta);}
196
-	@Override public boolean getTickRandomly() {return F;}
194
+	@Override public int getRenderType() {return RendererBlockFluid.RENDER_ID;}
195
+	@Override public int getRenderBlockPass() {return 1;}
196
+	@Override public int getLightOpacity() {return LIGHT_OPACITY_WATER;}
197
+	
198
+	@Override public int getFireSpreadSpeed(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aDirection) {return 0;}
199
+	@Override public int getFlammability(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aDirection) {return 0;}
197 200
 	@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);}
198 201
 	@Override public boolean displaceIfPossible(World aWorld, int aX, int aY, int aZ) {return !aWorld.getBlock(aX, aY, aZ).getMaterial().isLiquid() && super.displaceIfPossible(aWorld, aX, aY, aZ);}
202
+	@Override public boolean canCollideCheck(int aMeta, boolean aFullHit) {return aFullHit && aMeta == 0;}
203
+	@Override public boolean getBlocksMovement(IBlockAccess aWorld, int aX, int aY, int aZ) {return !mEffects.isEmpty();}
199 204
 	@Override public boolean isNormalCube() {return F;}
200 205
 	@Override public boolean isOpaqueCube() {return F;}
201 206
 	@Override public boolean func_149730_j() {return F;}
207
+	@Override public boolean getTickRandomly() {return F;}
202 208
 	@Override public boolean renderAsNormalBlock() {return F;}
209
+	@Override public boolean isAir(IBlockAccess aWorld, int aX, int aY, int aZ) {return F;}
203 210
 	@Override public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) {return F;}
204
-	@Override public int getRenderType() {return RendererBlockFluid.RENDER_ID;}
205 211
 	
206 212
 	public BlockWaterlike addEffect(int aEffectID, int aEffectDuration, int aEffectLevel) {
207 213
 		mEffects.add(new int[] {aEffectID, aEffectDuration, aEffectLevel});

Loading…
Cancel
Save