Fix bad reflection
This commit is contained in:
parent
325e73d059
commit
d751a15c6a
@ -1511,11 +1511,8 @@ public class ReflectionManager {
|
|||||||
Object iBlockData = idMethod.invoke(null, id);
|
Object iBlockData = idMethod.invoke(null, id);
|
||||||
Class iBlockClass = getNmsClass("IBlockData");
|
Class iBlockClass = getNmsClass("IBlockData");
|
||||||
|
|
||||||
Method getBlock = getNmsMethod(iBlockClass, "getBlock");
|
|
||||||
Object block = getBlock.invoke(iBlockData);
|
|
||||||
|
|
||||||
return (BlockData) getCraftMethod("block.data.type.CraftBlockData", "fromData", iBlockClass)
|
return (BlockData) getCraftMethod("block.data.type.CraftBlockData", "fromData", iBlockClass)
|
||||||
.invoke(null, block);
|
.invoke(null, iBlockData);
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user