Everything posted by poopoodice
-
[1.12.2] PlayerTickEvent [Solved]
I've registered the event using MinecraftForge.EVENT_BUS.register @SubscribeEvent public void onPlayerTick(PlayerTickEvent event) { EntityPlayer player = Minecraft.getMinecraft().player; if(player != null) { ItemStack itemstack = player.getHeldItemMainhand(); if(itemstack.areItemStacksEqual(itemstack, new ItemStack(Items.FEATHER))) { this.holding = true; } if(this.holding && player.isAirBorne) { event.player.fallDistance = 0.0F; event.player.motionY *= 0.90D; player.velocityChanged = true; } this.holding = false; } } So basically everything works fine, whenever the player is holding a feather, the player doesn't take any fall damage and the player falls slower as well. But when I quit the game (singleplayer) and rejoin, everything just not working anymore, the player is no longer has a slower falling speed and it now takes fall damage. What might cause these?
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
Yeah that's what I was trying to say. Rewrite the onUpdate() and remove those things shouldn't be too hard, and there must be something you don't want in it as well.
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
Is it possible to post your code?
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
No, I don't think so, because those variables were declared in the onUpdate method, and I don't have enough knowledge about projectile because my bullet doesn't extend EntityThrowable so I can't explain clearly. Sorry. But I still recommend you to read the code in fireball instead of other projectiles.
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
There's ingoreTime and ignoreEntity in EntityThrowable, and they might cause the problem?
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
And for the bullet, I suggest you rewrite the whole class because that's what I did and it works fine, and also I think bullets are more similar to fireballs, not arrow.
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
Oh my bad, open too many tabs at a time.
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
Wrong topic
-
Remove rendered Rect from GUI
Or just easily set the length and width of the texture to 0.
-
Localization issues
I don't know but I notice that in your IronRoofing you @Override public String getTranslationKey(int meta) { // TODO Auto-generated method stub return null; } returned null for your translation key, don't know if it causes the problem tho.
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
Hello me again lol. This should solve your first problem.
-
[SOLVED] [1.12.2] Making entities spawn with mod items?
Do you mean about line1000 - 1200 in EntityLiving?
-
EntityProjectile disappears when server shutdown/restart
https://pastebin.com/Jymq0XnZ Paste bin. (I know the code I wrote is extremely messy and not efficient)
-
EntityProjectile disappears when server shutdown/restart
As an example when I shoot a projectile in to the air, and before it hit something I close the world. When I reopen the world it just disappeared. Is there something to do with IEntityAdditionalSpawnData? If yes, how do I use it?
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
getMaxItemUseDuration In Bow class returns 72000 which means you can hold the bow for 3600 seconds. 0 means the longest time you can use the item is 0 tick, it doesn't make sense.
-
Mouse.isButtonDown() in multiplayer 1.12.2
Thanks ; )
-
Mouse.isButtonDown() in multiplayer 1.12.2
What kind of checks should I do, except the damage?
-
Mouse.isButtonDown() in multiplayer 1.12.2
Alright, I'm updating now. So if I Override it and always return true, it will be able to solve the problem, or I need to add some checkings? And I had ran ./gradlew setupDecompWorkspace do I still need to run ./gradlew eclipse?
-
Mouse.isButtonDown() in multiplayer 1.12.2
-
Mouse.isButtonDown() in multiplayer 1.12.2
I did find somebody says to use this method to avoid the problem on the internet but I remember that I couldn't find the method in Item class. And I've tried it again just then, still couldn't find it.
-
Mouse.isButtonDown() in multiplayer 1.12.2
Well, the problem of onUsingTick is the item can't be damaged when holding right-click. Otherwise, it just returns a new itemstacks which interrupts the player's action (onUsingTick still being called when the player has already released the right mouse button).
-
Mouse.isButtonDown() in multiplayer 1.12.2
I used Mouse.isButtonDown() in the custom item class to replace the vanilla onUsingTick because it wasn't working as well as expected. But this method does not work in multiplayer. Does sending packets to the server fix this problem?
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
Do I need to send packets to server to solve this problem?
-
Get Entities in player's vision/sight 1.12.2
As title, Is there a way to get all entities that are in the player's vision/sight? If yes, how do I use it? Is it something to do with moving object position ?
-
[UNSOLVED] [1.12.2] Making onItemRightClick(...) fire every tick?
Actually, I use Mouse.isButtonDown(1) to represent right-click in the onUpdate() method. It works well for me but there might be some problems that I haven't notice.
IPS spam blocked by CleanTalk.