summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-10-23 06:00:00 +1100
committermd_5 <git@md-5.net>2018-10-23 06:00:00 +1100
commitb4230a9a7efde35b30fefdb4a2492209d5334def (patch)
tree62e6e1933ed69e46e56a559e2a723d5a91f18244 /src
parenta639ae44d24fd7ce48c9390c27dd70cc5fd9d38b (diff)
downloadcraftbukkit-b4230a9a7efde35b30fefdb4a2492209d5334def.tar
craftbukkit-b4230a9a7efde35b30fefdb4a2492209d5334def.tar.gz
craftbukkit-b4230a9a7efde35b30fefdb4a2492209d5334def.tar.lz
craftbukkit-b4230a9a7efde35b30fefdb4a2492209d5334def.tar.xz
craftbukkit-b4230a9a7efde35b30fefdb4a2492209d5334def.zip
Update to Minecraft 1.13.2
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/Main.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java11
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java2
-rw-r--r--src/test/java/org/bukkit/StructureTypeTest.java6
11 files changed, 28 insertions, 17 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a0eefe04..a1eacecf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -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);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ddaeefb7..cc10e277 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -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) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e5f39b66..926efb0a 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -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/ ***");
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index f3e06052..1b2a8b63 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -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();
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java
index f671ad12..2478b934 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java
@@ -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;
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 497783d4..be00d79e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -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) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
index e9222580..e21fe51a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
@@ -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();
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 67d2eb1b..79d6578e 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -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
*/
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index a5835479..60cdd1dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -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);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 848b9c92..89ef12fe 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -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() {
diff --git a/src/test/java/org/bukkit/StructureTypeTest.java b/src/test/java/org/bukkit/StructureTypeTest.java
index 57f68761..ad1c7a4d 100644
--- a/src/test/java/org/bukkit/StructureTypeTest.java
+++ b/src/test/java/org/bukkit/StructureTypeTest.java
@@ -22,7 +22,7 @@ public class StructureTypeTest extends AbstractTestingBase {
@Test
public void testMinecraftToBukkit() {
- for (String key : WorldGenFactory.b.keySet()) { // PAIL rename structureStartMap
+ for (String key : WorldGenFactory.structureStartMap.keySet()) {
Assert.assertNotNull(structures.get(key));
}
}
@@ -38,8 +38,8 @@ public class StructureTypeTest extends AbstractTestingBase {
@Test
public void testBukkitToMinecraft() {
for (Map.Entry<String, StructureType> entry : structures.entrySet()) {
- Assert.assertNotNull(WorldGenFactory.b.get(entry.getKey()));
- Assert.assertNotNull(WorldGenFactory.b.get(entry.getValue().getName()));
+ Assert.assertNotNull(WorldGenFactory.structureStartMap.get(entry.getKey()));
+ Assert.assertNotNull(WorldGenFactory.structureStartMap.get(entry.getValue().getName()));
}
}
}