Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Error_Coding

Error_Coding

Members
 View Profile  See their activity
  • Content Count

    4
  • Joined

    July 10, 2020
  • Last visited

    January 23

Community Reputation

0 Neutral

About Error_Coding

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Error_Coding

    [1.15.2] ItemEntity not added to world

    Error_Coding replied to Error_Coding's topic in Modder Support

    That works. Thanks, you just saved my day.
    • September 22, 2020
    • 7 replies
  2. Error_Coding

    [1.15.2] ItemEntity not added to world

    Error_Coding replied to Error_Coding's topic in Modder Support

    Oh, thanks. Guess I will have to read into packet transfer.
    • September 22, 2020
    • 7 replies
  3. Error_Coding

    [1.15.2] ItemEntity not added to world

    Error_Coding replied to Error_Coding's topic in Modder Support

    There isn't much more to it but sure, here's the whole class. @Mod.EventBusSubscriber(modid = FirstMod.MOD_ID, bus = Bus.FORGE) public class DropDirtOnCrouchEvent { @SubscribeEvent public static void dropDirtOnCrouchEvent(InputUpdateEvent event) { if(event.getMovementInput().sneaking) { PlayerEntity p = event.getPlayer(); ItemEntity dirt = new ItemEntity(p.world, p.getPosX(), p.getPosY(), p.getPosZ(), new ItemStack(Items.DIRT, 16)); dirt.setLocationAndAngles(p.getPosX(), p.getPosY(), p.getPosZ(), 0.0F, 0.0F); p.world.addEntity(dirt); } } } I'm pretty sure that the error has to be in the code snippet I posted above tho(I tried adding a potion effect to the player to check if the event fires and that worked)
    • September 22, 2020
    • 7 replies
  4. Error_Coding

    [1.15.2] ItemEntity not added to world

    Error_Coding posted a topic in Modder Support

    So I want the player to drop 16 blocks of dirt when crouching(yes I know, very funny) but the items just won't spawn. The event definitelly fires. Here's the code. PlayerEntity p = event.getPlayer(); ItemEntity dirt = new ItemEntity(p.world, p.getPosX(), p.getPosY(), p.getPosZ(), new ItemStack(Items.DIRT, 16)); dirt.setLocationAndAngles(p.getPosX(), p.getPosY(), p.getPosZ(), 0.0F, 0.0F); p.world.addEntity(dirt);
    • September 22, 2020
    • 7 replies
  • All Activity
  • Home
  • Error_Coding
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community