Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/25/20 in all areas

  1. Seriously, stop pretending to know what the important bits are and post the whole thing. And your code. Preferably as a git repo
    2 points
  2. Found this in the 1.12.2 mappings for net.minecraft.client.gui.GuiScreen, assuming it's the legacy equivalent: /** * Draws the screen and all the components in it. */ public void drawScreen(int mouseX, int mouseY, float partialTicks) { for (int i = 0; i < this.buttonList.size(); ++i) { ((GuiButton)this.buttonList.get(i)).drawButton(this.mc, mouseX, mouseY, partialTicks); } for (int j = 0; j < this.labelList.size(); ++j) { ((GuiLabel)this.labelList.get(j)).drawLabel(this.mc, mouseX, mouseY); } } MCP Mappings (especially for newer version of MC) are often incomplete and contain arbitrary changes between versions, so looking at older mappings is definitely a good idea. Mekanism is open source and has a 1.16 branch. Their GUI is here: https://github.com/mekanism/Mekanism/tree/1.16.x/src/main/java/mekanism/client/gui It seems like they have to roll most of it from scratch, this class in the render package contains most of the low-level logic and event subscriptions: https://github.com/mekanism/Mekanism/blob/1.16.x/src/main/java/mekanism/client/render/MekanismRenderer.java Good luck!
    1 point
  3. You might have a better shot looking at 1.15.2 vanilla sources since many of the 1.16 variables aren't named yet. This is what the render method for Screen looks like in 1.15.2: public void render(int p_render_1_, int p_render_2_, float p_render_3_) { for(int i = 0; i < this.buttons.size(); ++i) { this.buttons.get(i).render(p_render_1_, p_render_2_, p_render_3_); } } I also find it useful to check out the github of a mod that has already implemented something similar to what you want and base your code on theirs. Good Luck!
    1 point
  4. In the debug screen do you see your block has the facing property, and does it change every time you place it with different direction? If yes, have you rotate its models according to its state in your blockstate file?
    1 point
  5. If you're going to provide a log please provide the full log
    1 point
  6. Extend `WorldSavedData` and override `read()` and `write()`. You can also create a empty constructor calling the super constructor with the name of your WorldSavedData. If you have a `ServerWorld`, `ServerWorld#getSavedData` returns a `DimensionSavedDataManager`. Call `DimensionSavedDataManager#getOrCreate` (or `#get`), passing in a Supplier that gives new instances of your WorldSavedData, and a string data identifier. I'm not very sure if this is cross-dimensional.
    1 point
  7. I know this topic is a bit old, but I just had the same issue and a Google search points here. If your packet is working correctly, and its just the warning in the log, you've likely made the same mistake as me. Inside the "messageConsumer" you provided when registering your packet, you need to set the packet handled flag to true. "context.get().setPacketHandled(true);" If it isn't set to true, NetworkHooks.onCustomPayload will return false, and ClientPlayNetHandler.handleCustomPayload will post the warning
    1 point
  8. My forge won't install either (1.14.3)
    1 point
×
×
  • Create New...

Important Information

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