mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 14:50:56 +00:00
fix forge mixin issues
This commit is contained in:
@@ -288,7 +288,7 @@ public class TerraForgePlugin implements TerraPlugin {
|
|||||||
public TerraWorld getWorld(World world) {
|
public TerraWorld getWorld(World world) {
|
||||||
return worldMap.computeIfAbsent(world.getSeed(), w -> {
|
return worldMap.computeIfAbsent(world.getSeed(), w -> {
|
||||||
logger.info("Loading world " + 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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -39,7 +39,7 @@ public abstract class ChunkRegionMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Block terra$getBlock(int x, int y, int z) {
|
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);
|
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) {
|
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() {
|
public Object terra$getHandle() {
|
||||||
|
|||||||
Reference in New Issue
Block a user