mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-19 06:40:12 +00:00
fix world coordinate issues on Fabric
This commit is contained in:
@@ -44,7 +44,7 @@ public class BukkitChunkGenerator implements com.dfsek.terra.api.world.generator
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull BlockData getBlockData(int x, int y, int z) {
|
||||
public @NotNull BlockData getBlock(int x, int y, int z) {
|
||||
return BukkitBlockData.newInstance(delegate.getBlockData(x, y, z));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class CommonListener implements Listener {
|
||||
block.setType(Material.AIR);
|
||||
Tree tree = c.getRegistry(Tree.class).get(TREE_TYPE_STRING_TRANSFORMER.translate(e.getSpecies()));
|
||||
org.bukkit.Location location = e.getLocation();
|
||||
if(!tree.plant(new LocationImpl(bukkit, location.getX(), location.getY(), location.getZ()), new FastRandom()))
|
||||
if(!tree.plant(new LocationImpl(bukkit, location.getX(), location.getY(), location.getZ()), , new FastRandom()))
|
||||
block.setBlockData(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class BukkitChunk implements Chunk {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull BlockData getBlockData(int x, int y, int z) {
|
||||
public @NotNull BlockData getBlock(int x, int y, int z) {
|
||||
return getBlock(x, y, z).getBlockData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,9 @@ import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.handle.WorldHandle;
|
||||
import com.dfsek.terra.api.profiler.ProfileFrame;
|
||||
import com.dfsek.terra.api.util.collections.MaterialSet;
|
||||
import com.dfsek.terra.api.vector.Location;
|
||||
import com.dfsek.terra.api.vector.Vector3;
|
||||
import com.dfsek.terra.api.world.Tree;
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import org.bukkit.TreeType;
|
||||
|
||||
import java.util.Locale;
|
||||
@@ -43,7 +44,7 @@ public class BukkitTree implements Tree {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("try")
|
||||
public boolean plant(Location l, Random r) {
|
||||
public boolean plant(Vector3 l, World world, Random r) {
|
||||
try(ProfileFrame ignore = main.getProfiler().profile("bukkit_tree:" + delegate.toString().toLowerCase(Locale.ROOT))) {
|
||||
return ((BukkitWorld) l.getWorld()).getHandle().generateTree(BukkitAdapter.adapt(l), delegate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user