Update to Minecraft 1.13.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-10-23 06:00:00 +11:00
parent 6fe7587c8f
commit a194267323
47 changed files with 184 additions and 262 deletions

View File

@@ -1273,10 +1273,10 @@ public final class CraftServer implements Server {
BlockPosition structurePosition = new BlockPosition(structureLocation.getBlockX(), structureLocation.getBlockY(), structureLocation.getBlockZ());
// Create map with trackPlayer = true, unlimitedTracking = true
net.minecraft.server.ItemStack stack = ItemWorldMap.a(worldServer, structurePosition.getX(), structurePosition.getZ(), MapView.Scale.NORMAL.getValue(), true, true); //PAIL rename setFilledMapView
ItemWorldMap.a(worldServer, stack); // PAIL rename sepiaMapFilter
net.minecraft.server.ItemStack stack = ItemWorldMap.createFilledMapView(worldServer, structurePosition.getX(), structurePosition.getZ(), MapView.Scale.NORMAL.getValue(), true, true);
ItemWorldMap.applySepiaFilter(worldServer, stack);
// "+" map ID taken from EntityVillager
ItemWorldMap.getSavedMap(stack, worldServer).a(stack, structurePosition, "+", MapIcon.Type.a(structureType.getMapIcon().getValue())); // PAIL rename decorateMap
ItemWorldMap.getSavedMap(stack, worldServer).decorateMap(stack, structurePosition, "+", MapIcon.Type.a(structureType.getMapIcon().getValue()));
return CraftItemStack.asBukkitCopy(stack);
}

View File

@@ -256,7 +256,7 @@ public class CraftWorld implements World {
}
public boolean isChunkInUse(int x, int z) {
return world.getPlayerChunkMap().isChunkInUse(x, z) || world.f(x, z);
return world.getPlayerChunkMap().isChunkInUse(x, z) || world.isForceLoaded(x, z);
}
public boolean loadChunk(int x, int z, boolean generate) {

View File

@@ -177,11 +177,11 @@ public class Main {
useConsole = false;
}
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor());
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -10);
deadline.add(Calendar.DAY_OF_YEAR, -7);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/ ***");

View File

@@ -600,6 +600,6 @@ public class CraftBlock implements Block {
@Override
public boolean isPassable() {
return this.getData0().h(world, position).b(); // PAIL getCollisionShape, isEmpty
return this.getData0().getCollisionShape(world, position).isEmpty();
}
}

View File

@@ -23,11 +23,11 @@ public class CraftAnimals extends CraftAgeable implements Animals {
@Override
public UUID getBreedCause() {
return getHandle().bD;
return getHandle().breedCause;
}
@Override
public void setBreedCause(UUID uuid) {
getHandle().bD = uuid;
getHandle().breedCause = uuid;
}
}

View File

@@ -467,7 +467,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@Override
public int discoverRecipes(Collection<NamespacedKey> recipes) {
return getHandle().a(bukkitKeysToMinecraftRecipes(recipes)); // PAIL rename discoverRecipes
return getHandle().discoverRecipes(bukkitKeysToMinecraftRecipes(recipes));
}
@Override
@@ -477,7 +477,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@Override
public int undiscoverRecipes(Collection<NamespacedKey> recipes) {
return getHandle().b(bukkitKeysToMinecraftRecipes(recipes)); // PAIL rename undiscoverRecipes
return getHandle().undiscoverRecipes(bukkitKeysToMinecraftRecipes(recipes));
}
private Collection<IRecipe> bukkitKeysToMinecraftRecipes(Collection<NamespacedKey> recipeKeys) {

View File

@@ -70,7 +70,7 @@ public class CraftVillager extends CraftAgeable implements Villager, InventoryHo
if (resetTrades) {
getHandle().trades = null;
getHandle().bQ = 0; // SPIGOT-4310
getHandle().careerLevel = 0; // SPIGOT-4310
getHandle().populateTrades();
}
}

View File

@@ -157,6 +157,17 @@ public class CraftEventFactory {
return event;
}
public static EntityPlaceEvent callEntityPlaceEvent(ItemActionContext itemactioncontext, Entity entity) {
Player who = (itemactioncontext.getEntity() == null) ? null : (Player) itemactioncontext.getEntity().getBukkitEntity();
org.bukkit.block.Block blockClicked = CraftBlock.at(itemactioncontext.getWorld(), itemactioncontext.getClickPosition());
org.bukkit.block.BlockFace blockFace = org.bukkit.craftbukkit.block.CraftBlock.notchToBlockFace(itemactioncontext.getClickedFace());
EntityPlaceEvent event = new EntityPlaceEvent(entity.getBukkitEntity(), who, blockClicked, blockFace);
entity.world.getServer().getPluginManager().callEvent(event);
return event;
}
/**
* Bucket methods
*/

View File

@@ -634,7 +634,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
if (entry.getValue().getSlot() != null) {
EnumItemSlot slot = CraftEquipmentSlot.getNMS(entry.getValue().getSlot());
if (slot != null) {
sub.setString(ATTRIBUTES_SLOT.NBT, slot.d()); // PAIL rename getSlotName, getName
sub.setString(ATTRIBUTES_SLOT.NBT, slot.getSlotName());
}
}
list.add(sub);

View File

@@ -144,7 +144,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftBlockData.fromData(getBlock(material, data));
}
public static final int DATA_VERSION = 1628;
public static final int DATA_VERSION = 1631;
@Override
public int getDataVersion() {