Jump to content

Matt2017

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Matt2017

  1. 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.
  2. Thanks! Now I've got the 2d icons. How can I get 3d icons by the way?
  3. 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.
  4. 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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.