Skip to content

Commit

Permalink
Merge pull request #177 from Elite-Modding-Team/148-bunny-off-head-sa…
Browse files Browse the repository at this point in the history
…fely

148 - Bunny bug fixes
  • Loading branch information
demonlexe authored Aug 21, 2024
2 parents d1315a0 + d256f0f commit 1e2251d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/main/java/drzhark/mocreatures/MoCTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -1228,10 +1228,7 @@ public static void dismountPassengerFromEntity(Entity passenger, Entity entity,
if (force || (passenger instanceof EntityLivingBase && entity.isSneaking())) {
System.out.println("Forcing dismount from " + entity + " for passenger " + passenger);
passenger.dismountRidingEntity();
double dist = (-1.5D);
double newPosX = entity.posX + (dist * Math.sin(((EntityLivingBase) entity).renderYawOffset / 57.29578F));
double newPosZ = entity.posZ - (dist * Math.cos(((EntityLivingBase) entity).renderYawOffset / 57.29578F));
passenger.setPositionAndUpdate(newPosX, entity.posY + 2D, newPosZ);
passenger.setPositionAndUpdate(entity.posX, entity.posY + 1D, entity.posZ);
MoCTools.playCustomSound(passenger, SoundEvents.ENTITY_CHICKEN_EGG);
if (entity instanceof EntityPlayer) {
NBTTagCompound tag = entity.getEntityData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.math.BlockPos;

import java.util.ArrayList;
import java.util.BitSet;
import java.util.UUID;
import java.util.*;

public class MoCPetData {

@SuppressWarnings("unused")
private final UUID ownerUniqueId;
private final BitSet idMap = new BitSet(Long.SIZE << 4);
private final ArrayList<Integer> usedPetIds = new ArrayList<>();
private final Set<Integer> usedPetIds = new HashSet<>();
private NBTTagCompound ownerData = new NBTTagCompound();
private NBTTagList tamedList = new NBTTagList();

Expand Down

0 comments on commit 1e2251d

Please sign in to comment.