geforkt von Mirrors/Paper
revert change to make mobspawners drop a spawner of that type
removed some debug code fixed a 1.5 compatibility issue
Dieser Commit ist enthalten in:
Ursprung
935313dea7
Commit
b73d095a9f
@ -17,7 +17,7 @@ public class BlockMobSpawner extends BlockContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int a(Random random) {
|
public int a(Random random) {
|
||||||
return 1; // CraftBukkit
|
return 0; // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
@ -29,7 +29,7 @@ public class EntityTypes {
|
|||||||
entity = (Entity) oclass.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
|
entity = (Entity) oclass.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
exception.printStackTrace();
|
// CraftBukkit - don't do anything here
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
@ -45,7 +45,7 @@ public class EntityTypes {
|
|||||||
entity = (Entity) oclass.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
|
entity = (Entity) oclass.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
exception.printStackTrace();
|
// CraftBukkit - don't do anything here
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
|
@ -28,11 +28,10 @@ public class TileEntityMobSpawner extends TileEntity {
|
|||||||
|
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
mobName = EntityTypes.getNameFromClass(EntityTypes.getClassFromId(id));
|
mobName = EntityTypes.getNameFromClass(EntityTypes.getClassFromId(id));
|
||||||
if(mobName == null || mobName.isEmpty()) mobName = "Pig";
|
if (mobName == null || mobName.length() == 0) {
|
||||||
try {
|
mobName = "Pig";
|
||||||
EntityTypes.a(mobName, world);
|
|
||||||
}
|
}
|
||||||
catch (Throwable t) { // If we get any error at all, fallback to a Pig
|
if (EntityTypes.a(mobName, world) == null) {
|
||||||
mobName = "Pig";
|
mobName = "Pig";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren