Skip to content

Commit

Permalink
Add ExtendOBoots null check to ExtendOBootsItem
Browse files Browse the repository at this point in the history
  • Loading branch information
OutCraft-Mods committed Feb 4, 2023
1 parent c0d76b6 commit a949863
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public void onArmorTick(ItemStack stack, Level level, Player player) {
this.player = player;
if (stack.getOrCreateTag().getFloat("currentHeight") > 0) {
ExtendOBoots extendOBoots = this.ENTITIES.get(stack);
if (extendOBoots == null) {
if (extendOBoots == null || extendOBoots.isRemoved()) {
extendOBoots = new ExtendOBoots(EntityList.EXTEND_O_BOOTS.get(), this.player.getLevel());
extendOBoots.setPos(this.player.position());
extendOBoots.setPos(
this.player.position().subtract(0, stack.getOrCreateTag().getFloat("currentHeight"), 0));
extendOBoots.setYRot(this.player.getYRot());
this.player.getLevel().addFreshEntity(extendOBoots);
this.ENTITIES.put(stack, extendOBoots);
Expand Down

0 comments on commit a949863

Please sign in to comment.