Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Fix balance of CraftBukkit start/end.
Dieser Commit ist enthalten in:
Ursprung
897551e39e
Commit
7d0e739f96
@ -43,7 +43,7 @@ public class ConsoleLogManager {
|
||||
int count = ((Integer)server.options.valueOf("log-count")).intValue();
|
||||
boolean append = ((Boolean)server.options.valueOf("log-append")).booleanValue();
|
||||
FileHandler filehandler = new FileHandler(pattern, limit, count, append);
|
||||
// CraftBukkit start
|
||||
// CraftBukkit end
|
||||
|
||||
filehandler.setFormatter(consolelogformatter);
|
||||
a.addHandler(filehandler);
|
||||
|
@ -46,7 +46,7 @@ public class EntityFireball extends Entity {
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
this.height = 0.0F;
|
||||
this.motX = this.motY = this.motZ = 0.0D;
|
||||
// CraftBukkit start (added setDirection method)
|
||||
// CraftBukkit start - (added setDirection method)
|
||||
this.setDirection(d0, d1, d2);
|
||||
}
|
||||
|
||||
@ -60,6 +60,7 @@ public class EntityFireball extends Entity {
|
||||
this.dirY = d1 / d3 * 0.1D;
|
||||
this.dirZ = d2 / d3 * 0.1D;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public void w_() {
|
||||
super.w_();
|
||||
|
@ -513,7 +513,7 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
this.motX *= this.derailedX;
|
||||
this.motY *= this.derailedY;
|
||||
this.motZ *= this.derailedZ;
|
||||
// CraftBukkit start
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
this.move(this.motX, this.motY, this.motZ);
|
||||
@ -522,7 +522,7 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
this.motX *= this.flyingX;
|
||||
this.motY *= this.flyingY;
|
||||
this.motZ *= this.flyingZ;
|
||||
// CraftBukkit start
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.b.serverConfigurationManager.sendAll(new Packet3Chat(event.getDeathMessage()));
|
||||
}
|
||||
|
||||
// CraftBukkit - we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
|
||||
// CraftBukkit start - we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
|
||||
for (int i = 0; i < this.inventory.items.length; ++i) {
|
||||
this.inventory.items[i] = null;
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ public class EntityWolf extends EntityAnimal {
|
||||
}
|
||||
|
||||
if (!this.world.isStatic) {
|
||||
// CraftBukkit - added event call and isCancelled check.
|
||||
// CraftBukkit start - added event call and isCancelled check.
|
||||
if (this.random.nextInt(3) == 0 && !CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) {
|
||||
// CraftBukkit end
|
||||
this.setTamed(true);
|
||||
|
@ -39,7 +39,7 @@ public final class ItemStack {
|
||||
this.setData(k); // CraftBukkit
|
||||
}
|
||||
|
||||
// CraftBukkit - used to create a new ItemStack, specifying the enchantments at time of creation.
|
||||
// CraftBukkit start - used to create a new ItemStack, specifying the enchantments at time of creation.
|
||||
public ItemStack(int id, int count, int data, NBTTagList enchantments) {
|
||||
this(id, count, data);
|
||||
// taken from .addEnchantment
|
||||
|
@ -206,7 +206,6 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
|
||||
|
||||
j = WorldSettings.a(j);
|
||||
log.info("Default game type: " + j);
|
||||
|
||||
// CraftBukkit start (+ removed worldsettings and servernbtmanager)
|
||||
int worldCount = 3;
|
||||
|
||||
@ -223,13 +222,12 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
|
||||
}
|
||||
|
||||
if (k == 2) {
|
||||
// CraftBukkit start (+ don't do this in server.properties, do it in bukkit.yml)
|
||||
// CraftBukkit - (+ don't do this in server.properties, do it in bukkit.yml)
|
||||
if (this.server.getAllowEnd()) {
|
||||
dimension = 1;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
String worldType = Environment.getEnvironment(dimension).toString().toLowerCase();
|
||||
|
@ -111,7 +111,7 @@ public class ServerConfigurationManager {
|
||||
}
|
||||
|
||||
public void c(EntityPlayer entityplayer) {
|
||||
// CraftBukkit
|
||||
// CraftBukkit start
|
||||
cserver.detectListNameConflict(entityplayer);
|
||||
this.sendAll(new Packet201PlayerInfo(entityplayer.listName, true, 1000));
|
||||
// CraftBukkit end
|
||||
@ -223,6 +223,7 @@ public class ServerConfigurationManager {
|
||||
}
|
||||
|
||||
public EntityPlayer moveToWorld(EntityPlayer entityplayer, int i, boolean flag, Location location) {
|
||||
// CraftBukkit end
|
||||
this.server.getTracker(entityplayer.dimension).untrackPlayer(entityplayer);
|
||||
// this.server.getTracker(entityplayer.dimension).untrackEntity(entityplayer); // CraftBukkit
|
||||
this.getPlayerManager(entityplayer.dimension).removePlayer(entityplayer);
|
||||
|
@ -2421,11 +2421,9 @@ public class World implements IBlockAccess {
|
||||
Entity entity = null;
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
entity = (Entity) list.get(i);
|
||||
// CraftBukkit start - fixed an NPE
|
||||
if (entity == null) {
|
||||
continue;
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.entityList.add(entity);
|
||||
// CraftBukkit end
|
||||
this.c((Entity) list.get(i));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren