Everything posted by poopoodice
-
Create bar like xp bar
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.
-
Help for AbstractGui#blit()
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]
I think it is probably LivingRenderer.getPacketOverlay, and GameRenderer#hurtCameraEffect, can't guarantee :l
-
[1.16.4] Custom ProjectileEntity
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
Maybe use the ColorHandler provided by the event instead creating your own one?
-
1.16.5 - EnumHelper Gone - Any other way to add EnityClassification?
It implements IExtensibleEnum, I guess you can use it (check its comment).
-
sound.json datagen
Hello, is there a datagen for sounds.json file? I can't seem to find it.. if it exists. Thank you.
-
1.16.5 - EnumHelper Gone - Any other way to add EnityClassification?
It's now in the second parameter of EntityType.Builder#create, EntityClassification.
-
GUIs
As long as vanilla use them, they exists 😉 Minecraft#displayGuiScreen opens a Screen on client
-
[1.16.5] GameOverlay
Last time I checked is still there, AbstractGui.fill()
-
[SOLVED][1.15.2]ServerWorld.spawnParticle excluding specific player
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
It's for animation only. Btw what version are you using?
-
[1.16.5] GameOverlay
1 You need to enable blend. 2 I think you should be able to just use fill and fill the whole bg.
-
[1.16.5] Player Field of View
Can be changed via FovUpdateEvent.
-
What is the method to left click?
Check Minecraft#processKeyBinds where it checks for attack keybind (left mouse).
-
[1.16.5] get SeverWorld
You need to check before casting, like we usually do. https://mcforge.readthedocs.io/en/latest/concepts/sides/#performing-side-specific-operations
-
[1.16.5] How do I set entity attributes?
You can add the attributes to the entity via GlobalEntityTypeAttributes.put() using enqueueWork in common setup. Check GlobalEntityTypeAttributes.
-
Forge Crash When Trying To Run Mod
Make sure your modid is not capitalized.
-
[1.16.4] How i can open a container by clicking on my mob
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] Edit Conversion Progress of Zombie Villager (Help with Java Reflection)
You did not pass the instance of the object (zombie).
-
[1.16.4] How can I create a command with multiple arguments?
Check ArgumentBuilder#then, and vanilla commands.
-
[1.16.4] Edit Conversion Progress of Zombie Villager (Help with Java Reflection)
int.class then Method#invoke to access it.
-
Recipes Not Working/IItemProvider Help
RegistryObject is a supplier that holds an item, use Supplier#get to get the Item where has already implemented IItemProvider.
-
Adding jar files to existing environment (Solved)
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.
-
[1.15.2] Invalid criterion trigger
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).
IPS spam blocked by CleanTalk.