Skip to content

Commit

Permalink
Fix binder item not actually clearing selected block #77
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperMartijn642 committed Apr 19, 2024
1 parent 7993683 commit 9295e7a
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ public ItemUseResult interact(ItemStack stack, EntityPlayer player, EnumHand han
NBTTagCompound compound = stack.getTagCompound();
if(player.isSneaking() && compound != null && compound.getBoolean("bound")){
if(!level.isRemote){
stack.removeSubCompound("bound");
stack.removeSubCompound("dimension");
stack.removeSubCompound("boundx");
stack.removeSubCompound("boundy");
stack.removeSubCompound("boundz");
stack.removeSubCompound("blockstate");
NBTTagCompound data = stack.getTagCompound();
data.removeTag("bound");
data.removeTag("dimension");
data.removeTag("boundx");
data.removeTag("boundy");
data.removeTag("boundz");
data.removeTag("blockstate");
player.sendStatusMessage(TextComponents.translation("entangled.entangled_binder.clear").color(TextFormatting.YELLOW).get(), true);
}
return ItemUseResult.consume(stack);
Expand Down

0 comments on commit 9295e7a

Please sign in to comment.