implement BlockState with mixin on Fabric

This commit is contained in:
dfsek
2021-12-21 13:09:40 -07:00
parent 1a1016bdf8
commit 5dbc2c2895
25 changed files with 204 additions and 253 deletions

View File

@@ -46,17 +46,17 @@ public class BukkitBlockState implements BlockState {
}
@Override
public <T> boolean has(Property<T> property) {
public <T extends Comparable<T>> boolean has(Property<T> property) {
return false;
}
@Override
public <T> T get(Property<T> property) {
public <T extends Comparable<T>> T get(Property<T> property) {
return null;
}
@Override
public <T> BlockState set(Property<T> property, T value) {
public <T extends Comparable<T>> BlockState set(Property<T> property, T value) {
return null;
}
@@ -66,23 +66,12 @@ public class BukkitBlockState implements BlockState {
}
@Override
public String getAsString() {
return delegate.getAsString(false);
public String getAsString(boolean properties) {
return delegate.getAsString(!properties);
}
@Override
public boolean isAir() {
return delegate.getMaterial().isAir();
}
@Override
public BukkitBlockState clone() {
try {
BukkitBlockState n = (BukkitBlockState) super.clone();
n.delegate = delegate.clone();
return n;
} catch(CloneNotSupportedException e) {
throw new Error(e);
}
}
}