Forge build 26.3.2672 introduced checks for undefined package discriminators when sending message. Is it possible to turn off this check? I'm working with a mod that can interact with Spigot servers, and the mod sends messages that are not registered. The server cannot receive the messages because Forge has intercepted them and produced exceptions.
Thanks for replying.
I wrote this piece of code:
IModel model = ModelLoaderRegistry.getModel(new ResourceLocation("minecraft:item/" + itemStack.getItem().getRegistryName().getResourcePath()));
ResourceLocation resourceLocation = (ResourceLocation) model.getTextures().toArray()[0];
InputStream inputStream = Minecraft.getMinecraft().getResourceManager().getResource(new ResourceLocation(resourceLocation.getResourceDomain() + ":textures/" + resourceLocation.getResourcePath() + ".png")).getInputStream();
BufferedImage image = ImageIO.read(inputStream);
I successfully extracted the icon, but I'm not sure if this approach also works on custom textures.
I'm trying to get a BufferedImage of an Item's 2d icon. I did my research on Google and I found getIconFromDamage, but this method no longer exists. I tried item.getRegistryName but I don't know how to get the png file since some names are different(e.g. minecraft:wheat_seeds and assets/minecraft/textures/items/seeds_wheat.png).
Any help would be appreciated