mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-12-01 02:04:51 +00:00
Ceiling vine curtains
- A vine under a sturdy ceiling keeps its authored side faces - Vines below it hold those faces through the vine above - The vine-above check reads the facing before the material key
This commit is contained in:
1 parent
c2eb8b5f42
commit
067fffe066
3 files changed
+40
-4
No files matched your search
@@ -484,12 +484,13 @@ final class DecoratorCore {
|
||||
|
||||
private static boolean keepSupportedSides(MultipleFacing data, boolean vine, Hunk<NativeBlockState> hunk,
|
||||
int rX, int rZ, int x, int y, int z, EngineMantle mantle) {
|
||||
boolean ceiling = sturdy(BlockFace.UP, hunk, rX, rZ, x, y, z, mantle);
|
||||
boolean side = false;
|
||||
for (BlockFace f : Faces.SIDES) {
|
||||
if (!data.hasFace(f)) {
|
||||
continue;
|
||||
}
|
||||
if (sturdy(f, hunk, rX, rZ, x, y, z, mantle) || vine && vineAboveCarries(f, hunk, rX, rZ, x, y, z, mantle)) {
|
||||
if (sturdy(f, hunk, rX, rZ, x, y, z, mantle) || vine && (ceiling || vineAboveCarries(f, hunk, rX, rZ, x, y, z, mantle))) {
|
||||
side = true;
|
||||
} else {
|
||||
data.setFace(f, false);
|
||||
@@ -499,7 +500,7 @@ final class DecoratorCore {
|
||||
return false;
|
||||
}
|
||||
if (data.getAllowedFaces().contains(BlockFace.UP)) {
|
||||
data.setFace(BlockFace.UP, sturdy(BlockFace.UP, hunk, rX, rZ, x, y, z, mantle));
|
||||
data.setFace(BlockFace.UP, ceiling);
|
||||
}
|
||||
if (data.hasFace(BlockFace.DOWN) && !sturdy(BlockFace.DOWN, hunk, rX, rZ, x, y, z, mantle)) {
|
||||
data.setFace(BlockFace.DOWN, false);
|
||||
@@ -532,8 +533,8 @@ final class DecoratorCore {
|
||||
}
|
||||
|
||||
private static boolean carries(NativeBlockState state, BlockFace f) {
|
||||
return state != null && VINE.equals(IrisProceduralBlocks.materialKey(state))
|
||||
&& state.nativeHandle() instanceof MultipleFacing facing && facing.hasFace(f);
|
||||
return state != null && state.nativeHandle() instanceof MultipleFacing facing
|
||||
&& VINE.equals(IrisProceduralBlocks.materialKey(state)) && facing.hasFace(f);
|
||||
}
|
||||
|
||||
static boolean canGoOn(NativeBlockState decorator, NativeBlockState surface) {
|
||||
|
||||
Reference in new issue
Block a user