mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-27 19:24:43 +02:00
Fixes
Possible fix for trim: #482 Fixes #480 Possible fix for #481 Reduce plot move debugspam
This commit is contained in:
@ -58,6 +58,18 @@ public class EntityWrapper {
|
||||
private HorseStats horse;
|
||||
private ArmorStandStats stand;
|
||||
|
||||
private int hash;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return hash == obj.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public void storeInventory(final InventoryHolder held) {
|
||||
this.inventory = held.getInventory().getContents().clone();
|
||||
}
|
||||
@ -158,6 +170,7 @@ public class EntityWrapper {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public EntityWrapper(final org.bukkit.entity.Entity entity, final short depth) {
|
||||
this.hash = entity.getEntityId();
|
||||
this.depth = depth;
|
||||
final Location loc = entity.getLocation();
|
||||
this.yaw = loc.getYaw();
|
||||
@ -372,9 +385,6 @@ public class EntityWrapper {
|
||||
if (stand.isSmall()) {
|
||||
this.stand.small = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
case ENDERMITE: // NEW
|
||||
@ -421,6 +431,14 @@ public class EntityWrapper {
|
||||
case LEASH_HITCH: {
|
||||
return null;
|
||||
}
|
||||
case ITEM_FRAME: {
|
||||
entity = world.spawn(loc, ItemFrame.class);
|
||||
break;
|
||||
}
|
||||
case PAINTING: {
|
||||
entity = world.spawn(loc, Painting.class);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
entity = world.spawnEntity(loc, type);
|
||||
break;
|
||||
|
@ -114,6 +114,7 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
case 54:
|
||||
case 130:
|
||||
case 142:
|
||||
case 132:
|
||||
case 27:
|
||||
case 137:
|
||||
case 52:
|
||||
@ -124,6 +125,7 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
case 138:
|
||||
case 176:
|
||||
case 177:
|
||||
case 119:
|
||||
case 63:
|
||||
case 68:
|
||||
case 323:
|
||||
@ -261,9 +263,11 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
block.setData(data);
|
||||
return;
|
||||
}
|
||||
// blockstate
|
||||
switch(currentId) {
|
||||
case 54:
|
||||
case 130:
|
||||
case 132:
|
||||
case 142:
|
||||
case 27:
|
||||
case 137:
|
||||
@ -279,6 +283,7 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
case 68:
|
||||
case 323:
|
||||
case 117:
|
||||
case 119:
|
||||
case 116:
|
||||
case 28:
|
||||
case 66:
|
||||
|
Reference in New Issue
Block a user