fix forge mixin issues

This commit is contained in:
dfsek
2021-05-04 21:37:36 -07:00
parent 8f47c84c8e
commit df4da810ec
2 changed files with 3 additions and 3 deletions

View File

@@ -288,7 +288,7 @@ public class TerraForgePlugin implements TerraPlugin {
public TerraWorld getWorld(World world) {
return worldMap.computeIfAbsent(world.getSeed(), w -> {
logger.info("Loading world " + w);
return new TerraWorld(world, ((ForgeChunkGeneratorWrapper) (world.getGenerator()).getHandle()).getPack(), this);
return new TerraWorld(world, ((ForgeChunkGeneratorWrapper) world.getGenerator()).getPack(), this);
});
}

View File

@@ -39,7 +39,7 @@ public abstract class ChunkRegionMixin {
}
public Block terra$getBlock(int x, int y, int z) {
BlockPos pos = new BlockPos(x + (x << 4), y, z + (z << 4));
BlockPos pos = new BlockPos(x + (this.x << 4), y, z + (this.z << 4));
return new ForgeBlock(pos, (WorldGenRegion) (Object) this);
}
@@ -48,7 +48,7 @@ public abstract class ChunkRegionMixin {
}
public void terra$setBlock(int x, int y, int z, @NotNull BlockData blockData) {
((WorldGenRegion) (Object) this).setBlock(new BlockPos(x + (x << 4), y, z + (z << 4)), ((ForgeBlockData) blockData).getHandle(), 0);
((WorldGenRegion) (Object) this).setBlock(new BlockPos(x + (this.x << 4), y, z + (this.z << 4)), ((ForgeBlockData) blockData).getHandle(), 0);
}
public Object terra$getHandle() {