Mappings Update

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-12-13 11:00:00 +11:00
parent 8817bc22d9
commit 83baf22bde
80 changed files with 469 additions and 518 deletions

View File

@@ -39,7 +39,7 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
@Override
public Collection<ItemStack> populateLoot(Random random, LootContext context) {
LootTableInfo nmsContext = convertContext(context);
List<net.minecraft.server.ItemStack> nmsItems = handle.a(random, nmsContext); // PAIL rename populateLoot
List<net.minecraft.server.ItemStack> nmsItems = handle.populateLoot(random, nmsContext);
Collection<ItemStack> bukkit = new ArrayList<>(nmsItems.size());
for (net.minecraft.server.ItemStack item : nmsItems) {
@@ -59,7 +59,7 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
IInventory handle = craftInventory.getInventory();
// TODO: When events are added, call event here w/ custom reason?
getHandle().a(handle, random, nmsContext); // PAIL rename fillInventory
getHandle().fillInventory(handle, random, nmsContext);
}
@Override

View File

@@ -962,7 +962,7 @@ public final class CraftServer implements Server {
}
BlockPosition chunkcoordinates = internal.getSpawn();
internal.getChunkProviderServer().getChunkAt(chunkcoordinates.getX() + j >> 4, chunkcoordinates.getZ() + k >> 4, true, true);
internal.getChunkProvider().getChunkAt(chunkcoordinates.getX() + j >> 4, chunkcoordinates.getZ() + k >> 4, true, true);
}
}
}
@@ -978,7 +978,7 @@ public final class CraftServer implements Server {
long k = longiterator.nextLong();
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(k);
internal.getChunkProviderServer().getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, true, true);
internal.getChunkProvider().getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, true, true);
}
}

View File

