Skip to content

Commit

Permalink
try removing the tag instead of setting it to itself
Browse files Browse the repository at this point in the history
  • Loading branch information
demonlexe committed Aug 23, 2024
1 parent b306133 commit be6707f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/drzhark/mocreatures/MoCTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ public static void dismountPassengerFromEntity(Entity passenger, Entity entity,
MoCTools.playCustomSound(passenger, SoundEvents.ENTITY_CHICKEN_EGG);
if (entity instanceof EntityPlayer) {
NBTTagCompound tag = entity.getEntityData();
tag.setUniqueId("MOCEntity_Riding_Player", entity.getUniqueID()); // set to self, because cannot set to null.
tag.removeTag("MOCEntity_Riding_Player"); // remove the tag
if (IMoCEntity.class.isAssignableFrom(passenger.getClass())) {
((IMoCEntity) passenger).onStopRidingPlayer();
}
Expand Down

0 comments on commit be6707f

Please sign in to comment.