summaryrefslogtreecommitdiffstats
path: root/nms-patches/RegionLimitedWorldAccess.patch
blob: d820df05e942bc7e840d4f7ae767381410094a4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- a/net/minecraft/server/RegionLimitedWorldAccess.java
+++ b/net/minecraft/server/RegionLimitedWorldAccess.java
@@ -22,10 +22,10 @@
     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();
     });
 
@@ -201,7 +201,14 @@
         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);