Started by
BissNik
on
Topic category: Help with Minecraft modding (Java Edition)
Hello Modders!
I may need some Help, I am trying to store a Command from a Commandblock underneath me. I am modding on Minecraft Version 1.16.5 with MCreator 2021.1. The <Get text NBT tag "Command" if it has tileentity>-Block does not work however, and I tried out many different ways for over 2 months now.
return (new Object() {
public String getValue(IWorld world, BlockPos pos, String tag) {
TileEntity tileEntity = world.getTileEntity(pos);
if (tileEntity != null)
return tileEntity.getTileData().getString(tag);
return "";
}
}.getValue(world, new BlockPos((int) (Math.floor(x)), (int) ((Math.floor(y)) - 1), (int) (Math.floor(z))), "Command"));
I would really appreciate if someone can help me out.
Best Wishes,
BissNik
Edited by BissNik on Wed, 06/16/2021 - 14:51