mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-01 07:25:51 +00:00
- Fixed Bisected blocks for IrisSeaFloorDecorator.java
- Fixed Deco collision with objects - Fixed Waterlogged blocks in IrisSeaFloorDecorator.java - Fixed/Improved allowed blocks for decorations - New Gradlew task for pixel I might have missed some parts but at least i shouldn't have made worse
This commit is contained in:
parent
637c4a2c91
commit
6a1ee51379
@ -45,6 +45,7 @@ registerCustomOutputTask('Vatuu', 'D://Minecraft/Servers/1.19.4/plugins')
|
||||
registerCustomOutputTask('CrazyDev22', 'C://Users/Julian/Desktop/server/plugins')
|
||||
registerCustomOutputTask('PixelFury', 'C://Users/repix/workplace/Iris/1.21.3 - Development-Public-v3/plugins')
|
||||
registerCustomOutputTask('PixelFuryDev', 'C://Users/repix/workplace/Iris/1.21 - Development-v3/plugins')
|
||||
registerCustomOutputTask('PixelFuryEngine', 'C://Users/repix/workplace/Iris/1.21.3 - Development-Engine-v3/plugins')
|
||||
// ========================== UNIX ==============================
|
||||
registerCustomOutputTaskUnix('CyberpwnLT', '/Users/danielmills/development/server/plugins')
|
||||
registerCustomOutputTaskUnix('PsychoLT', '/Users/brianfopiano/Developer/RemoteGit/Server/plugins')
|
||||
|
@ -18,14 +18,21 @@
|
||||
|
||||
package com.volmit.iris.engine.decorator;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.data.cache.Cache;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import com.volmit.iris.util.data.B;
|
||||
import com.volmit.iris.util.documentation.BlockCoordinates;
|
||||
import com.volmit.iris.util.hunk.Hunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public class IrisSeaFloorDecorator extends IrisEngineDecorator {
|
||||
public IrisSeaFloorDecorator(Engine engine) {
|
||||
@ -38,21 +45,53 @@ public class IrisSeaFloorDecorator extends IrisEngineDecorator {
|
||||
IrisDecorator decorator = getDecorator(biome, realX, realZ);
|
||||
|
||||
if (decorator != null) {
|
||||
var bdx = data.get(x, height - 1, z);
|
||||
if (!decorator.isStacking()) {
|
||||
var bd = decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData());
|
||||
if ((!canGoOn(bd, bdx)
|
||||
|| (bd instanceof Bisected
|
||||
? (data.get(x, height, z).isOccluding() || data.get(x, height + 1, z).isOccluding())
|
||||
: data.get(x, height, z).isOccluding()))
|
||||
&& !decorator.isForcePlace() && decorator.getForceBlock() == null)
|
||||
return;
|
||||
|
||||
if (!decorator.isForcePlace() && !decorator.getSlopeCondition().isDefault()
|
||||
&& !decorator.getSlopeCondition().isValid(getComplex().getSlopeStream().get(realX, realZ))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (bd instanceof Bisected) {
|
||||
bd = bd.clone();
|
||||
((Bisected) bd).setHalf(Bisected.Half.TOP);
|
||||
try {
|
||||
data.set(x, height + 1, z, bd);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
}
|
||||
bd = bd.clone();
|
||||
((Bisected) bd).setHalf(Bisected.Half.BOTTOM);
|
||||
}
|
||||
|
||||
if (height >= 0 || height < getEngine().getHeight()) {
|
||||
data.set(x, height, z, decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData()));
|
||||
data.set(x, height, z, bd);
|
||||
}
|
||||
} else {
|
||||
var bd = decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData());
|
||||
if (((!canGoOn(bd, bdx) || data.get(x, height, z).isOccluding()) && (!decorator.isForcePlace() && decorator.getForceBlock() == null)))
|
||||
return;
|
||||
|
||||
int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData());
|
||||
if (decorator.isScaleStack()) {
|
||||
int maxStack = max - height;
|
||||
stack = (int) Math.ceil((double) maxStack * ((double) stack / 100));
|
||||
} else stack = Math.min(stack, max - height);
|
||||
|
||||
for (int i = 1; i < stack; i++) {
|
||||
var block = data.get(x, height + i + 1, z);
|
||||
if ((block.isOccluding()) && (!decorator.isForcePlace() && decorator.getForceBlock() == null))
|
||||
return;
|
||||
}
|
||||
|
||||
if (stack == 1) {
|
||||
data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData()));
|
||||
return;
|
||||
@ -65,12 +104,15 @@ public class IrisSeaFloorDecorator extends IrisEngineDecorator {
|
||||
}
|
||||
|
||||
double threshold = ((double) i) / (stack - 1);
|
||||
data.set(x, h, z, threshold >= decorator.getTopThreshold() ?
|
||||
BlockData block = threshold >= decorator.getTopThreshold() ?
|
||||
decorator.getBlockDataForTop(biome, getRng(), realX, h, realZ, getData()) :
|
||||
decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData()));
|
||||
decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData());
|
||||
if (block instanceof Waterlogged wblock)
|
||||
wblock.setWaterlogged(true);
|
||||
|
||||
data.set(x, h, z, block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -61,6 +61,12 @@ public class IrisSurfaceDecorator extends IrisEngineDecorator {
|
||||
if (!decorator.isStacking()) {
|
||||
bd = decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData());
|
||||
|
||||
if (((bd instanceof Bisected
|
||||
? (data.get(x, height + 1, z).isOccluding() || data.get(x, height + 2, z).isOccluding())
|
||||
: data.get(x, height + 1, z).isOccluding()))
|
||||
&& !decorator.isForcePlace() && decorator.getForceBlock() == null)
|
||||
return;
|
||||
|
||||
if (!underwater) {
|
||||
if (!canGoOn(bd, bdx) && (!decorator.isForcePlace() && decorator.getForceBlock() == null)) {
|
||||
return;
|
||||
@ -111,6 +117,12 @@ public class IrisSurfaceDecorator extends IrisEngineDecorator {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 1; i < stack; i++) {
|
||||
var block = data.get(x, height + i + 1, z);
|
||||
if ((block.isOccluding()) && (!decorator.isForcePlace() && decorator.getForceBlock() == null))
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < stack; i++) {
|
||||
int h = height + i;
|
||||
double threshold = ((double) i) / (stack - 1);
|
||||
|
@ -67,6 +67,7 @@ public class B {
|
||||
CORNFLOWER,
|
||||
SWEET_BERRY_BUSH,
|
||||
CRIMSON_ROOTS,
|
||||
SUNFLOWER,
|
||||
WARPED_ROOTS,
|
||||
NETHER_SPROUTS,
|
||||
ALLIUM,
|
||||
|
Loading…
x
Reference in New Issue
Block a user