@@ -86,30 +86,16 @@
|
||||
this.releaseAllPois();
|
||||
this.discard();
|
||||
} else {
|
||||
@@ -839,6 +864,13 @@
|
||||
return;
|
||||
@@ -904,7 +929,7 @@
|
||||
}).limit(5L).collect(Collectors.toList());
|
||||
|
||||
if (list1.size() >= j) {
|
||||
- if (SpawnUtil.trySpawnMob(EntityTypes.IRON_GOLEM, EnumMobSpawn.MOB_SUMMONED, worldserver, this.blockPosition(), 10, 8, 6, SpawnUtil.a.LEGACY_IRON_GOLEM).isPresent()) {
|
||||
+ if (SpawnUtil.trySpawnMob(EntityTypes.IRON_GOLEM, EnumMobSpawn.MOB_SUMMONED, worldserver, this.blockPosition(), 10, 8, 6, SpawnUtil.a.LEGACY_IRON_GOLEM, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE).isPresent()) { // CraftBukkit
|
||||
list.forEach(SensorGolemLastSeen::golemDetected);
|
||||
}
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ ItemStack remaining = new InventorySubcontainer(inventorysubcontainer).addItem(itemstack);
|
||||
+ if (CraftEventFactory.callEntityPickupItemEvent(this, entityitem, remaining.getCount(), false).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
this.onItemPickup(entityitem);
|
||||
this.take(entityitem, itemstack.getCount());
|
||||
ItemStack itemstack1 = inventorysubcontainer.addItem(itemstack);
|
||||
@@ -951,7 +983,7 @@
|
||||
|
||||
if (entityirongolem != null) {
|
||||
if (entityirongolem.checkSpawnRules(worldserver, EnumMobSpawn.MOB_SUMMONED) && entityirongolem.checkSpawnObstruction(worldserver)) {
|
||||
- worldserver.addFreshEntityWithPassengers(entityirongolem);
|
||||
+ worldserver.addFreshEntityWithPassengers(entityirongolem, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE); // CraftBukkit
|
||||
return entityirongolem;
|
||||
}
|
||||
|
||||
@@ -1029,7 +1061,7 @@
|
||||
@@ -961,7 +986,7 @@
|
||||
@Override
|
||||
public void startSleeping(BlockPosition blockposition) {
|
||||
super.startSleeping(blockposition);
|
||||
@@ -118,7 +104,7 @@
|
||||
this.brain.eraseMemory(MemoryModuleType.WALK_TARGET);
|
||||
this.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
|
||||
}
|
||||
@@ -1037,7 +1069,7 @@
|
||||
@@ -969,7 +994,7 @@
|
||||
@Override
|
||||
public void stopSleeping() {
|
||||
super.stopSleeping();
|
||||
|
||||
Reference in New Issue
Block a user