Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/24/20 in all areas

  1. Specify a modded Item instance instead of a vanilla Item instance within the first argument of the ItemStack.
    1 point
  2. What exactly are you having trouble with? This line of code: event.getGenericTrades().add(new BasicTrade(5, new ItemStack(Items.ENCHANTED_GOLDEN_APPLE, 5), 2, 10)); would add a new trade that costs 5 emeralds and gives you 5 enchanted golden apples in return.
    1 point
  3. Because it's old as balls. Because nobody here remembers how it works. Because everybody on the dev team wants to focus on what's current. Because we want people to update rather than begging modders to backport. Because it's a rule on these forums.
    1 point
  4. Bit of follow up since I understand a bit more now.... To get extra data passed across to the client (like a TE blockpos, for example), Forge 26.0.16 adds an extra PacketBuffer parameter to the NetworkHooks.openGui() calls, and a corresponding parameter to the container factory constructor. Looks like NetworkHooks.openGui() remains the way to go for modded - I guess player.openContainer() is really for vanilla only? Update: player.openContainer() should be fine to use if you're just creating a GUI purely to display some container slots (and don't need direct access to the clientside tile entity), like a chest GUI for example. Typically, you'll have two or more constructors in your container objects - one "factory" constructor which is called by Minecraft client-side when a GUI is opened (and when the container type is registered during init), and one or more constructors of your choosing which create a container with any data you need to initialize them with. Those extra constructors would be called server-side from your INamedContainerProvider implementation, and client-side from your "factory" constructor, having extracted information from the extraData PacketBuffer.
    1 point
  5. HI YOu are messing with a pile of the OpenGL settings and not saving/restoring them properly. What's the reason you can't just use the vanilla frame buffer helper? This class is a working example of how you can render to a framebuffer object https://github.com/TheGreyGhost/SpeedyTools/blob/master/src/main/java/speedytools/clientside/selections/SelectionBlockTextures.java start from the updateTextures() method... -TGG
    1 point
×
×
  • Create New...

Important Information

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