mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Mantle deletes
This commit is contained in:
parent
51b0693c99
commit
4a2f42437f
@ -229,6 +229,13 @@ public class IrisToolbelt {
|
|||||||
return e.getEngine().getMantle().getMantle().get(x, y - world.getMinHeight(), z, of);
|
return e.getEngine().getMantle().getMantle().get(x, y - world.getMinHeight(), z, of);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static <T> void deleteMantleData(World world, int x, int y, int z, Class<T> of)
|
||||||
|
{
|
||||||
|
PlatformChunkGenerator e = access(world);
|
||||||
|
if(e == null) {return;}
|
||||||
|
e.getEngine().getMantle().getMantle().remove(x, y - world.getMinHeight(), z, of);
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////// REFLECTIVE METHODS //////////////////////////
|
/////////////////// REFLECTIVE METHODS //////////////////////////
|
||||||
// Copy this stuff to your project, it's safe to use with a
|
// Copy this stuff to your project, it's safe to use with a
|
||||||
// bukkit api only.
|
// bukkit api only.
|
||||||
@ -244,6 +251,13 @@ public class IrisToolbelt {
|
|||||||
return getMantleIdentity(world, x, y, z) != -1;
|
return getMantleIdentity(world, x, y, z) != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void deleteMantleBlock(World world, int x, int y, int z) {
|
||||||
|
try {
|
||||||
|
Method m = Class.forName("com.volmit.iris.core.tools.IrisToolbelt").getDeclaredMethod("deleteMantleData", World.class, int.class, int.class, int.class, Class.class);
|
||||||
|
m.invoke(null, world, x, y, z, BlockData.class);
|
||||||
|
} catch(Throwable ignored) {}
|
||||||
|
}
|
||||||
|
|
||||||
public static BlockData getMantleBlock(World world, int x, int y, int z) {
|
public static BlockData getMantleBlock(World world, int x, int y, int z) {
|
||||||
try {
|
try {
|
||||||
Method m = Class.forName("com.volmit.iris.core.tools.IrisToolbelt").getDeclaredMethod("getMantleData", World.class, int.class, int.class, int.class, Class.class);
|
Method m = Class.forName("com.volmit.iris.core.tools.IrisToolbelt").getDeclaredMethod("getMantleData", World.class, int.class, int.class, int.class, Class.class);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user