mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-27 15:33:05 +00:00
build: compile directly for Java 8
Keep modern java out of that for now, it make build script too complicated as long as scala still here to force J8 path
This commit is contained in:
1 parent
d3f1b561a3
commit
12eb146d02
14 files changed
+376
-330
No files matched your search
@@ -75,7 +75,8 @@ final class HollowMicroblockClientLogic {
|
||||
int slot = part.getSlot();
|
||||
int internalMask = 0;
|
||||
switch (slot) {
|
||||
case 0, 1 -> {
|
||||
case 0:
|
||||
case 1:
|
||||
if (face) internalMask = 0x3c;
|
||||
f.apply(pos, material, pass, new Cuboid6(d1, y1, d2, d2, y2, z2), 0x3b | internalMask);
|
||||
f.apply(pos, material, pass, new Cuboid6(d1, y1, z1, d2, y2, d1), 0x37 | internalMask);
|
||||
@@ -83,8 +84,9 @@ final class HollowMicroblockClientLogic {
|
||||
f.apply(pos, material, pass, new Cuboid6(x1, y1, d1, d1, y2, d2), sideMask & 0x13 | 0xc | internalMask);
|
||||
f.apply(pos, material, pass, new Cuboid6(x1, y1, d2, x2, y2, z2), sideMask & 0x3b | 4 | internalMask);
|
||||
f.apply(pos, material, pass, new Cuboid6(x1, y1, z1, x2, y2, d1), sideMask & 0x37 | 8 | internalMask);
|
||||
}
|
||||
case 2, 3 -> {
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
if (face) internalMask = 0x33;
|
||||
f.apply(pos, material, pass, new Cuboid6(d2, d1, z1, x2, d2, z2), 0x2f | internalMask);
|
||||
f.apply(pos, material, pass, new Cuboid6(x1, d1, z1, d1, d2, z2), 0x1f | internalMask);
|
||||
@@ -102,8 +104,9 @@ final class HollowMicroblockClientLogic {
|
||||
pass,
|
||||
new Cuboid6(x1, y1, z1, d1, y2, z2),
|
||||
sideMask & 0x1f | 0x20 | internalMask);
|
||||
}
|
||||
case 4, 5 -> {
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
if (face) internalMask = 0xf;
|
||||
f.apply(pos, material, pass, new Cuboid6(x1, d2, d1, x2, y2, d2), 0x3e | internalMask);
|
||||
f.apply(pos, material, pass, new Cuboid6(x1, y1, d1, x2, d1, d2), 0x3d | internalMask);
|
||||
@@ -111,8 +114,9 @@ final class HollowMicroblockClientLogic {
|
||||
f.apply(pos, material, pass, new Cuboid6(x1, d1, z1, x2, d2, d1), sideMask & 0x34 | 3 | internalMask);
|
||||
f.apply(pos, material, pass, new Cuboid6(x1, d2, z1, x2, y2, z2), sideMask & 0x3e | 1 | internalMask);
|
||||
f.apply(pos, material, pass, new Cuboid6(x1, y1, z1, x2, d1, z2), sideMask & 0x3d | 2 | internalMask);
|
||||
}
|
||||
default -> throw new MatchError(slot);
|
||||
break;
|
||||
default:
|
||||
throw new MatchError(slot);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ final class HollowMicroblockTraitLogic {
|
||||
}
|
||||
// The second virtual lookup is observable when a part overrides tile().
|
||||
TMultiPart center = ((TMultiPart) part).tile().partMap(6);
|
||||
if (center instanceof ISidedHollowConnect connection) {
|
||||
return connection.getHollowSize(part.getSlot());
|
||||
if (center instanceof ISidedHollowConnect) {
|
||||
return ((ISidedHollowConnect) center).getHollowSize(part.getSlot());
|
||||
}
|
||||
return 8;
|
||||
}
|
||||
@@ -60,15 +60,26 @@ final class HollowMicroblockTraitLogic {
|
||||
double z1 = c.min.z;
|
||||
double z2 = c.max.z;
|
||||
int slot = part.getSlot();
|
||||
Cuboid6[] boxes = switch (slot) {
|
||||
case 0, 1 -> new Cuboid6[] { new Cuboid6(d2, y1, d1, x2, y2, d2), new Cuboid6(x1, y1, d1, d1, y2, d2),
|
||||
new Cuboid6(x1, y1, d2, x2, y2, z2), new Cuboid6(x1, y1, z1, x2, y2, d1) };
|
||||
case 2, 3 -> new Cuboid6[] { new Cuboid6(d1, d2, z1, d2, y2, z2), new Cuboid6(d1, y1, z1, d2, d1, z2),
|
||||
new Cuboid6(d2, y1, z1, x2, y2, z2), new Cuboid6(x1, y1, z1, d1, y2, z2) };
|
||||
case 4, 5 -> new Cuboid6[] { new Cuboid6(x1, d1, d2, x2, d2, z2), new Cuboid6(x1, d1, z1, x2, d2, d1),
|
||||
new Cuboid6(x1, d2, z1, x2, y2, z2), new Cuboid6(x1, y1, z1, x2, d1, z2) };
|
||||
default -> throw new MatchError(slot);
|
||||
};
|
||||
Cuboid6[] boxes;
|
||||
switch (slot) {
|
||||
case 0:
|
||||
case 1:
|
||||
boxes = new Cuboid6[] { new Cuboid6(d2, y1, d1, x2, y2, d2), new Cuboid6(x1, y1, d1, d1, y2, d2),
|
||||
new Cuboid6(x1, y1, d2, x2, y2, z2), new Cuboid6(x1, y1, z1, x2, y2, d1) };
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
boxes = new Cuboid6[] { new Cuboid6(d1, d2, z1, d2, y2, z2), new Cuboid6(d1, y1, z1, d2, d1, z2),
|
||||
new Cuboid6(d2, y1, z1, x2, y2, z2), new Cuboid6(x1, y1, z1, d1, y2, z2) };
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
boxes = new Cuboid6[] { new Cuboid6(x1, d1, d2, x2, d2, z2), new Cuboid6(x1, d1, z1, x2, d2, d1),
|
||||
new Cuboid6(x1, d2, z1, x2, y2, z2), new Cuboid6(x1, y1, z1, x2, d1, z2) };
|
||||
break;
|
||||
default:
|
||||
throw new MatchError(slot);
|
||||
}
|
||||
return JavaConversions.seqAsJavaList(sequence(boxes));
|
||||
}
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ final class PostMicroblockClientLogic {
|
||||
|
||||
@Override
|
||||
public BoxedUnit apply(TMultiPart other) {
|
||||
if (other instanceof PostMicroblock post && !other.equals(part)) {
|
||||
part.shrinkPost(post);
|
||||
if (other instanceof PostMicroblock && !other.equals(part)) {
|
||||
part.shrinkPost((PostMicroblock) other);
|
||||
}
|
||||
return BoxedUnit.UNIT;
|
||||
}
|
||||
|
||||
@@ -9,9 +9,10 @@ final class TMicroOcclusionLogic {
|
||||
private TMicroOcclusionLogic() {}
|
||||
|
||||
static boolean occlusionTest(TMicroOcclusion part, TMultiPart next) {
|
||||
if (!(next instanceof TMicroOcclusion other)) {
|
||||
if (!(next instanceof TMicroOcclusion)) {
|
||||
return true;
|
||||
}
|
||||
TMicroOcclusion other = (TMicroOcclusion) next;
|
||||
int shape1 = MicroOcclusion$.MODULE$.shapePriority(part.getSlot());
|
||||
int shape2 = MicroOcclusion$.MODULE$.shapePriority(other.getSlot());
|
||||
if (other.getSize() + part.getSize() > 8) {
|
||||
|
||||
Reference in new issue
Block a user