-
[1.17]Texture's load problems
Okay i will try it,thank you
-
[1.17]Texture's load problems
I mean what should i do to use the OverlayRegistry to draw the texture in my screen(in the game).
-
[1.17]Texture's load problems
Thanks,but could you tell me what should accurately do to modify the codes to achieve my goal?
-
[1.17]Texture's load problems
[1.17]Hey bro,i want to load a texture that can appear on the screen(like ui) when i hold some itmes,so i make a: package com.xiaomi.derby.screen; import com.mojang.blaze3d.vertex.PoseStack; import com.xiaomi.derby.item.ModItems; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.InteractionHand; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import static net.minecraftforge.fmlclient.gui.GuiUtils.drawTexturedModalRect; public class UIRenderer { private static final ResourceLocation TEXTURE = new ResourceLocation("derby","textures/gui/speed_bar"); @SubscribeEvent public void onRenderGui(RenderGameOverlayEvent.Post event) { LocalPlayer player = Minecraft.getInstance().player; if(RenderGameOverlayEvent.ElementType.ALL.equals(event.getType())){ assert player != null; if(player.getItemInHand(InteractionHand.MAIN_HAND).is(ModItems.HORSE_WHIP.get())) { Minecraft.getInstance().textureManager.bindForSetup(TEXTURE); drawTexturedModalRect(new PoseStack(), 50, 50, 80, 41, 80, 41, 0); } } } } But when i entered the game , i found there was not the texture which i set,it was a black rectangle.Can you tell me how can i solve this problem?THANKS A LOT!
-
[1.17]Create a GUI Overlay in 1.17
Ok I'll try,thank you very much!
-
[1.17]Create a GUI Overlay in 1.17
Hello everyone! I'm quite new to forge, I needed to create a GUI Overlays and I found an article https://emxtutorials.wordpress.com/simple-in-game-gui-overlay/ on how to create a gui overlay, but as I understood the classes were renamed in 1.17. Can you share a sample code that would perform this function? Thank you very much!!!
-
[1.17]Get Entity/Player Speed
ohh I know what should i do ,thanks alots!!!!!
-
[1.17]Get Entity/Player Speed
Oh thank you bro.But I need the REAL-TIME speed ,not the entity's attribute.
-
[1.17]Get Entity/Player Speed
Hey My Dear Friends, Could you teach me how to GET THE REAL SPEED of entity or player(Such as the horse's speed when it running)? I'm modding my first mod,so I don't know how to do that,I have searched for the Google and Youtube but there was no answer for the Minecraft1.17,so I couldn't really understand it. If you can help me,I'm really thank a lot!!!
IPS spam blocked by CleanTalk.