Update PickupHandler.java
Removed redundant EntityTameable check from within code already covered by another EntityTameable check (would always be "true" anyways). Removed redundant EntityTameable check and contents from within the "else" of same outer check (else means it's already failed, and will never succeed this check or run the code within it anyways).
This commit is contained in:
parent
b0e694f024
commit
afe45abd1b
|
|
@ -231,14 +231,9 @@ public class PickupHandler
|
|||
double distance = pos.distanceSqToCenter(player.posX, player.posY + 0.5, player.posZ);
|
||||
if (distance < Math.pow(CarryOnConfig.settings.maxDistance, 2))
|
||||
{
|
||||
if (toPickUp instanceof EntityTameable)
|
||||
{
|
||||
EntityTameable tame = (EntityTameable) toPickUp;
|
||||
UUID owner = tame.getOwnerId();
|
||||
UUID playerID = player.getUUID(player.getGameProfile());
|
||||
if (owner != null && !owner.equals(playerID))
|
||||
return false;
|
||||
}
|
||||
UUID playerID = player.getUUID(player.getGameProfile());
|
||||
if (OwnerCheck != null && !OwnerCheck.equals(playerID))
|
||||
return false;
|
||||
|
||||
if (CustomPickupOverrideHandler.hasSpecialPickupConditions(toPickUp))
|
||||
{
|
||||
|
|
@ -299,15 +294,6 @@ public class PickupHandler
|
|||
double distance = pos.distanceSqToCenter(player.posX, player.posY + 0.5, player.posZ);
|
||||
if (distance < Math.pow(CarryOnConfig.settings.maxDistance, 2))
|
||||
{
|
||||
if (toPickUp instanceof EntityTameable)
|
||||
{
|
||||
EntityTameable tame = (EntityTameable) toPickUp;
|
||||
UUID owner = tame.getOwnerId();
|
||||
UUID playerID = player.getUUID(player.getGameProfile());
|
||||
if (owner != null && !owner.equals(playerID))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (CustomPickupOverrideHandler.hasSpecialPickupConditions(toPickUp))
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user