mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-19 15:09:18 +00:00
minor performance improvement
This commit is contained in:
@@ -123,6 +123,16 @@ public class CommandObject implements DecreeExecutor {
|
||||
tile.toBukkitTry(world.getBlockAt(xx, yy, zz));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> void setData(int xx, int yy, int zz, T data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getData(int xx, int yy, int zz, Class<T> t) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Engine getEngine() {
|
||||
return null;
|
||||
|
||||
@@ -189,6 +189,16 @@ public class TreeSVC implements IrisService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> void setData(int xx, int yy, int zz, T data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getData(int xx, int yy, int zz, Class<T> t) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Engine getEngine() {
|
||||
return engine;
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.volmit.iris.engine.object.IObjectPlacer;
|
||||
import com.volmit.iris.engine.object.IrisObjectPlacement;
|
||||
import com.volmit.iris.engine.object.TileData;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import org.bukkit.block.TileState;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
public class HeightmapObjectPlacer implements IObjectPlacer {
|
||||
@@ -83,6 +82,16 @@ public class HeightmapObjectPlacer implements IObjectPlacer {
|
||||
oplacer.setTile(param1Int1, param1Int2, param1Int3, param1TileData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> void setData(int xx, int yy, int zz, T data) {
|
||||
oplacer.setData(xx, yy, zz, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getData(int xx, int yy, int zz, Class<T> t) {
|
||||
return oplacer.getData(xx, yy, zz, t);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Engine getEngine() {
|
||||
return null;
|
||||
|
||||
@@ -124,4 +124,13 @@ public class WorldObjectPlacer implements IObjectPlacer {
|
||||
public void setTile(int xx, int yy, int zz, TileData tile) {
|
||||
tile.toBukkitTry(world.getBlockAt(xx, yy + world.getMinHeight(), zz));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> void setData(int xx, int yy, int zz, T data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getData(int xx, int yy, int zz, Class<T> t) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,9 +154,9 @@ public class PlannedStructure {
|
||||
JigsawStructureContainer structure = JigsawStructureContainer.toContainer(getStructure());
|
||||
i.setRealPositions(xx, height, zz, placer);
|
||||
return v.place(xx, height, zz, placer, options, rng, (b, data) -> {
|
||||
e.set(b.getX(), b.getY(), b.getZ(), v.getLoadKey() + "@" + id);
|
||||
e.set(b.getX(), b.getY(), b.getZ(), structure);
|
||||
e.set(b.getX(), b.getY(), b.getZ(), piece);
|
||||
placer.setData(b.getX(), b.getY(), b.getZ(), v.getLoadKey() + "@" + id);
|
||||
placer.setData(b.getX(), b.getY(), b.getZ(), structure);
|
||||
placer.setData(b.getX(), b.getY(), b.getZ(), piece);
|
||||
}, null, getData().getEngine() != null ? getData() : eng.getData()) != -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ package com.volmit.iris.engine.object;
|
||||
|
||||
import com.volmit.iris.core.loader.IrisData;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import org.bukkit.block.TileState;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface IObjectPlacer {
|
||||
int getHighest(int x, int z, IrisData data);
|
||||
@@ -46,5 +46,9 @@ public interface IObjectPlacer {
|
||||
|
||||
void setTile(int xx, int yy, int zz, TileData tile);
|
||||
|
||||
<T> void setData(int xx, int yy, int zz, T data);
|
||||
|
||||
<T> @Nullable T getData(int xx, int yy, int zz, Class<T> t);
|
||||
|
||||
Engine getEngine();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user