Jump to content

poopoodice

Members
  • Posts

    1160
  • Joined

  • Days Won

    7

Everything posted by poopoodice

  1. You can render it in RenderGameOverlayEvent (Pre/Post), and you need to check for the element type. ForgeIngameGui/IngameGui to see how the original icons are rendered.
  2. There are a couple, but the most used one in screens is the none static one that takes matrixstack, xpos, ypos, upos, vpos, uwidth, vheight. E.g. blit(stack, 10, 10, 1, 1, 15, 15) This will draw texture at (10, 10) on the screen with the texture position at (1, 1) to (16, 16), note that this one only accepts texture size of 256*256. Before drawing you need to bind the texture using TextureManager.bindTexture, the instance of the manager can be obtained from Minecraft.
  3. I think it is probably LivingRenderer.getPacketOverlay, and GameRenderer#hurtCameraEffect, can't guarantee :l
  4. You need to call super.tick() in your tick method as it is where it updates its motion/position.
  5. Maybe use the ColorHandler provided by the event instead creating your own one?
  6. It implements IExtensibleEnum, I guess you can use it (check its comment).
  7. Hello, is there a datagen for sounds.json file? I can't seem to find it.. if it exists. Thank you.
  8. It's now in the second parameter of EntityType.Builder#create, EntityClassification.
  9. As long as vanilla use them, they exists 😉 Minecraft#displayGuiScreen opens a Screen on client
  10. Last time I checked is still there, AbstractGui.fill()
  11. It sends a packet to all/tracking clients, you should be able to do the same thing but without sending to the specific player.
  12. It's for animation only. Btw what version are you using?
  13. 1 You need to enable blend. 2 I think you should be able to just use fill and fill the whole bg.
  14. Can be changed via FovUpdateEvent.
  15. Check Minecraft#processKeyBinds where it checks for attack keybind (left mouse).
  16. You need to check before casting, like we usually do. https://mcforge.readthedocs.io/en/latest/concepts/sides/#performing-side-specific-operations
  17. You can add the attributes to the entity via GlobalEntityTypeAttributes.put() using enqueueWork in common setup. Check GlobalEntityTypeAttributes.
  18. Make sure your modid is not capitalized.
  19. Well, since public Container createMenu(int id, PlayerInventory playerInventory, PlayerEntity playerEntity <--------) { return new MyModContainer(id,playerInventory, world,extraDataWriter); } you already have the player, why don't you just pass the player in? Also getEntityByID is using entityID not UUID, use ServerWorld#getEntityByUuid/getPlayerByUuid although it is not necessary because you've got the player already.
  20. You did not pass the instance of the object (zombie).
  21. Check ArgumentBuilder#then, and vanilla commands.
  22. int.class then Method#invoke to access it.
  23. RegistryObject is a supplier that holds an item, use Supplier#get to get the Item where has already implemented IItemProvider.
  24. It's been discussed for a long time, but none of the solutions worked for me (maybe I did not did them right). So I have created another mod (basically a tool) and I want to use it in another environment, this is what I've tried: 1. run normal build ./gradlew.bat build, and then put built jar from lib into the mods folder. 2. run jar build ./gradlew.bat jar, and then put built jar from reobfJar into the mods folder. 3. build jar using existing ide options, and then put built jar from lib into the mods folder. 1 & 2 causes crashes, and 3 does not work at all (not detected). What is the correct way of doing it in 1.16.4? Thanks. Edit: local jars can be located by adding flatDir into repositories.
  25. https://github.com/HungTeen/pvzmod/blob/dev/src/main/java/com/hungteen/pvz/advancement/SunAmountTrigger.java#L15 You did not add your modid to the rl so it thinks it belongs to vanilla (just my guess).
×
×
  • Create New...

Important Information

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