Add getWrappedMcObject_UNSAFE() to Biome and BlockState Wrappers

This commit is contained in:
James Seibel
2022-11-13 21:50:10 -06:00
parent f75c9ec06a
commit 4644121fe3
3 changed files with 20 additions and 11 deletions
@@ -43,7 +43,7 @@ import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.Biomes;
//This class wraps the minecraft BlockPos.Mutable (and BlockPos) class
/** This class wraps the minecraft BlockPos.Mutable (and BlockPos) class */
public class BiomeWrapper implements IBiomeWrapper
{
#if PRE_MC_1_18_2
@@ -106,4 +106,9 @@ public class BiomeWrapper implements IBiomeWrapper
throw new IOException("Failed to deserialize biome wrapper", e);
}
}
@Override
public Object getWrappedMcObject_UNSAFE() { return this.biome; }
}
@@ -12,7 +12,8 @@ import java.util.HashMap;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
public class BlockStateWrapper implements IBlockStateWrapper {
public class BlockStateWrapper implements IBlockStateWrapper
{
private static final Logger LOGGER = DhLoggerBuilder.getLogger();
public static final BlockStateWrapper AIR = new BlockStateWrapper(null);
@@ -65,12 +66,15 @@ public class BlockStateWrapper implements IBlockStateWrapper {
public int hashCode() {
return Objects.hash(blockState);
}
@Override
public Object getWrappedMcObject_UNSAFE() { return this.blockState; }
}