Jump to content

poopoodice

Members
  • Posts

    1160
  • Joined

  • Days Won

    7

Everything posted by poopoodice

  1. 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?
  2. 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.
  3. 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.
  4. There's ingoreTime and ignoreEntity in EntityThrowable, and they might cause the problem?
  5. 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.
  6. Oh my bad, open too many tabs at a time.
  7. Or just easily set the length and width of the texture to 0.
  8. 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.
  9. Hello me again lol. This should solve your first problem.
  10. Do you mean about line1000 - 1200 in EntityLiving?
  11. https://pastebin.com/Jymq0XnZ Paste bin. (I know the code I wrote is extremely messy and not efficient)
  12. 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?
  13. 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.
  14. What kind of checks should I do, except the damage?
  15. 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?
  16. I just can't find it, in vanilla Item class as well.
  17. 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.
  18. 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).
  19. 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?
  20. Do I need to send packets to server to solve this problem?
  21. 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 ?
  22. 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.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.