mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-08-27 12:41:43 +00:00
adding mroe of this
This commit is contained in:
@@ -113,12 +113,12 @@ public final class StubPlatform implements IrisPlatform {
|
||||
|
||||
@Override
|
||||
public boolean isAir() {
|
||||
return key.endsWith("air");
|
||||
return blockKey().endsWith("air");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSolid() {
|
||||
return !isAir();
|
||||
return !isAir() && !isFluid();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -133,12 +133,16 @@ public final class StubPlatform implements IrisPlatform {
|
||||
|
||||
@Override
|
||||
public boolean isFluid() {
|
||||
return false;
|
||||
String blockKey = blockKey();
|
||||
return blockKey.equals("minecraft:water")
|
||||
|| blockKey.equals("minecraft:lava")
|
||||
|| blockKey.equals("minecraft:bubble_column");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWater() {
|
||||
return false;
|
||||
String blockKey = blockKey();
|
||||
return blockKey.equals("minecraft:water") || blockKey.equals("minecraft:bubble_column");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -163,11 +167,7 @@ public final class StubPlatform implements IrisPlatform {
|
||||
|
||||
@Override
|
||||
public boolean isTreeBlock() {
|
||||
String blockKey = key;
|
||||
int properties = blockKey.indexOf('[');
|
||||
if (properties >= 0) {
|
||||
blockKey = blockKey.substring(0, properties);
|
||||
}
|
||||
String blockKey = blockKey();
|
||||
return blockKey.endsWith("_log")
|
||||
|| blockKey.endsWith("_wood")
|
||||
|| blockKey.endsWith("_stem")
|
||||
@@ -236,6 +236,11 @@ public final class StubPlatform implements IrisPlatform {
|
||||
public Object nativeHandle() {
|
||||
return key;
|
||||
}
|
||||
|
||||
private String blockKey() {
|
||||
int properties = key.indexOf('[');
|
||||
return properties >= 0 ? key.substring(0, properties) : key;
|
||||
}
|
||||
}
|
||||
|
||||
private static PlatformBlockState rotateState(IrisObjectRotation rotation, PlatformBlockState state,
|
||||
|
||||
Reference in New Issue
Block a user