-
Posts
1160 -
Joined
-
Days Won
7
Everything posted by poopoodice
-
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.
-
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.
-
Need help with modifying some vanilla rendering [1.16.4]
poopoodice replied to Tavi007's topic in Modder Support
I think it is probably LivingRenderer.getPacketOverlay, and GameRenderer#hurtCameraEffect, can't guarantee :l -
You need to call super.tick() in your tick method as it is where it updates its motion/position.
-
[1.16.4] Custom grass block not showing colors
poopoodice replied to RustedSkies's topic in Modder Support
Maybe use the ColorHandler provided by the event instead creating your own one? -
Hello, is there a datagen for sounds.json file? I can't seem to find it.. if it exists. Thank you.
-
As long as vanilla use them, they exists 😉 Minecraft#displayGuiScreen opens a Screen on client
-
Last time I checked is still there, AbstractGui.fill()
-
[SOLVED][1.15.2]ServerWorld.spawnParticle excluding specific player
poopoodice replied to Woodside's topic in Modder Support
It sends a packet to all/tracking clients, you should be able to do the same thing but without sending to the specific player. -
Minecraft.getMinecraft().thePlayer.swingItem(); wont attack
poopoodice replied to Gubipe's topic in Modder Support
It's for animation only. Btw what version are you using? -
1 You need to enable blend. 2 I think you should be able to just use fill and fill the whole bg.
-
Can be changed via FovUpdateEvent.
-
Check Minecraft#processKeyBinds where it checks for attack keybind (left mouse).
-
You need to check before casting, like we usually do. https://mcforge.readthedocs.io/en/latest/concepts/sides/#performing-side-specific-operations
-
You can add the attributes to the entity via GlobalEntityTypeAttributes.put() using enqueueWork in common setup. Check GlobalEntityTypeAttributes.
-
Make sure your modid is not capitalized.
-
[1.16.4] How i can open a container by clicking on my mob
poopoodice replied to Klarks's topic in Modder Support
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. -
[1.16.4] How can I create a command with multiple arguments?
poopoodice replied to Yagnap's topic in Modder Support
Check ArgumentBuilder#then, and vanilla commands. -
RegistryObject is a supplier that holds an item, use Supplier#get to get the Item where has already implemented IItemProvider.
-
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.
-
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).