Browse Source

should fix lack of fluid movement for compressed fluids

parent
commit
dd30e8b6f8
Signed by: Gregorius Techneticies <gregoriustech@gmail.com> GPG Key ID: 1B693EA14F2FD70F

+ 13
- 0
.defaultconfigs/config/netherlicious/Worldgeneration_Configuration.cfg View File

@@ -0,0 +1,13 @@
1
+# Configuration file
2
+
3
+ore {
4
+    B:"Generate Nether Quartz"=false
5
+    B:"1 Generate Nether Quartz"=false
6
+    B:"Generate Nether Iron Ore"=false
7
+}
8
+
9
+terrain {
10
+    B:"Generate Gravel and Soulsand throughout the Nether. Otherwise only generate arround height 30"=true
11
+}
12
+
13
+

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

@@ -95,7 +95,7 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
95 95
 		FluidStack rFluid = FL.make(getFluid(), (WD.meta(aWorld, aX, aY, aZ) + 1) * mAmountPerQuanta);
96 96
 		if (aDoDrain) {
97 97
 			WD.set(aWorld, aX, aY, aZ, NB, 0, 3);
98
-			updateFluidBlocks(aWorld, aX, aY, aZ);
98
+			updateFluidBlocks(aWorld, aX, aY, aZ, T);
99 99
 		}
100 100
 		return rFluid;
101 101
 	}
@@ -112,15 +112,15 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
112 112
 				// Get rid of Flowing Water/Lava adjacent to my Fluids, because Forge is fucked up.
113 113
 				if (WD.meta(aWorld, aX, aY, aZ, tSide, F) != 0 && WD.set(aWorld, aX+OFFX[tSide], aY+OFFY[tSide], aZ+OFFZ[tSide], NB, 0, 2)) {
114 114
 					// The Water might have blocked a previous path.
115
-					updateFluidBlocks(aWorld, aX, aY, aZ);
115
+					updateFluidBlocks(aWorld, aX, aY, aZ, T);
116 116
 				}
117 117
 			}
118 118
 		}
119 119
 	}
120 120
 	
121
-	public void updateFluidBlocks(World aWorld, int aX, int aY, int aZ) {
122
-		for (int j = densityDir > 0 ? -1 : 0; j < (densityDir > 0 ? 1 : 2); j++) if (UT.Code.inside(0, aWorld.getHeight(), aY+j)) for (int i = -4; i < 5; i++) for (int k = -4; k < 5; k++) if (i != 0 || j != 0 || k != 0) {
123
-			if (aWorld.getBlock(aX+i, aY+j, aZ+k) == this && aWorld.getBlockMetadata(aX+i, aY+j, aZ+k) > (j == 0 ? Math.abs(i)+Math.abs(j) : 0)) {
121
+	public void updateFluidBlocks(World aWorld, int aX, int aY, int aZ, boolean aAll) {
122
+		for (int j = densityDir > 0 ? -1 : 0; j < (densityDir > 0 ? 1 : 2); j++) if (UT.Code.inside(0, aWorld.getHeight(), aY+j)) for (int i = -4; i <= 4; i++) for (int k = -4; k <= 4; k++) if (i != 0 || j != 0 || k != 0) {
123
+			if (aWorld.getBlock(aX+i, aY+j, aZ+k) == this && (aAll || aWorld.getBlockMetadata(aX+i, aY+j, aZ+k) > (j == 0 ? Math.abs(i)+Math.abs(j) : 0))) {
124 124
 				aWorld.scheduleBlockUpdate(aX+i, aY+j, aZ+k, this, tickRate);
125 125
 			}
126 126
 		}
@@ -153,7 +153,7 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
153 153
 		tRemainingQuanta = tryToFlowVerticallyInto(aWorld, aX, aY, aZ, tRemainingQuanta);
154 154
 		
155 155
 		if (tRemainingQuanta < 1) {
156
-			updateFluidBlocks(aWorld, aX, aY, aZ);
156
+			updateFluidBlocks(aWorld, aX, aY, aZ, F);
157 157
 			return;
158 158
 		}
159 159
 		
@@ -161,7 +161,7 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
161 161
 		if (tRemainingQuanta == 1) {
162 162
 			if (tChanged) {
163 163
 				set(aWorld, aX, aY, aZ, tRemainingQuanta-1, F);
164
-				updateFluidBlocks(aWorld, aX, aY, aZ);
164
+				updateFluidBlocks(aWorld, aX, aY, aZ, F);
165 165
 				return;
166 166
 			}
167 167
 			if (!WD.liquid(aWorld, aX, aY+densityDir, aZ)) {
@@ -172,8 +172,7 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
172 172
 					&& set                (aWorld, aX+OFFX[tSide], aY           , aZ+OFFZ[tSide], tRemainingQuanta-1, F)) {
173 173
 						aWorld.scheduleBlockUpdate(aX+OFFX[tSide], aY           , aZ+OFFZ[tSide], this, tickRate);
174 174
 						WD.set            (aWorld, aX            , aY           , aZ            , NB, 0, FLUID_UPDATE_FLAGS | 1);
175
-						updateFluidBlocks (aWorld, aX            , aY           , aZ            );
176
-						updateFluidBlocks (aWorld, aX+OFFX[tSide], aY           , aZ+OFFZ[tSide]);
175
+						updateFluidBlocks (aWorld, aX            , aY           , aZ            , T);
177 176
 						return;
178 177
 					}
179 178
 				}
@@ -201,7 +200,7 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
201 200
 		if (tCount == 1) {
202 201
 			if (tChanged) {
203 202
 				set(aWorld, aX, aY, aZ, tRemainingQuanta-1, F);
204
-				updateFluidBlocks(aWorld, aX, aY, aZ);
203
+				updateFluidBlocks(aWorld, aX, aY, aZ, F);
205 204
 			}
206 205
 			return;
207 206
 		}
@@ -291,6 +290,8 @@ public class BlockBaseFluid extends BlockFluidFinite implements IBlock, IItemGT,
291 290
 				set(aWorld, aX, tY, aZ, aAmount - 2, T);
292 291
 				// Since it is a Jump, we will give it a fast reaction time!
293 292
 				aWorld.scheduleBlockUpdate(aX, tY, aZ, this, 1);
293
+				// Update all Fluid Blocks around this, since they might have been very compressed before too.
294
+				updateFluidBlocks(aWorld, aX, aY, aZ, T);
294 295
 				// Leaving a minimal Block at the original location to make it more Fountain like.
295 296
 				return 1;
296 297
 			}

Loading…
Cancel
Save