Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by DavidM

  1. You can check which one of the 3 axis of the 2 blockposes are not equal.
  2. Player in minecart is handled as PlayerEntity riding MinecartEntity. Therefore, you can just check for player.getRidingEntity() instanceof MinecartEntity .
  3. Lightning is summoned with World#addWeatherEffect. Pass in an instance of LightningBoltEntity.
  4. I think that OP stitched the texture during TextureStitchEvent, and then use TextureAtlasSprite#getInterpolatedU and V to obtain the UV of the stitched sprite to be used in the buffer builder. The texture binded is still the original texture map, but it contains the stitched texture.
  5. Have you bind your texture? I am dumb.
  6. By calculating the color from the xyz coordinates I mean generate the color value from the coordinates. That way, the color at a specific position will always be the same (like how Minecraft handles its own grass coloring). An example would be: @Override @SideOnly(Side.Client) public int getGrassColorAtPos(BlockPos pos) { return min + (pos.getX() * pos.getY() * pos.getZ() % (max - min)); }
  7. Not sure if this is the cause, but you enabled texture 2D, then immediately disabled it here.
  8. Do you wish to make the grass color at the same position in each client the same? i.e. There are two players on a server with your mod. Should the grass color at (0, 0) be the same to both of them? If so, then you could override Biome#getGrassColorAtPos and calculate the color from the xyz coordinates. This would allow the grass color in your world to stay the same when Minecraft is relaunched, and allow the color to be the same on different client.
  9. No. The @SideOnly is used if the associated object should not exist on sides not specified in the parameters. This means classes annotated with @SideOnly(Side.Client) will not exist on the server side. It does nothing in loading something only on one side. Annotating an event subscriber with @SideOnly might work, but only due to the absence of the annotated object on the other side (which is considered hacky). One should use a side-specific event bus subscriber instead. GasMaskBar is client only. Assuming your event handler is triggered on both sides, this will cause a crash on the server. Either register your GUI in a client proxy or create a client-side event subscriber and register it there.
  10. That is the registering of the GUI. OP is having problem with opening the GUI. Since the OP is calling the code from Item#onItemRightClick, I would suggest to handle the right click on the server side, then sends a packet to the client to open the GUI. This allows the server to control if the GUI should be opened. Actually, since the OP is trying to create a book-like GUI about which the server does not care, opening it directly on the client-side should be fine.
  11. 1. Are you sure you've posted the correct code? That will not compile. 2. Check out WorldSavedData. The documentation of which is at https://mcforge.readthedocs.io/en/latest/datastorage/worldsaveddata/.
  12. Personally, this is probably not necessary. This would means that the developer need to write a hook in all the said languages to expose the Forge API. This of course includes the circumvention of non dynamically loadable languages like C++. Unless you meant to parse the said languages into a intermediate form (which probably require more effort, as a compiler is needed), which is then loaded by the "xmod", but this would make the user unable to access Minecraft and Forge with reflection and ASM. You can compile and run Java code from the command line. However, writing Java (and most other static languages) without an IDE would be a pain and is not recommended.
  13. Unlikely. Deleting a save in game will also remove the corresponding world save folder.
  14. SwordItem has a lot more sword-specific functions than an Item. Only extends sword when you need to actually use it to attack another entity like a vanilla sword. In your case extending Item should be sufficient. @SerpentDagger Please note that posting copy-pastable code for others is discouraged, as others will not learn and might blindly copy the code.
  15. Subscribe to KeyboardKeyEvent, which is only triggered when keys are pressed when a GUI is opened.
  16. Other mods need to change the method name.
  17. https://github.com/colegomax/hyperionmod/blob/539fb750e930df486a61ace299ea343022ec9338/java/com/cole/hyperion/util/handlers/RegistryHandler.java#L41 You are trying to access client tile entity renderer registry from common event subscriber here. Either move the client code into a client proxy or create another client event subscriber.
  18. That is the correct Forge version. Forge 14.23.5.2838 is for Minecraft 1.12.2. The launcher is the legacy vanilla launcher (OP is trying to launch a Modpack from Twitch).
  19. You are playing Minecraft 1.14 but you are trying to install WorldEdit for Minecraft 1.12. This is not going to work. Check your launcher installations and make sure you've launched Minecraft 1.12.
  20. Does your graphic card support the required OpenGL version?
  21. Remove it and wait for the author to update.
  22. I am trying to detect when a player clicks on an ItemStack in his inventory with another ItemStack (held by the mouse). I recall that all the inventory and GUI interactions are client-side; however, I've seen servers achieve this (clicking on ItemStack with ItemStack) with server-side plugin/mod. How would I approach this?
  23. This is not a chat room; please stop bumping every minute. The version of your Refined Storage is not compatible with the version of your Forge. Either downgrade Refined Storage or update Forge.
  24. Try deleting your configs. Why do modders insist on creating their own way of config and parsing though...
  25. Please stop bumping, especially when we are waiting for you to post your log.
×
×
  • Create New...

Important Information

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