3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/RegionLimitedWorldAccess.patch

31 Zeilen
1.2 KiB
Diff

2018-07-15 02:00:00 +02:00
--- a/net/minecraft/server/RegionLimitedWorldAccess.java
+++ b/net/minecraft/server/RegionLimitedWorldAccess.java
2018-08-26 04:00:00 +02:00
@@ -22,10 +22,10 @@
2018-07-15 02:00:00 +02:00
private final Random k;
private final WorldProvider l;
private final GeneratorSettings m;
- private final TickList<Block> n = new TickListWorldGen((blockposition) -> {
+ private final TickList<Block> n = new TickListWorldGen<>((blockposition) -> { // CraftBukkit - decompile error
return this.y(blockposition).k();
});
- private final TickList<FluidType> o = new TickListWorldGen((blockposition) -> {
+ private final TickList<FluidType> o = new TickListWorldGen<>((blockposition) -> { // CraftBukkit - decompile error
return this.y(blockposition).l();
});
2018-08-26 04:00:00 +02:00
@@ -201,7 +201,14 @@
2018-07-15 02:00:00 +02:00
this.y(blockposition).e(blockposition);
}
+ // CraftBukkit start
public boolean addEntity(Entity entity) {
+ return addEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
+ }
+
+ @Override
+ public boolean addEntity(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
+ // CraftBukkit end
int i = MathHelper.floor(entity.locX / 16.0D);
int j = MathHelper.floor(entity.locZ / 16.0D);