@@ -140,7 +140,7 @@ public class CraftWorld implements World {
}
public Chunk getChunkAt(int x, int z) {
return this.world.getChunkProviderServer().getChunkAt(x, z, true, true).bukkitChunk;
return this.world.getChunkProvider().getChunkAt(x, z, true, true).bukkitChunk;
}
public Chunk getChunkAt(Block block) {
@@ -148,16 +148,16 @@ public class CraftWorld implements World {
}
public boolean isChunkLoaded(int x, int z) {
return world.getChunkProviderServer().isLoaded(x, z);
return world.getChunkProvider().isLoaded(x, z);
}
@Override
public boolean isChunkGenerated(int x, int z) {
return isChunkLoaded(x, z) || ((ChunkRegionLoader) world.getChunkProviderServer().chunkLoader).chunkExists(x, z);
return isChunkLoaded(x, z) || ((ChunkRegionLoader) world.getChunkProvider().chunkLoader).chunkExists(x, z);
}
public Chunk[] getLoadedChunks() {
Object[] chunks = world.getChunkProviderServer().chunks.values().toArray();
Object[] chunks = world.getChunkProvider().chunks.values().toArray();
org.bukkit.Chunk[] craftChunks = new CraftChunk[chunks.length];
for (int i = 0; i < chunks.length; i++) {
@@ -193,9 +193,9 @@ public class CraftWorld implements World {
return false;
}
net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkAt(x, z, false, false);
net.minecraft.server.Chunk chunk = world.getChunkProvider().getChunkAt(x, z, false, false);
if (chunk != null) {
world.getChunkProviderServer().unload(chunk);
world.getChunkProvider().unload(chunk);
}
return true;
@@ -210,13 +210,13 @@ public class CraftWorld implements World {
}
private boolean unloadChunk0(int x, int z, boolean save) {
net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkAt(x, z, false, false);
net.minecraft.server.Chunk chunk = world.getChunkProvider().getChunkAt(x, z, false, false);
if (chunk == null) {
return true;
}
// If chunk had previously been queued to save, must do save to avoid loss of that data
return world.getChunkProviderServer().unloadChunk(chunk, chunk.mustSave || save);
return world.getChunkProvider().unloadChunk(chunk, chunk.mustSave || save);
}
public boolean regenerateChunk(int x, int z) {
@@ -225,9 +225,9 @@ public class CraftWorld implements World {
}
final long chunkKey = ChunkCoordIntPair.a(x, z);
world.getChunkProviderServer().unloadQueue.remove(chunkKey);
world.getChunkProvider().unloadQueue.remove(chunkKey);
net.minecraft.server.Chunk chunk = world.getChunkProviderServer().generateChunk(x, z);
net.minecraft.server.Chunk chunk = world.getChunkProvider().generateChunk(x, z);
PlayerChunk playerChunk = world.getPlayerChunkMap().getChunk(x, z);
if (playerChunk != null) {
playerChunk.chunk = chunk;
@@ -266,7 +266,7 @@ public class CraftWorld implements World {
public boolean loadChunk(int x, int z, boolean generate) {
chunkLoadCount++;
return world.getChunkProviderServer().getChunkAt(x, z, true, generate) != null;
return world.getChunkProvider().getChunkAt(x, z, true, generate) != null;
}
public boolean isChunkLoaded(Chunk chunk) {
@@ -1723,7 +1723,7 @@ public class CraftWorld implements World {
@Override
public Location locateNearestStructure(Location origin, StructureType structureType, int radius, boolean findUnexplored) {
BlockPosition originPos = new BlockPosition(origin.getX(), origin.getY(), origin.getZ());
BlockPosition nearest = getHandle().getChunkProviderServer().getChunkGenerator().findNearestMapFeature(getHandle(), structureType.getName(), originPos, radius, findUnexplored);
BlockPosition nearest = getHandle().getChunkProvider().getChunkGenerator().findNearestMapFeature(getHandle(), structureType.getName(), originPos, radius, findUnexplored);
return (nearest == null) ? null : new Location(this, nearest.getX(), nearest.getY(), nearest.getZ());
}
@@ -1738,7 +1738,7 @@ public class CraftWorld implements World {
return;
}
ChunkProviderServer cps = world.getChunkProviderServer();
ChunkProviderServer cps = world.getChunkProvider();
for (net.minecraft.server.Chunk chunk : cps.chunks.values()) {
// If in use, skip it
if (isChunkInUse(chunk.locX, chunk.locZ)) {

View File

@@ -28,11 +28,11 @@ public class CraftEndermite extends CraftMonster implements Endermite {
@Override
public boolean isPlayerSpawned() {
return getHandle().l(); // PAIL
return getHandle().isPlayerSpawned();
}
@Override
public void setPlayerSpawned(boolean playerSpawned) {
getHandle().a(playerSpawned); // PAIL
getHandle().setPlayerSpawned(playerSpawned);
}
}

View File

@@ -174,7 +174,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator<GeneratorSettin
}
@Override
public int e() {
public int getGenerationDepth() {
return world.getHeight();
}
}

View File

@@ -108,7 +108,7 @@ public class NormalChunkGenerator<C extends GeneratorSettings> extends InternalC
}
@Override
public int e() {
return generator.e(); // PAIL: Gen depth
public int getGenerationDepth() {
return generator.getGenerationDepth();
}
}

View File

@@ -421,7 +421,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
continue;
}
EquipmentSlot slot = CraftEquipmentSlot.getSlot(EnumItemSlot.a(slotName.toLowerCase(Locale.ROOT))); // PAIL rename fromName
EquipmentSlot slot = CraftEquipmentSlot.getSlot(EnumItemSlot.fromName(slotName.toLowerCase(Locale.ROOT)));
if (slot == null) {
modifiers.put(attribute, attribMod);
continue;

View File

@@ -44,17 +44,17 @@ public class DummyGeneratorAccess implements GeneratorAccess {
}
@Override
public TickList<Block> J() {
public TickList<Block> getBlockTickList() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public TickList<FluidType> I() {
public TickList<FluidType> getFluidTickList() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public IChunkAccess b(int i, int i1) {
public IChunkAccess getChunkAt(int i, int i1) {
throw new UnsupportedOperationException("Not supported yet.");
}