Everything posted by poopoodice
-
Custom Torches?
Sorry I didn't read your question properly, I thought you were talking about creating a torch that can be placed on the ground. Do you mean something like this? https://www.curseforge.com/minecraft/mc-mods/jabelars-moving-light-sources
-
Custom Torches?
Isn't torch basically a block that can't be placed on the surfaces that aren't solid and detects neighborhood changes, with lightlevel and 6 facings?
-
[SoLvEd] Hiding player's hand and item in first-person view 1.12.2
Thanks ; ) @SubscribeEvent public void RenderPlayer(RenderHandEvent event) { event.setCanceled(true); }
-
[SoLvEd] Hiding player's hand and item in first-person view 1.12.2
As title. Is there any event that can be used to hide the player's hand and item in a specific condition I gave?
-
drawing player screen overlay 1.12.2
yeah I just found the answer here If statement can solve this problem.
-
drawing player screen overlay 1.12.2
Okay, I ran the code and it seems like it has been rendered multiple times every frame just like what you mentioned. How do I declare the element type?
-
drawing player screen overlay 1.12.2
Which variable should I assign RenderGameOverlayEvent.ElementType.ALL; to? Btw, is there a way to let the picture I drew not block the vanilla stuff? Is it referring to the element type as well?
-
drawing player screen overlay 1.12.2
@SubscribeEvent public void onRenderOverlay(RenderGameOverlayEvent.Post renderevent) { Minecraft mc = Minecraft.getMinecraft(); if (this.clicked) { mc.getTextureManager().bindTexture(TEST); Gui.drawScaledCustomSizeModalRect(x, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight); } return; } Is this correct? (I added .Post to the end of RenderGameOverlayEvent. If nothing's wrong, what does the u and v stands for in Gui.drawScaledCustomSizeModalRect?
-
[1.14.4] recipes not showing in game
https://github.com/ed-webb/cobra/blob/master/src/main/resources/data/cobra/recipes/chalk_dust.json Why not use shapeless crafting here? and "data": 0 isn't necessary.
-
drawing player screen overlay 1.12.2
public class AimHandler { private static final ResourceLocation TEST = new ResourceLocation(Reference.MOD_ID + ":textures/gui/test.png"); private boolean clicked = false; @SubscribeEvent public void onKeyPressed(MouseEvent event) { Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player = mc.player; ItemStack itemstack = player.getHeldItemMainhand(); if(player != null && Minecraft.getMinecraft().inGameHasFocus && event.isButtonstate() && itemstack.getItem() instanceof ItemBase && event.getButton() == 0) { this.clicked = !this.clicked; } return; } @SubscribeEvent public void onRenderOverlay(RenderGameOverlayEvent renderevent) { Minecraft mc = Minecraft.getMinecraft(); if (this.clicked) { mc.getTextureManager().bindTexture(TEST); Gui.drawScaledCustomSizeModalRect(x, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight); } return; } } Is this the correct way to do it?
-
drawing player screen overlay 1.12.2
So I don't use RenderGameOverlayEvent anymore?
-
drawing player screen overlay 1.12.2
Well RenderGameOverlayEvent sounds more efficient and more properly.... WHat should I do without extending Gui?
-
drawing player screen overlay 1.12.2
Does the class still need to extend Gui or RenderGameOverlayEvent is all good?
-
drawing player screen overlay 1.12.2
Am I able to combine events like this? public void onKeyPressed(MouseEvent event, RenderGameOverlayEvent renderevent)
-
[1.14.4] recipes not showing in game
Do you mean this Forge Documentation https://mcforge.readthedocs.io/en/latest/utilities/recipes/#groups
-
Modded Bow and Arrow
If you are talking about the arrow's damage to entity and your custom arrow extends entityarrow I think you just simply set the damage in the constructor. If not you use attackEntityFrom(damagesource, damage)
-
drawing player screen overlay 1.12.2
How do I toggle it? Apparently, while loop will not work. And do you mean drawSplashScreen(textureManagerInstance)
-
drawing player screen overlay 1.12.2
As title, I want to draw an overlay texture on to player's screen when left clicked similar to the pumpkin blur. Here us the code: public class OverlayHandler extends Gui { private static final ResourceLocation TEST = new ResourceLocation(Reference.MOD_ID + ":textures/gui/test.png"); private boolean clicked = false; @SubscribeEvent public void onKeyPressed(MouseEvent event) { if(!Minecraft.getMinecraft().inGameHasFocus) return; if(!event.isButtonstate()) return; Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player = mc.player; if(player != null) { ItemStack itemstack = player.getHeldItemMainhand(); if(itemstack.getItem() instanceof ItemBase) { int down = event.getButton(); if(down == 0 && !this.clicked) { this.clicked = true; mc.getTextureManager().bindTexture(TEST); this.drawTexturedModalRect(0, 0, 0, 0, 256, 256); } else if(down == 0 && this.clicked) { this.clicked = false; } } } } } I have checked the click was called but nothing has changed to the screen.
-
1.12.2 OnItemRightClick
In my situation to avoid the attack immune cooldown: raytraceresult.entityHit.setHurtResistanceTime = 0 ; ) link to stackoverflow
-
1.12.2 OnItemRightClick
The damage receive cooldown between every single attack is half a second unless the amount of damage dealt in the duration is larger than the damage dealt before in that half of the second, the entity will take the damage from the source that dealt the most damage, and ignore other damages. (From Minecraft Wiki) Link => https://minecraft.gamepedia.com/Damage#Immunity
-
1.12.2 OnItemRightClick
Oh wow, thanks.
-
1.12.2 OnItemRightClick
That's totally fine, I found nothing in the item class as well. Just one last question, is damaging an entity twice or more in a tick possible in minecraft? Or it only count as once?
-
1.12.2 OnItemRightClick
Nvm, thats not that important anymore. Another question, is there any way to prevent the player from getting slowed during using the item?
-
1.12.2 OnItemRightClick
Oh haha my bad. But what can I do with this method? I tried to override it but I couldnt
-
1.12.2 OnItemRightClick
How do you call Item#canContinueUsing?
IPS spam blocked by CleanTalk.