Topic category: Help with Minecraft modding (Java Edition)
i have a procedure error for opening GUI here is the code:
public class CatMenuKeyOnKeyPressedProcedure {
public static void execute(LevelAccessor world, double x, double y, double z, Entity entity) {
if (entity == null)
return;
{
if (entity instanceof ServerPlayer _ent) {
BlockPos _bpos = new BlockPos(x, y, z);
NetworkHooks.openGui((ServerPlayer) _ent, new MenuProvider() {
@Override
public Component getDisplayName() {
return new TextComponent("CatMenu");
}
@Override
public AbstractContainerMenu createMenu(int id, Inventory inventory, Player player) {
return new MatMenuMenu(id, inventory, new FriendlyByteBuf(Unpooled.buffer()).writeBlockPos(_bpos));
}
}, _bpos);
}
}
}
}
Help!!!!! https://mcreator.net/forum/95978/fabric-gradle-fail