Jump to content

poopoodice

Members
  • Posts

    1160
  • Joined

  • Days Won

    7

Everything posted by poopoodice

  1. I wonder if write() is getting called? because you've override @Override public CompoundNBT serializeNBT() { CompoundNBT nbt = new CompoundNBT(); System.out.println("serialize"); return nbt; } @Override public void deserializeNBT(CompoundNBT nbt) { System.out.println("deserialize"); } and before that serializeNBT calles write(), and desrializeNBT calls read(). Not sure if it's related tho
  2. you misunderstood what I mean. if (entity.getActiveItemStack().getItem() instanceof BaseBow) { return 0F; } else { return (float)(stack.getUseDuration() - entity.getItemInUseCount()) / 20F; } } change the 0F to 1F does not matter because what are you trying to do is to change the bow's model correspond to the bow's pulling duration (time pulled), which you've done that in the else statement. But the else statement is never going to be reached because the item you are holding is an instance of the custom bow class so it will always return the value in the if statement
  3. it does? what I mean is { "predicate": { "pulling": 1, "pull": 0.65 }, "model": "otherutilities:item/diamond_bow_pulling_1" }, { "predicate": { "pulling": 1, "pull": 0.9 }, "model": "otherutilities:item/diamond_bow_pulling_2" } ] pull is always 0 which < 0.65 and 0.9
  4. well.. if the item is your custom bow it will always return 0....
  5. Yep, you should add 0 since iirc it will fit the criteria when the value given is larger or equal to the predicate value. Anyways, I remember that forge doc has a explanation on this and you might want to have a look at it.
  6. I think you will need to specify the pull value in the first predicate even if it's 0
  7. the item models needs to be under models/item and you have them in wood which I dont think they will work unless you specify their position
  8. I added them via vanilla command, I'm also pretty sure that they are in the same team because when using /team list it shows both of them
  9. Hi, I wonder if there's a way to get player's team on client? I don't know if I've done something wrong but although the players are in the same team, whenever I call entity.getTeam the teams they are in are always different (which entity.isOnSameTeam() returns false). Thanks for any help or tips.
  10. get command dispatcher using getCommandDispatcher()
  11. "rolls": 1, you also need a name https://mcforge.readthedocs.io/en/1.13.x/items/loot_tables/#overview
  12. https://minecraft-el.gamepedia.com/Loot_table
  13. I used reflection to replace the player model's layers and do the rotations and translations in the replaced render method
  14. that's not enough, you need to actually implement the blockstate you can declare what the default state is by putting this in ur constructor. setDefaultState(getDefaultState() .with(HORIZONTAL_FACING, Direction.NORTH) and override this so it knows that you have the facing as one of your blockstate @Override protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { builder.add(HORIZONTAL_FACING); } and by overriding this @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return this.getDefaultState() .with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing()); } when placed this gets called, and return the state that has the facing corresponds to the player's horizontal facing.
  15. extend your block class to HorizontalBlock if it is what you need (which looks right to you), otherwise see how other vanilla blocks does it.
  16. Ok, so if you want your block to have facing property, you will need to create one. if not just use "": { "model": "...." }
  17. you have to specify the type, which should be facing=north
  18. world.addParticle
  19. The link I sent already include that except the rotation pitch
  20. I'm not so sure but I just have a quick look in PathNavigator func_225464_a line 138, it seems like the destination is extended to an 3x3 area and I think that might be the issue
×
×
  • Create New...

Important Information

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