mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Update to Minecraft 1.8.3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/MobSpawnerAbstract.java 2015-01-18 01:59:59.240758959 -0600
|
||||
+++ src/main/java/net/minecraft/server/MobSpawnerAbstract.java 2015-01-18 01:59:59.244758959 -0600
|
||||
@@ -4,6 +4,8 @@
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/MobSpawnerAbstract.java 2015-02-26 22:40:22.887608136 +0000
|
||||
+++ src/main/java/net/minecraft/server/MobSpawnerAbstract.java 2015-02-26 22:40:22.887608136 +0000
|
||||
@@ -4,9 +4,11 @@
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -8,17 +8,24 @@
|
||||
+
|
||||
public abstract class MobSpawnerAbstract {
|
||||
|
||||
public int spawnDelay = 20;
|
||||
@@ -24,6 +26,11 @@
|
||||
- private int spawnDelay = 20;
|
||||
+ public int spawnDelay = 20; // CraftBukkit - public
|
||||
private String mobName = "Pig";
|
||||
private final List<MobSpawnerAbstract.a> mobs = Lists.newArrayList();
|
||||
private MobSpawnerAbstract.a spawnData;
|
||||
@@ -22,8 +24,13 @@
|
||||
|
||||
public String getMobName() {
|
||||
public MobSpawnerAbstract() {}
|
||||
|
||||
- private String getMobName() {
|
||||
+ public String getMobName() { // CraftBukkit - public
|
||||
if (this.i() == null) {
|
||||
+ // CraftBukkit start - fix NPE
|
||||
+ if (this.mobName == null) {
|
||||
+ this.mobName = "Pig";
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (this.mobName.equals("Minecart")) {
|
||||
if (this.mobName != null && this.mobName.equals("Minecart")) {
|
||||
this.mobName = "MinecartRideable";
|
||||
}
|
||||
@@ -129,7 +136,7 @@
|
||||
@@ -39,13 +46,10 @@
|
||||
}
|
||||
|
||||
entity1.mount(entity2);
|
||||
@@ -162,9 +169,9 @@
|
||||
|
||||
entity1 = entity2;
|
||||
@@ -167,7 +174,7 @@
|
||||
((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), (GroupDataEntity) null);
|
||||
}
|
||||
- } else if (entity instanceof EntityLiving && entity.world != null && flag) {
|
||||
+ } else if (entity instanceof EntityInsentient && entity.world != null && flag) { // CraftBukkit - EntityLiving -> EntityInsentient
|
||||
((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), (GroupDataEntity) null);
|
||||
|
||||
- entity.world.addEntity(entity);
|
||||
+ entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
||||
}
|
||||
|
Reference in New Issue
Block a user