mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
Update to mcdev rename revision 01 for 1.8.1
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
004a7aca08
commit
86526921b7
9 changed files with 48 additions and 49 deletions
|
@ -39,7 +39,7 @@
|
|||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>minecraft-server</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.1_01</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -154,7 +154,7 @@ public class CraftChunk implements Chunk {
|
|||
|
||||
if (includeBiome || includeBiomeTempRain) {
|
||||
WorldChunkManager wcm = chunk.world.getWorldChunkManager();
|
||||
BiomeBase[] biomeBase = wcm.b((BiomeBase[])null, getX() << 4, getZ() << 4, 16, 16);
|
||||
BiomeBase[] biomeBase = wcm.getBiomes((BiomeBase[])null, getX() << 4, getZ() << 4, 16, 16);
|
||||
|
||||
if (includeBiome) {
|
||||
biome = new BiomeBase[256];
|
||||
|
@ -164,10 +164,10 @@ public class CraftChunk implements Chunk {
|
|||
if (includeBiomeTempRain) {
|
||||
biomeTemp = new double[256];
|
||||
biomeRain = new double[256];
|
||||
float[] dat = wcm.a((float[]) null, getX() << 4, getZ() << 4, 16, 16);
|
||||
float[] dat = wcm.getTemperatures((float[]) null, getX() << 4, getZ() << 4, 16, 16);
|
||||
for(int i = 0; i < 256; i++)
|
||||
biomeTemp[i] = dat[i];
|
||||
dat = wcm.b((float[]) null, getX() << 4, getZ() << 4, 16, 16);
|
||||
dat = wcm.getWetness((float[]) null, getX() << 4, getZ() << 4, 16, 16);
|
||||
for(int i = 0; i < 256; i++)
|
||||
biomeRain[i] = dat[i];
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ public class CraftChunk implements Chunk {
|
|||
|
||||
if (includeBiome || includeBiomeTempRain) {
|
||||
WorldChunkManager wcm = world.getHandle().getWorldChunkManager();
|
||||
BiomeBase[] biomeBase = wcm.b((BiomeBase[])null, x << 4, z << 4, 16, 16);
|
||||
BiomeBase[] biomeBase = wcm.getBiomes((BiomeBase[])null, x << 4, z << 4, 16, 16);
|
||||
|
||||
if (includeBiome) {
|
||||
biome = new BiomeBase[256];
|
||||
|
@ -222,10 +222,10 @@ public class CraftChunk implements Chunk {
|
|||
if (includeBiomeTempRain) {
|
||||
biomeTemp = new double[256];
|
||||
biomeRain = new double[256];
|
||||
float[] dat = wcm.a((float[]) null, x << 4, z << 4, 16, 16);
|
||||
float[] dat = wcm.getTemperatures((float[]) null, x << 4, z << 4, 16, 16);
|
||||
for(int i = 0; i < 256; i++)
|
||||
biomeTemp[i] = dat[i];
|
||||
dat = wcm.b((float[]) null, x << 4, z << 4, 16, 16);
|
||||
dat = wcm.getWetness((float[]) null, x << 4, z << 4, 16, 16);
|
||||
for(int i = 0; i < 256; i++)
|
||||
biomeRain[i] = dat[i];
|
||||
}
|
||||
|
|
|
@ -32,9 +32,9 @@ public class CraftOfflinePlayer implements OfflinePlayer {
|
|||
if (value == isOp()) return;
|
||||
|
||||
if (value) {
|
||||
server.getHandle().e(getName().toLowerCase());
|
||||
server.getHandle().addOp(getName().toLowerCase());
|
||||
} else {
|
||||
server.getHandle().f(getName().toLowerCase());
|
||||
server.getHandle().removeOp(getName().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,21 +44,21 @@ public class CraftOfflinePlayer implements OfflinePlayer {
|
|||
|
||||
public void setBanned(boolean value) {
|
||||
if (value) {
|
||||
server.getHandle().a(name.toLowerCase());
|
||||
server.getHandle().addUserBan(name.toLowerCase());
|
||||
} else {
|
||||
server.getHandle().b(name.toLowerCase());
|
||||
server.getHandle().removeUserBan(name.toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isWhitelisted() {
|
||||
return server.getHandle().e().contains(name.toLowerCase());
|
||||
return server.getHandle().getWhitelisted().contains(name.toLowerCase());
|
||||
}
|
||||
|
||||
public void setWhitelisted(boolean value) {
|
||||
if (value) {
|
||||
server.getHandle().k(name.toLowerCase());
|
||||
server.getHandle().addWhitelist(name.toLowerCase());
|
||||
} else {
|
||||
server.getHandle().l(name.toLowerCase());
|
||||
server.getHandle().removeWhitelist(name.toLowerCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -366,7 +366,7 @@ public final class CraftServer implements Server {
|
|||
console.propertyManager = config;
|
||||
|
||||
boolean animals = config.getBoolean("spawn-animals", console.spawnAnimals);
|
||||
boolean monsters = config.getBoolean("spawn-monsters", console.worlds.get(0).spawnMonsters > 0);
|
||||
boolean monsters = config.getBoolean("spawn-monsters", console.worlds.get(0).difficulty > 0);
|
||||
|
||||
console.onlineMode = config.getBoolean("online-mode", console.onlineMode);
|
||||
console.spawnAnimals = config.getBoolean("spawn-animals", console.spawnAnimals);
|
||||
|
@ -374,7 +374,7 @@ public final class CraftServer implements Server {
|
|||
console.allowFlight = config.getBoolean("allow-flight", console.allowFlight);
|
||||
|
||||
for (WorldServer world : console.worlds) {
|
||||
world.spawnMonsters = monsters ? 1 : 0;
|
||||
world.difficulty = monsters ? 1 : 0;
|
||||
world.setSpawnFlags(monsters, animals);
|
||||
}
|
||||
|
||||
|
@ -506,7 +506,7 @@ public final class CraftServer implements Server {
|
|||
|
||||
internal.tracker = new EntityTracker(console, dimension);
|
||||
internal.addIWorldAccess((IWorldAccess) new WorldManager(console, internal));
|
||||
internal.spawnMonsters = 1;
|
||||
internal.difficulty = 1;
|
||||
internal.setSpawnFlags(true, true);
|
||||
console.worlds.add(internal);
|
||||
|
||||
|
@ -757,7 +757,7 @@ public final class CraftServer implements Server {
|
|||
}
|
||||
|
||||
public void shutdown() {
|
||||
console.a();
|
||||
console.safeShutdown();
|
||||
}
|
||||
|
||||
public int broadcast(String message, String permission) {
|
||||
|
@ -790,11 +790,11 @@ public final class CraftServer implements Server {
|
|||
}
|
||||
|
||||
public void banIP(String address) {
|
||||
server.c(address);
|
||||
server.addIpBan(address);
|
||||
}
|
||||
|
||||
public void unbanIP(String address) {
|
||||
server.d(address);
|
||||
server.removeIpBan(address);
|
||||
}
|
||||
|
||||
public Set<OfflinePlayer> getBannedPlayers() {
|
||||
|
@ -808,15 +808,14 @@ public final class CraftServer implements Server {
|
|||
}
|
||||
|
||||
public void setWhitelist(boolean value) {
|
||||
server.o = value;
|
||||
console.propertyManager.b("white-list", value);
|
||||
console.propertyManager.savePropertiesFile();
|
||||
server.hasWhitelist = value;
|
||||
console.propertyManager.setBoolean("white-list", value);
|
||||
}
|
||||
|
||||
public Set<OfflinePlayer> getWhitelistedPlayers() {
|
||||
Set<OfflinePlayer> result = new HashSet<OfflinePlayer>();
|
||||
|
||||
for (Object name : server.e()) {
|
||||
for (Object name : server.getWhitelisted()) {
|
||||
result.add(getOfflinePlayer((String)name));
|
||||
}
|
||||
|
||||
|
@ -824,11 +823,11 @@ public final class CraftServer implements Server {
|
|||
}
|
||||
|
||||
public void reloadWhitelist() {
|
||||
server.f();
|
||||
server.reloadWhitelist();
|
||||
}
|
||||
|
||||
public GameMode getDefaultGameMode() {
|
||||
return GameMode.getByValue(console.worlds.get(0).worldData.p);
|
||||
return GameMode.getByValue(console.worlds.get(0).worldData.getGameType());
|
||||
}
|
||||
|
||||
public void setDefaultGameMode(GameMode mode) {
|
||||
|
@ -837,7 +836,7 @@ public final class CraftServer implements Server {
|
|||
}
|
||||
|
||||
for (World world : getWorlds()) {
|
||||
((CraftWorld)world).getHandle().worldData.p = mode.getValue();
|
||||
((CraftWorld)world).getHandle().worldData.setGameType(mode.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -561,20 +561,20 @@ public class CraftWorld implements World {
|
|||
}
|
||||
|
||||
public void save() {
|
||||
boolean oldSave = world.canSave;
|
||||
boolean oldSave = world.savingDisabled;
|
||||
|
||||
world.canSave = false;
|
||||
world.savingDisabled = false;
|
||||
world.save(true, null);
|
||||
|
||||
world.canSave = oldSave;
|
||||
world.savingDisabled = oldSave;
|
||||
}
|
||||
|
||||
public boolean isAutoSave() {
|
||||
return !world.canSave;
|
||||
return !world.savingDisabled;
|
||||
}
|
||||
|
||||
public void setAutoSave(boolean value) {
|
||||
world.canSave = !value;
|
||||
world.savingDisabled = !value;
|
||||
}
|
||||
|
||||
public boolean hasStorm() {
|
||||
|
@ -767,7 +767,7 @@ public class CraftWorld implements World {
|
|||
// what is this, I don't even
|
||||
} else if (Fish.class.isAssignableFrom(clazz)) {
|
||||
// this is not a fish, it's a bobber, and it's probably useless
|
||||
entity = new EntityFish(world);
|
||||
entity = new EntityFishingHook(world);
|
||||
entity.setLocation(x, y, z, pitch, yaw);
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||
else if (entity instanceof EntityEgg) { return new CraftEgg(server, (EntityEgg) entity); }
|
||||
else if (entity instanceof EntityFallingSand) { return new CraftFallingSand(server, (EntityFallingSand) entity); }
|
||||
else if (entity instanceof EntityFireball) { return new CraftFireball(server, (EntityFireball) entity); }
|
||||
else if (entity instanceof EntityFish) { return new CraftFish(server, (EntityFish) entity); }
|
||||
else if (entity instanceof EntityFishingHook) { return new CraftFish(server, (EntityFishingHook) entity); }
|
||||
else if (entity instanceof EntityItem) { return new CraftItem(server, (EntityItem) entity); }
|
||||
else if (entity instanceof EntityWeather) {
|
||||
if (entity instanceof EntityWeatherStorm) {
|
||||
|
|
|
@ -50,7 +50,7 @@ public class CraftFireball extends AbstractProjectile implements Fireball {
|
|||
}
|
||||
|
||||
public Vector getDirection() {
|
||||
return new Vector(((EntityFireball) getHandle()).c, ((EntityFireball) getHandle()).d, ((EntityFireball) getHandle()).e);
|
||||
return new Vector(((EntityFireball) getHandle()).dirX, ((EntityFireball) getHandle()).dirY, ((EntityFireball) getHandle()).dirZ);
|
||||
}
|
||||
|
||||
public void setDirection(Vector direction) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import net.minecraft.server.EntityFish;
|
||||
import net.minecraft.server.EntityFishingHook;
|
||||
import net.minecraft.server.EntityHuman;
|
||||
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.entity.Fish;
|
|||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
public class CraftFish extends AbstractProjectile implements Fish {
|
||||
public CraftFish(CraftServer server, EntityFish entity) {
|
||||
public CraftFish(CraftServer server, EntityFishingHook entity) {
|
||||
super(server, entity);
|
||||
}
|
||||
|
||||
|
@ -18,8 +18,8 @@ public class CraftFish extends AbstractProjectile implements Fish {
|
|||
}
|
||||
|
||||
public LivingEntity getShooter() {
|
||||
if (((EntityFish) getHandle()).owner != null) {
|
||||
return (LivingEntity) ((EntityFish) getHandle()).owner.getBukkitEntity();
|
||||
if (((EntityFishingHook) getHandle()).owner != null) {
|
||||
return (LivingEntity) ((EntityFishingHook) getHandle()).owner.getBukkitEntity();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -28,7 +28,7 @@ public class CraftFish extends AbstractProjectile implements Fish {
|
|||
|
||||
public void setShooter(LivingEntity shooter) {
|
||||
if (shooter instanceof CraftHumanEntity) {
|
||||
((EntityFish) getHandle()).owner = (EntityHuman) ((CraftHumanEntity) shooter).entity;
|
||||
((EntityFishingHook) getHandle()).owner = (EntityHuman) ((CraftHumanEntity) shooter).entity;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,9 +47,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
if (value == isOp()) return;
|
||||
|
||||
if (value) {
|
||||
server.getHandle().e(getName());
|
||||
server.getHandle().addOp(getName());
|
||||
} else {
|
||||
server.getHandle().f(getName());
|
||||
server.getHandle().removeOp(getName());
|
||||
}
|
||||
|
||||
perm.recalculatePermissions();
|
||||
|
@ -299,11 +299,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
}
|
||||
|
||||
public boolean isSprinting() {
|
||||
return getHandle().at();
|
||||
return getHandle().isSprinting();
|
||||
}
|
||||
|
||||
public void setSprinting(boolean sprinting) {
|
||||
getHandle().g(sprinting);
|
||||
getHandle().setSprinting(sprinting);
|
||||
}
|
||||
|
||||
public void loadData() {
|
||||
|
@ -398,21 +398,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
|
||||
public void setBanned(boolean value) {
|
||||
if (value) {
|
||||
server.getHandle().a(getName().toLowerCase());
|
||||
server.getHandle().addUserBan(getName().toLowerCase());
|
||||
} else {
|
||||
server.getHandle().b(getName().toLowerCase());
|
||||
server.getHandle().removeUserBan(getName().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isWhitelisted() {
|
||||
return server.getHandle().e().contains(getName().toLowerCase());
|
||||
return server.getHandle().getWhitelisted().contains(getName().toLowerCase());
|
||||
}
|
||||
|
||||
public void setWhitelisted(boolean value) {
|
||||
if (value) {
|
||||
server.getHandle().k(getName().toLowerCase());
|
||||
server.getHandle().addWhitelist(getName().toLowerCase());
|
||||
} else {
|
||||
server.getHandle().l(getName().toLowerCase());
|
||||
server.getHandle().removeWhitelist(getName().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue