-
Posts
1160 -
Joined
-
Days Won
7
Everything posted by poopoodice
-
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?
-
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.
-
Or just easily set the length and width of the texture to 0.
-
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.
-
[SOLVED] [1.12.2] Making entities spawn with mod items?
poopoodice replied to Differentiation's topic in Modder Support
Do you mean about line1000 - 1200 in EntityLiving? -
EntityProjectile disappears when server shutdown/restart
poopoodice replied to poopoodice's topic in Modder Support
https://pastebin.com/Jymq0XnZ Paste bin. (I know the code I wrote is extremely messy and not efficient) -
EntityProjectile disappears when server shutdown/restart
poopoodice posted a topic in Modder Support
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? -
Mouse.isButtonDown() in multiplayer 1.12.2
poopoodice replied to poopoodice's topic in Modder Support
Thanks ; ) -
Mouse.isButtonDown() in multiplayer 1.12.2
poopoodice replied to poopoodice's topic in Modder Support
What kind of checks should I do, except the damage? -
Mouse.isButtonDown() in multiplayer 1.12.2
poopoodice replied to poopoodice's topic in Modder Support
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
poopoodice replied to poopoodice's topic in Modder Support
-
Mouse.isButtonDown() in multiplayer 1.12.2
poopoodice replied to poopoodice's topic in Modder Support
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
poopoodice replied to poopoodice's topic in Modder Support
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). -
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?
-
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 ?