Jump to content

Novârch

Members
  • Posts

    422
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Novârch

  1. 11 minutes ago, _vertig0 said:

    I know ASM and coremods should only be used when absolutely necessary

    This doesn't seem like a good use case for ASM.

     

    11 minutes ago, _vertig0 said:

    LivingUpdateEvent

    Thing about this for a second, are arrows living? Of course they aren't, arrows extend Entity and implement IProjectile.

    In my opinion you should cancel one of the many events (maybe ArrowLooseEvent?) that references arrows and implement your own physics there.

  2. 1 hour ago, StupidXrayUser said:

    Mine is kinda different It just stucks on the downloading screen (from minecraft launcher) and freezes for a 5-10 seconds and dont work. i just pressed 'Play' button again but it didnt work for the image : https://hizliresim.com/lB0ZFB

    1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.

  3. 10 minutes ago, Slastic said:

    TotemPos.get(playerIn).add(pos.getX(), pos.getY(), pos.getZ());

    So I would add to it like this, right?

    The list HashMap is registered as told

    public static HashMap<PlayerEntity, BlockPos> TotemPos = new HashMap<>();

    No, use HashMap#put, please read up on HashMaps, they're really useful. Think of the PlayerEntity as the index of the BlockPos, HashMaps don't have normal indexes, try printing out a HashMaps's values and you'll get an order different then the order you added them in.

  4. I've made a custom item that stores a player's capability in it's NBT. The item works fine except when I use it for the first time it consumes the player's capability(resets it's values to 0), but doesn't store it. All subsequent uses of the item work flawlessly.

    Here's a link to the item's class on GitHub.

     

    Edit: Solved by updating the NBT tag twice, I have no idea why this fixed it.

  5. 22 hours ago, Slastic said:

    for each individual player

    To get a value from a HashMap you need a key, in my case a PlayerEntity, if you want to store a BlockPos for each individual player then you will make a HashMap with PlayerEntity as the key and BlockPos as the value (HashMap<PlayerEntity, BlockPos>), then you will get the BlockPos by calling HashMap#get with your player as the parameter.

×
×
  • Create New...

Important Information

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