mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Update to Minecraft 1.13.2
This commit is contained in:
parent
a639ae44d2
commit
b4230a9a7e
47 changed files with 184 additions and 262 deletions
|
@ -29,7 +29,7 @@
|
|||
dynamic = dynamic.set("DataVersion", dynamic.createInt(1343));
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
dynamic = this.d.az().update(DataFixTypes.ADVANCEMENTS, dynamic, dynamic.getInt("DataVersion"), 1628);
|
||||
dynamic = this.d.az().update(DataFixTypes.ADVANCEMENTS, dynamic, dynamic.getInt("DataVersion"), 1631);
|
||||
dynamic = dynamic.remove("DataVersion");
|
||||
- Map map = (Map) AdvancementDataPlayer.b.getAdapter(AdvancementDataPlayer.c).fromJsonTree((JsonElement) dynamic.getValue());
|
||||
+ Map<MinecraftKey, AdvancementProgress> map = (Map) AdvancementDataPlayer.b.getAdapter(AdvancementDataPlayer.c).fromJsonTree((JsonElement) dynamic.getValue()); // CraftBukkit - decompile error
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
@@ -32,8 +34,13 @@
|
||||
float f = (float) blockposition.getY() + (6.0F + (float) (3 * i)) / 16.0F;
|
||||
|
||||
if (!world.isClientSide && entity.isBurning() && i > 0 && entity.getBoundingBox().b <= (double) f) {
|
||||
if (!world.isClientSide && entity.isBurning() && i > 0 && entity.getBoundingBox().minY <= (double) f) {
|
||||
+ // CraftBukkit start
|
||||
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH)) {
|
||||
+ return;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/minecraft/server/Chunk.java
|
||||
+++ b/net/minecraft/server/Chunk.java
|
||||
@@ -23,6 +23,8 @@
|
||||
@@ -22,6 +22,8 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
|||
|
||||
private static final Logger d = LogManager.getLogger();
|
||||
@@ -57,6 +59,35 @@
|
||||
private int D;
|
||||
private final AtomicInteger E;
|
||||
private final ChunkCoordIntPair F;
|
||||
|
||||
+ // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
|
||||
+ private int neighbors = 0x1 << 12;
|
||||
|
@ -45,7 +45,7 @@
|
|||
public Chunk(World world, int i, int j, BiomeBase[] abiomebase, ChunkConverter chunkconverter, TickList<Block> ticklist, TickList<FluidType> ticklist1, long k) {
|
||||
this.sections = new ChunkSection[16];
|
||||
this.g = new boolean[256];
|
||||
@@ -94,8 +125,16 @@
|
||||
@@ -95,8 +126,16 @@
|
||||
this.s = ticklist;
|
||||
this.t = ticklist1;
|
||||
this.z = k;
|
||||
|
@ -62,7 +62,7 @@
|
|||
public Chunk(World world, ProtoChunk protochunk, int i, int j) {
|
||||
this(world, i, j, protochunk.getBiomeIndex(), protochunk.v(), protochunk.n(), protochunk.o(), protochunk.m());
|
||||
|
||||
@@ -135,14 +174,15 @@
|
||||
@@ -136,14 +175,15 @@
|
||||
HeightMap.Type heightmap_type = (HeightMap.Type) iterator.next();
|
||||
|
||||
if (heightmap_type.c() == HeightMap.Use.LIVE_WORLD) {
|
||||
|
@ -80,23 +80,23 @@
|
|||
}
|
||||
|
||||
public Set<BlockPosition> t() {
|
||||
@@ -412,8 +452,15 @@
|
||||
@@ -413,8 +453,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
@Nullable
|
||||
public IBlockData a(BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
|
||||
+ return this.a(blockposition, iblockdata, flag, true);
|
||||
public IBlockData setType(BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
|
||||
+ return this.setType(blockposition, iblockdata, flag, true);
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ public IBlockData a(BlockPosition blockposition, IBlockData iblockdata, boolean flag, boolean doPlace) {
|
||||
+ public IBlockData setType(BlockPosition blockposition, IBlockData iblockdata, boolean flag, boolean doPlace) {
|
||||
+ // CraftBukkit end
|
||||
int i = blockposition.getX() & 15;
|
||||
int j = blockposition.getY();
|
||||
int k = blockposition.getZ() & 15;
|
||||
@@ -473,7 +520,8 @@
|
||||
@@ -474,7 +521,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@
|
|||
iblockdata.onPlace(this.world, blockposition, iblockdata1);
|
||||
}
|
||||
|
||||
@@ -653,7 +701,19 @@
|
||||
@@ -654,7 +702,12 @@
|
||||
|
||||
@Nullable
|
||||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
|
@ -116,33 +116,14 @@
|
|||
+ if (tileentity == null) {
|
||||
+ tileentity = (TileEntity) this.tileEntities.get(blockposition);
|
||||
+ }
|
||||
+ if (tileentity == null) {
|
||||
+ NBTTagCompound pending = this.h.remove(blockposition);
|
||||
+ if (pending != null) {
|
||||
+ this.processQueuedTile(blockposition, pending);
|
||||
+ return this.a(blockposition, chunk_enumtileentitystate);
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
if (tileentity == null) {
|
||||
if (chunk_enumtileentitystate == Chunk.EnumTileEntityState.IMMEDIATE) {
|
||||
@@ -679,6 +739,11 @@
|
||||
}
|
||||
|
||||
public void a(BlockPosition blockposition, TileEntity tileentity) {
|
||||
+ // CraftBukkit start
|
||||
+ if (blockposition instanceof BlockPosition.MutableBlockPosition) {
|
||||
+ blockposition = new BlockPosition(blockposition);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
tileentity.setWorld(this.world);
|
||||
tileentity.setPosition(blockposition);
|
||||
if (this.getType(blockposition).getBlock() instanceof ITileEntity) {
|
||||
@@ -688,6 +753,13 @@
|
||||
NBTTagCompound nbttagcompound = (NBTTagCompound) this.h.remove(blockposition);
|
||||
@@ -701,6 +754,13 @@
|
||||
|
||||
tileentity.z();
|
||||
this.tileEntities.put(blockposition, tileentity);
|
||||
this.tileEntities.put(blockposition.h(), tileentity);
|
||||
+ // CraftBukkit start
|
||||
+ } else {
|
||||
+ System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ()
|
||||
|
@ -153,7 +134,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -720,6 +792,40 @@
|
||||
@@ -733,6 +793,40 @@
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -194,7 +175,7 @@
|
|||
}
|
||||
|
||||
public void removeEntities() {
|
||||
@@ -736,9 +842,21 @@
|
||||
@@ -749,9 +843,21 @@
|
||||
int i = aentityslice.length;
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
|
@ -204,21 +185,21 @@
|
|||
+ java.util.Iterator<Entity> iter = newList.iterator();
|
||||
+ while (iter.hasNext()) {
|
||||
+ Entity entity = iter.next();
|
||||
|
||||
- this.world.b((Collection) entityslice);
|
||||
+
|
||||
+ // Do not pass along players, as doing so can get them stuck outside of time.
|
||||
+ // (which for example disables inventory icon updates and prevents block breaking)
|
||||
+ if (entity instanceof EntityPlayer) {
|
||||
+ iter.remove();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
- this.world.b((Collection) entityslice);
|
||||
+ this.world.b((Collection) newList);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
}
|
||||
@@ -800,8 +918,8 @@
|
||||
@@ -813,8 +919,8 @@
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
|
@ -229,7 +210,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -1007,13 +1125,13 @@
|
||||
@@ -1020,13 +1126,13 @@
|
||||
|
||||
@Nullable
|
||||
public LongSet b(String s) {
|
||||
|
@ -245,7 +226,7 @@
|
|||
return new LongOpenHashSet();
|
||||
})).add(i);
|
||||
}
|
||||
@@ -1061,18 +1179,18 @@
|
||||
@@ -1074,14 +1180,14 @@
|
||||
}
|
||||
|
||||
if (this.s instanceof ProtoChunkTickList) {
|
||||
|
@ -264,59 +245,3 @@
|
|||
});
|
||||
}
|
||||
|
||||
- Iterator iterator = this.h.entrySet().iterator();
|
||||
+ Iterator iterator = Maps.newHashMap(this.h).entrySet().iterator(); // CraftBukkit
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
Entry entry = (Entry) iterator.next();
|
||||
@@ -1080,6 +1198,8 @@
|
||||
NBTTagCompound nbttagcompound = (NBTTagCompound) entry.getValue();
|
||||
|
||||
if (this.getTileEntity(blockposition1) == null) {
|
||||
+ // CraftBukkit start
|
||||
+ /*
|
||||
TileEntity tileentity;
|
||||
|
||||
if ("DUMMY".equals(nbttagcompound.getString("id"))) {
|
||||
@@ -1101,6 +1221,8 @@
|
||||
} else {
|
||||
Chunk.d.warn("Tried to load a block entity for block {} but failed at location {}", this.getType(blockposition1), blockposition1);
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1110,6 +1232,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ private void processQueuedTile(BlockPosition blockposition1, NBTTagCompound nbttagcompound) {
|
||||
+ TileEntity tileentity;
|
||||
+
|
||||
+ if ("DUMMY".equals(nbttagcompound.getString("id"))) {
|
||||
+ Block block = this.getType(blockposition1).getBlock();
|
||||
+
|
||||
+ if (block instanceof ITileEntity) {
|
||||
+ tileentity = ((ITileEntity) block).a(this.world);
|
||||
+ } else {
|
||||
+ tileentity = null;
|
||||
+ Chunk.d.warn("Tried to load a DUMMY block entity @ {} but found not tile entity block {} at location", blockposition1, this.getType(blockposition1));
|
||||
+ }
|
||||
+ } else {
|
||||
+ tileentity = TileEntity.create(nbttagcompound);
|
||||
+ }
|
||||
+
|
||||
+ if (tileentity != null) {
|
||||
+ tileentity.setPosition(blockposition1);
|
||||
+ this.a(tileentity);
|
||||
+ } else {
|
||||
+ Chunk.d.warn("Tried to load a block entity for block {} but failed at location {}", this.getType(blockposition1), blockposition1);
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public ChunkConverter F() {
|
||||
return this.m;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -18,12 +18,17 @@
|
||||
@@ -18,6 +18,11 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -12,13 +12,6 @@
|
|||
public class ChunkProviderServer implements IChunkProvider {
|
||||
|
||||
private static final Logger a = LogManager.getLogger();
|
||||
public final LongSet unloadQueue = new LongOpenHashSet();
|
||||
public final ChunkGenerator<?> chunkGenerator;
|
||||
- private final IChunkLoader chunkLoader;
|
||||
+ public final IChunkLoader chunkLoader; // PAIL
|
||||
public final Long2ObjectMap<Chunk> chunks = Long2ObjectMaps.synchronize(new ChunkMap(8192));
|
||||
private Chunk lastChunk;
|
||||
private final ChunkTaskScheduler chunkScheduler;
|
||||
@@ -36,7 +41,7 @@
|
||||
this.chunkLoader = ichunkloader;
|
||||
this.chunkGenerator = chunkgenerator;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(argumentvec2i_a.a >> 4, argumentvec2i_a.b >> 4);
|
||||
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().o().getDimensionManager();
|
||||
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
|
||||
boolean flag = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager).f(chunkcoordintpair.x, chunkcoordintpair.z);
|
||||
boolean flag = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager).isForceLoaded(chunkcoordintpair.x, chunkcoordintpair.z);
|
||||
|
||||
if (flag) {
|
||||
@@ -59,7 +59,7 @@
|
||||
|
@ -28,9 +28,9 @@
|
|||
LongSet longset = worldserver.ag();
|
||||
|
||||
- longset.forEach((i) -> {
|
||||
- worldserver.b(ChunkCoordIntPair.a(i), ChunkCoordIntPair.b(i), false);
|
||||
- worldserver.setForceLoaded(ChunkCoordIntPair.a(i), ChunkCoordIntPair.b(i), false);
|
||||
+ longset.forEach((LongConsumer) (ix) -> { // CraftBukkit - decompile error
|
||||
+ worldserver.b(ChunkCoordIntPair.a(ix), ChunkCoordIntPair.b(ix), false); // CraftBukkit - decompile error
|
||||
+ worldserver.setForceLoaded(ChunkCoordIntPair.a(ix), ChunkCoordIntPair.b(ix), false); // CraftBukkit - decompile error
|
||||
});
|
||||
commandlistenerwrapper.sendMessage(new ChatMessage("commands.forceload.removed.all", new Object[] { dimensionmanager}), true);
|
||||
return 0;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
--- a/net/minecraft/server/DataConverterRegistry.java
|
||||
+++ b/net/minecraft/server/DataConverterRegistry.java
|
||||
@@ -195,6 +195,18 @@
|
||||
@@ -185,6 +185,18 @@
|
||||
datafixerbuilder.addFixer(new DataConverterItemFrame(schema46, false));
|
||||
Schema schema47 = datafixerbuilder.addSchema(1458, DataConverterRegistry.c);
|
||||
Schema schema47 = datafixerbuilder.addSchema(1458, DataConverterRegistry.b);
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ datafixerbuilder.addFixer(new com.mojang.datafixers.DataFix(schema47, false) {
|
||||
|
|
|
@ -273,9 +273,9 @@
|
|||
}
|
||||
|
||||
@@ -706,6 +884,7 @@
|
||||
this.locX = (axisalignedbb.a + axisalignedbb.d) / 2.0D;
|
||||
this.locY = axisalignedbb.b;
|
||||
this.locZ = (axisalignedbb.c + axisalignedbb.f) / 2.0D;
|
||||
this.locX = (axisalignedbb.minX + axisalignedbb.maxX) / 2.0D;
|
||||
this.locY = axisalignedbb.minY;
|
||||
this.locZ = (axisalignedbb.minZ + axisalignedbb.maxZ) / 2.0D;
|
||||
+ if (valid) world.entityJoinedWorld(this, false); // CraftBukkit
|
||||
}
|
||||
|
||||
|
@ -453,8 +453,8 @@
|
|||
}
|
||||
|
||||
this.vehicle = entity;
|
||||
- this.vehicle.o(this);
|
||||
+ if (!this.vehicle.o(this)) this.vehicle = null; // CraftBukkit
|
||||
- this.vehicle.addPassenger(this);
|
||||
+ if (!this.vehicle.addPassenger(this)) this.vehicle = null; // CraftBukkit
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -468,8 +468,8 @@
|
|||
|
||||
}
|
||||
|
||||
- protected void o(Entity entity) {
|
||||
+ protected boolean o(Entity entity) { // CraftBukkit
|
||||
- protected void addPassenger(Entity entity) {
|
||||
+ protected boolean addPassenger(Entity entity) { // CraftBukkit
|
||||
if (entity.getVehicle() != this) {
|
||||
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
|
||||
} else {
|
||||
|
@ -733,24 +733,24 @@
|
|||
public void a(AxisAlignedBB axisalignedbb) {
|
||||
- this.boundingBox = axisalignedbb;
|
||||
+ // CraftBukkit start - block invalid bounding boxes
|
||||
+ double a = axisalignedbb.a,
|
||||
+ b = axisalignedbb.b,
|
||||
+ c = axisalignedbb.c,
|
||||
+ d = axisalignedbb.d,
|
||||
+ e = axisalignedbb.e,
|
||||
+ f = axisalignedbb.f;
|
||||
+ double len = axisalignedbb.d - axisalignedbb.a;
|
||||
+ if (len < 0) d = a;
|
||||
+ if (len > 64) d = a + 64.0;
|
||||
+ double minX = axisalignedbb.minX,
|
||||
+ minY = axisalignedbb.minY,
|
||||
+ minZ = axisalignedbb.minZ,
|
||||
+ maxX = axisalignedbb.maxX,
|
||||
+ maxY = axisalignedbb.maxY,
|
||||
+ maxZ = axisalignedbb.maxZ;
|
||||
+ double len = axisalignedbb.maxX - axisalignedbb.minX;
|
||||
+ if (len < 0) maxX = minX;
|
||||
+ if (len > 64) maxX = minX + 64.0;
|
||||
+
|
||||
+ len = axisalignedbb.e - axisalignedbb.b;
|
||||
+ if (len < 0) e = b;
|
||||
+ if (len > 64) e = b + 64.0;
|
||||
+ len = axisalignedbb.maxY - axisalignedbb.minY;
|
||||
+ if (len < 0) maxY = minY;
|
||||
+ if (len > 64) maxY = minY + 64.0;
|
||||
+
|
||||
+ len = axisalignedbb.f - axisalignedbb.c;
|
||||
+ if (len < 0) f = c;
|
||||
+ if (len > 64) f = c + 64.0;
|
||||
+ this.boundingBox = new AxisAlignedBB(a, b, c, d, e, f);
|
||||
+ len = axisalignedbb.maxZ - axisalignedbb.minZ;
|
||||
+ if (len < 0) maxZ = minZ;
|
||||
+ if (len > 64) maxZ = minZ + 64.0;
|
||||
+ this.boundingBox = new AxisAlignedBB(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
--- a/net/minecraft/server/EntityAnimal.java
|
||||
+++ b/net/minecraft/server/EntityAnimal.java
|
||||
@@ -7,7 +7,8 @@
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
protected Block bF;
|
||||
private int bC;
|
||||
- private UUID bD;
|
||||
+ public UUID bD; // PAIL
|
||||
public UUID breedCause;
|
||||
+ public ItemStack breedItem; // CraftBukkit - Add breedItem variable
|
||||
|
||||
protected EntityAnimal(EntityTypes<?> entitytypes, World world) {
|
||||
|
@ -30,7 +28,7 @@
|
|||
return iworldreader.getType(blockposition.down()).getBlock() == this.bF ? 10.0F : iworldreader.A(blockposition) - 0.5F;
|
||||
@@ -134,6 +139,7 @@
|
||||
if (entityhuman != null) {
|
||||
this.bD = entityhuman.getUniqueID();
|
||||
this.breedCause = entityhuman.getUniqueID();
|
||||
}
|
||||
+ this.breedItem = entityhuman.inventory.getItemInHand(); // CraftBukkit
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
@@ -134,9 +173,25 @@
|
||||
public void collide(Entity entity) {
|
||||
if (entity instanceof EntityBoat) {
|
||||
if (entity.getBoundingBox().b < this.getBoundingBox().e) {
|
||||
if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) {
|
||||
+ // CraftBukkit start
|
||||
+ VehicleEntityCollisionEvent event = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
|
@ -81,7 +81,7 @@
|
|||
+ // CraftBukkit end
|
||||
super.collide(entity);
|
||||
}
|
||||
} else if (entity.getBoundingBox().b <= this.getBoundingBox().b) {
|
||||
} else if (entity.getBoundingBox().minY <= this.getBoundingBox().minY) {
|
||||
+ // CraftBukkit start
|
||||
+ VehicleEntityCollisionEvent event = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
}
|
||||
|
||||
@@ -399,6 +412,10 @@
|
||||
int j1 = MathHelper.floor(axisalignedbb.f);
|
||||
int j1 = MathHelper.floor(axisalignedbb.maxZ);
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
+ // CraftBukkit start - Create a list to hold all the destroyed blocks
|
||||
|
@ -111,5 +111,5 @@
|
|||
+ // CraftBukkit end
|
||||
+
|
||||
if (flag1) {
|
||||
double d0 = axisalignedbb.a + (axisalignedbb.d - axisalignedbb.a) * (double) this.random.nextFloat();
|
||||
double d1 = axisalignedbb.b + (axisalignedbb.e - axisalignedbb.b) * (double) this.random.nextFloat();
|
||||
double d0 = axisalignedbb.minX + (axisalignedbb.maxX - axisalignedbb.minX) * (double) this.random.nextFloat();
|
||||
double d1 = axisalignedbb.minY + (axisalignedbb.maxY - axisalignedbb.minY) * (double) this.random.nextFloat();
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
--- a/net/minecraft/server/EntityFish.java
|
||||
+++ b/net/minecraft/server/EntityFish.java
|
||||
@@ -37,7 +37,7 @@
|
||||
@@ -29,7 +29,7 @@
|
||||
}
|
||||
|
||||
protected boolean isTypeNotPersistent() {
|
||||
public boolean isTypeNotPersistent() {
|
||||
- return !this.isFromBucket() && !this.hasCustomName();
|
||||
+ return true; // CraftBukkit
|
||||
}
|
||||
|
||||
public boolean l() {
|
||||
@@ -71,6 +71,7 @@
|
||||
public int dg() {
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
public void setFromBucket(boolean flag) {
|
||||
this.datawatcher.set(EntityFish.b, Boolean.valueOf(flag));
|
||||
this.datawatcher.set(EntityFish.a, Boolean.valueOf(flag));
|
||||
+ this.persistent = this.isPersistent(); // CraftBukkit - SPIGOT-4106 update persistence
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
+ // CraftBukkit end
|
||||
this.motY = (double) (-0.4F * MathHelper.a(this.random, 0.6F, 1.0F));
|
||||
this.a(SoundEffects.ENTITY_FISHING_BOBBER_SPLASH, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
double d3 = this.getBoundingBox().b + 0.5D;
|
||||
double d3 = this.getBoundingBox().minY + 0.5D;
|
||||
@@ -389,6 +406,14 @@
|
||||
int i = 0;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
@@ -170,6 +175,12 @@
|
||||
}
|
||||
|
||||
private void setItem(ItemStack itemstack, boolean flag) {
|
||||
public void setItem(ItemStack itemstack, boolean flag) {
|
||||
+ // CraftBukkit start
|
||||
+ this.setItem(itemstack, flag, true);
|
||||
+ }
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
--- a/net/minecraft/server/EntityMinecartMobSpawner.java
|
||||
+++ b/net/minecraft/server/EntityMinecartMobSpawner.java
|
||||
@@ -46,4 +46,10 @@
|
||||
super.tick();
|
||||
this.a.c();
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ public boolean bM() {
|
||||
+ return true;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
|
||||
protected boolean isTypeNotPersistent() {
|
||||
public boolean isTypeNotPersistent() {
|
||||
- return !this.isTamed() && this.ticksLived > 2400;
|
||||
+ return !this.isTamed() /*&& this.ticksLived > 2400*/; // CraftBukkit
|
||||
}
|
||||
|
|
|
@ -30,4 +30,4 @@
|
|||
+ // CraftBukkit end
|
||||
this.soundDelay = this.random.nextInt(40);
|
||||
if (entity instanceof EntityLiving) {
|
||||
this.a((EntityLiving) entity);
|
||||
this.setLastDamager((EntityLiving) entity);
|
||||
|
|
|
@ -522,7 +522,7 @@
|
|||
+ this.world.getServer().getScoreboardManager().getScoreboardScores(statistic, this.getName(), ScoreboardScore::c); // CraftBukkit - Get our scores instead
|
||||
}
|
||||
|
||||
public int a(Collection<IRecipe> collection) {
|
||||
public int discoverRecipes(Collection<IRecipe> collection) {
|
||||
@@ -830,8 +1059,17 @@
|
||||
|
||||
public void triggerHealthUpdate() {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
@@ -441,8 +445,12 @@
|
||||
@@ -435,8 +439,12 @@
|
||||
} else if (this.f.bK > 200) {
|
||||
World world = this.f.world;
|
||||
|
||||
|
|
|
@ -15,15 +15,6 @@
|
|||
|
||||
public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
|
||||
|
||||
@@ -26,7 +34,7 @@
|
||||
public int riches;
|
||||
private String bO;
|
||||
public int careerId;
|
||||
- private int bQ;
|
||||
+ public int bQ; // PAIL private->public
|
||||
private boolean bR;
|
||||
private boolean bS;
|
||||
public final InventorySubcontainer inventory;
|
||||
@@ -38,7 +46,7 @@
|
||||
|
||||
public EntityVillager(World world, int i) {
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
if (packethandshakinginsetprotocol.c() > 401) {
|
||||
chatmessage = new ChatMessage("multiplayer.disconnect.outdated_server", new Object[] { "1.13.1"});
|
||||
if (packethandshakinginsetprotocol.c() > 404) {
|
||||
chatmessage = new ChatMessage("multiplayer.disconnect.outdated_server", new Object[] { "1.13.2"});
|
||||
this.b.sendPacket(new PacketLoginOutDisconnect(chatmessage));
|
||||
@@ -26,6 +71,7 @@
|
||||
this.b.close(chatmessage);
|
||||
|
|
14
nms-patches/ItemArmorStand.patch
Normal file
14
nms-patches/ItemArmorStand.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- a/net/minecraft/server/ItemArmorStand.java
|
||||
+++ b/net/minecraft/server/ItemArmorStand.java
|
||||
@@ -40,6 +40,11 @@
|
||||
entityarmorstand.setPositionRotation(d0 + 0.5D, d1, d2 + 0.5D, f, 0.0F);
|
||||
this.a(entityarmorstand, world.random);
|
||||
EntityTypes.a(world, itemactioncontext.getEntity(), entityarmorstand, itemstack.getTag());
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityarmorstand).isCancelled()) {
|
||||
+ return EnumInteractionResult.FAIL;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.addEntity(entityarmorstand);
|
||||
world.a((EntityHuman) null, entityarmorstand.locX, entityarmorstand.locY, entityarmorstand.locZ, SoundEffects.ENTITY_ARMOR_STAND_PLACE, SoundCategory.BLOCKS, 0.75F, 0.8F);
|
||||
}
|
14
nms-patches/ItemEndCrystal.patch
Normal file
14
nms-patches/ItemEndCrystal.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- a/net/minecraft/server/ItemEndCrystal.java
|
||||
+++ b/net/minecraft/server/ItemEndCrystal.java
|
||||
@@ -33,6 +33,11 @@
|
||||
EntityEnderCrystal entityendercrystal = new EntityEnderCrystal(world, d0 + 0.5D, d1, d2 + 0.5D);
|
||||
|
||||
entityendercrystal.setShowingBottom(false);
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityendercrystal).isCancelled()) {
|
||||
+ return EnumInteractionResult.FAIL;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.addEntity(entityendercrystal);
|
||||
if (world.worldProvider instanceof WorldProviderTheEnd) {
|
||||
EnderDragonBattle enderdragonbattle = ((WorldProviderTheEnd) world.worldProvider).r();
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
public ItemWorldMap(Item.Info item_info) {
|
||||
@@ -15,7 +20,7 @@
|
||||
public static ItemStack a(World world, int i, int j, byte b0, boolean flag, boolean flag1) {
|
||||
public static ItemStack createFilledMapView(World world, int i, int j, byte b0, boolean flag, boolean flag1) {
|
||||
ItemStack itemstack = new ItemStack(Items.FILLED_MAP);
|
||||
|
||||
- a(itemstack, world, i, j, b0, flag, flag1, world.worldProvider.getDimensionManager());
|
||||
|
|
|
@ -500,7 +500,7 @@
|
|||
- if (worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) {
|
||||
+ if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit
|
||||
this.methodProfiler.a(() -> {
|
||||
return worldserver.getWorldData().getName();
|
||||
return "dim-" + worldserver.worldProvider.getDimensionManager().getDimensionID();
|
||||
});
|
||||
+ /* Drop global time updates
|
||||
if (this.ticks % 20 == 0) {
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
public PacketDataSerializer a(ItemStack itemstack) {
|
||||
- if (itemstack.isEmpty()) {
|
||||
+ if (itemstack.isEmpty() || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem()
|
||||
this.writeShort(-1);
|
||||
this.writeBoolean(false);
|
||||
} else {
|
||||
Item item = itemstack.getItem();
|
||||
this.writeBoolean(true);
|
||||
@@ -263,6 +265,11 @@
|
||||
ItemStack itemstack = new ItemStack(Item.getById(short0), b0);
|
||||
ItemStack itemstack = new ItemStack(Item.getById(i), b0);
|
||||
|
||||
itemstack.setTag(this.j());
|
||||
+ // CraftBukkit start
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
public boolean b() {
|
||||
+ // CraftBukkit start - introduce a temporary timeout hack until this is fixed properly
|
||||
+ if ((this.a.ticksLived - this.a.hurtTimestamp) > 100) {
|
||||
+ this.a.a((EntityLiving) null); // PAIL setLastDamager
|
||||
+ this.a.setLastDamager((EntityLiving) null);
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
|
|
@ -282,7 +282,7 @@
|
|||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
this.minecraftServer.getPlayerList().d(this.player);
|
||||
this.minecraftServer.getPlayerList().updateChunks(this.player);
|
||||
this.player.checkMovement(this.player.locX - d0, this.player.locY - d1, this.player.locZ - d2);
|
||||
this.D = d11 >= -0.03125D && !this.minecraftServer.getAllowFlight() && !worldserver.a(entity.getBoundingBox().g(0.0625D).b(0.0D, -0.55D, 0.0D));
|
||||
@@ -243,7 +437,7 @@
|
||||
|
@ -298,7 +298,7 @@
|
|||
}
|
||||
|
||||
this.teleportPos = null;
|
||||
+ this.minecraftServer.getPlayerList().d(this.player); // CraftBukkit
|
||||
+ this.minecraftServer.getPlayerList().updateChunks(this.player); // CraftBukkit
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -376,7 +376,7 @@
|
|||
this.A = this.e;
|
||||
if (this.player.isPassenger()) {
|
||||
this.player.setLocation(this.player.locX, this.player.locY, this.player.locZ, packetplayinflying.a(this.player.yaw), packetplayinflying.b(this.player.pitch));
|
||||
this.minecraftServer.getPlayerList().d(this.player);
|
||||
this.minecraftServer.getPlayerList().updateChunks(this.player);
|
||||
+ this.allowedPlayerTicks = 20; // CraftBukkit
|
||||
} else {
|
||||
+ // CraftBukkit - Make sure the move is valid but then reset it for plugins to modify
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public void d(EntityPlayer entityplayer) {
|
||||
public void updateChunks(EntityPlayer entityplayer) {
|
||||
entityplayer.getWorldServer().getPlayerChunkMap().movePlayer(entityplayer);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
return new LongOpenHashSet();
|
||||
})).add(i);
|
||||
this.c = true;
|
||||
@@ -493,7 +494,7 @@
|
||||
@@ -496,7 +497,7 @@
|
||||
}
|
||||
|
||||
public BitSet a(WorldGenStage.Features worldgenstage_features) {
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
if (l1 <= k) {
|
||||
@@ -76,8 +107,10 @@
|
||||
|
||||
label128:
|
||||
label137:
|
||||
while (iterator1.hasNext()) {
|
||||
- ChunkCoordIntPair chunkcoordintpair1 = (ChunkCoordIntPair) iterator1.next();
|
||||
- BlockPosition blockposition1 = getRandomPosition(worldserver, chunkcoordintpair1.x, chunkcoordintpair1.z);
|
||||
|
@ -83,23 +83,23 @@
|
|||
int i2 = blockposition1.getX();
|
||||
int j2 = blockposition1.getY();
|
||||
int k2 = blockposition1.getZ();
|
||||
@@ -136,9 +169,12 @@
|
||||
if (entityinsentient.a((GeneratorAccess) worldserver, false) && entityinsentient.a((IWorldReader) worldserver)) {
|
||||
groupdataentity = entityinsentient.prepare(worldserver.getDamageScaler(new BlockPosition(entityinsentient)), groupdataentity, (NBTTagCompound) null);
|
||||
if (entityinsentient.a((IWorldReader) worldserver)) {
|
||||
- ++l2;
|
||||
- ++j4;
|
||||
- worldserver.addEntity(entityinsentient);
|
||||
+ // CraftBukkit start
|
||||
+ if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) {
|
||||
+ ++l2;
|
||||
+ ++j4;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
} else {
|
||||
entityinsentient.die();
|
||||
}
|
||||
@@ -255,7 +291,7 @@
|
||||
@@ -140,9 +173,12 @@
|
||||
if ((d0 <= 16384.0D || !entityinsentient.isTypeNotPersistent()) && entityinsentient.a((GeneratorAccess) worldserver, false) && entityinsentient.a((IWorldReader) worldserver)) {
|
||||
groupdataentity = entityinsentient.prepare(worldserver.getDamageScaler(new BlockPosition(entityinsentient)), groupdataentity, (NBTTagCompound) null);
|
||||
if (entityinsentient.a((IWorldReader) worldserver)) {
|
||||
- ++l2;
|
||||
- ++j4;
|
||||
- worldserver.addEntity(entityinsentient);
|
||||
+ // CraftBukkit start
|
||||
+ if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) {
|
||||
+ ++l2;
|
||||
+ ++j4;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
} else {
|
||||
entityinsentient.die();
|
||||
}
|
||||
@@ -260,7 +296,7 @@
|
||||
entityinsentient.setPositionRotation(d0, (double) blockposition.getY(), d1, random.nextFloat() * 360.0F, 0.0F);
|
||||
if (entityinsentient.a(generatoraccess, false) && entityinsentient.a((IWorldReader) generatoraccess)) {
|
||||
groupdataentity = entityinsentient.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityinsentient)), groupdataentity, (NBTTagCompound) null);
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
}
|
||||
|
||||
@@ -169,8 +173,8 @@
|
||||
this.j = this.l();
|
||||
this.target = this.l();
|
||||
this.k = null;
|
||||
} else if (this.j == null) {
|
||||
} else if (this.target == null) {
|
||||
- List list = this.world.a(EntityLiving.class, this.k(), (entityliving) -> {
|
||||
- return entityliving instanceof IMonster && entityliving.ao();
|
||||
+ List list = this.world.a(EntityLiving.class, this.k(), (Predicate<EntityLiving>) (entitylivingx) -> { // CraftBukkit - decompile error
|
||||
|
@ -34,19 +34,19 @@
|
|||
@@ -181,8 +185,13 @@
|
||||
}
|
||||
|
||||
if (this.j != null) {
|
||||
- this.world.a((EntityHuman) null, this.j.locX, this.j.locY, this.j.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
- this.j.damageEntity(DamageSource.MAGIC, 4.0F);
|
||||
if (this.target != null) {
|
||||
- this.world.a((EntityHuman) null, this.target.locX, this.target.locY, this.target.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
- this.target.damageEntity(DamageSource.MAGIC, 4.0F);
|
||||
+ // CraftBukkit start
|
||||
+ CraftEventFactory.blockDamage = CraftBlock.at(this.world, this.position);
|
||||
+ if (this.j.damageEntity(DamageSource.MAGIC, 4.0F)) {
|
||||
+ this.world.a((EntityHuman) null, this.j.locX, this.j.locY, this.j.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
+ if (this.target.damageEntity(DamageSource.MAGIC, 4.0F)) {
|
||||
+ this.world.a((EntityHuman) null, this.target.locX, this.target.locY, this.target.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
+ }
|
||||
+ CraftEventFactory.blockDamage = null;
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
if (entityliving != this.j) {
|
||||
if (entityliving != this.target) {
|
||||
@@ -215,7 +224,7 @@
|
||||
|
||||
@Nullable
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/minecraft/server/TileEntityFurnace.java
|
||||
+++ b/net/minecraft/server/TileEntityFurnace.java
|
||||
@@ -9,6 +9,15 @@
|
||||
@@ -8,6 +8,15 @@
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -16,7 +16,7 @@
|
|||
|
||||
public class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeHolder, AutoRecipeOutput, ITickable {
|
||||
|
||||
@@ -93,6 +102,31 @@
|
||||
@@ -92,6 +101,31 @@
|
||||
return linkedhashmap;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
public TileEntityFurnace() {
|
||||
super(TileEntityTypes.FURNACE);
|
||||
this.items = NonNullList.a(3, ItemStack.a);
|
||||
@@ -220,7 +254,7 @@
|
||||
@@ -219,7 +253,7 @@
|
||||
}
|
||||
|
||||
public void Y_() {
|
||||
|
@ -57,7 +57,7 @@
|
|||
boolean flag1 = false;
|
||||
|
||||
if (this.isBurning()) {
|
||||
@@ -238,9 +272,20 @@
|
||||
@@ -237,9 +271,20 @@
|
||||
IRecipe irecipe = this.world.E().b(this, this.world);
|
||||
|
||||
if (!this.isBurning() && this.canBurn(irecipe)) {
|
||||
|
@ -80,7 +80,7 @@
|
|||
flag1 = true;
|
||||
if (!itemstack.isEmpty()) {
|
||||
Item item = itemstack.getItem();
|
||||
@@ -271,6 +316,7 @@
|
||||
@@ -270,6 +315,7 @@
|
||||
if (flag != this.isBurning()) {
|
||||
flag1 = true;
|
||||
this.world.setTypeAndData(this.position, (IBlockData) this.world.getType(this.position).set(BlockFurnace.LIT, Boolean.valueOf(this.isBurning())), 3);
|
||||
|
@ -88,7 +88,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -281,7 +327,7 @@
|
||||
@@ -280,7 +326,7 @@
|
||||
}
|
||||
|
||||
private int s() {
|
||||
|
@ -97,7 +97,7 @@
|
|||
|
||||
return furnacerecipe != null ? furnacerecipe.h() : 200;
|
||||
}
|
||||
@@ -308,11 +354,38 @@
|
||||
@@ -307,11 +353,38 @@
|
||||
ItemStack itemstack1 = irecipe.d();
|
||||
ItemStack itemstack2 = (ItemStack) this.items.get(2);
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
} else {
|
||||
Chunk chunk = this.getChunkAtWorldCoords(blockposition);
|
||||
Block block = iblockdata.getBlock();
|
||||
- IBlockData iblockdata1 = chunk.a(blockposition, iblockdata, (i & 64) != 0);
|
||||
- IBlockData iblockdata1 = chunk.setType(blockposition, iblockdata, (i & 64) != 0);
|
||||
+
|
||||
+ // CraftBukkit start - capture blockstates
|
||||
+ CraftBlockState blockstate = null;
|
||||
|
@ -156,7 +156,7 @@
|
|||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
+ IBlockData iblockdata1 = chunk.a(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag
|
||||
+ IBlockData iblockdata1 = chunk.setType(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag
|
||||
|
||||
if (iblockdata1 == null) {
|
||||
+ // CraftBukkit start - remove blockstate if failed
|
||||
|
@ -335,7 +335,7 @@
|
|||
+ if (vehicle != null) {
|
||||
+ vehicle.dead = true;
|
||||
+ }
|
||||
+ for (Entity passenger : entity.bQ()) {
|
||||
+ for (Entity passenger : entity.getAllPassengers()) {
|
||||
+ passenger.dead = true;
|
||||
+ }
|
||||
+ entity.dead = true;
|
||||
|
@ -595,7 +595,7 @@
|
|||
|
||||
if (predicate.test(entityhuman1)) {
|
||||
double d5 = entityhuman1.d(d0, d1, d2);
|
||||
@@ -2164,6 +2475,16 @@
|
||||
@@ -2185,6 +2496,16 @@
|
||||
|
||||
public void everyoneSleeping() {}
|
||||
|
||||
|
@ -612,7 +612,7 @@
|
|||
public float g(float f) {
|
||||
return (this.q + (this.r - this.q) * f) * this.i(f);
|
||||
}
|
||||
@@ -2325,7 +2646,7 @@
|
||||
@@ -2346,7 +2667,7 @@
|
||||
int l = j * 16 + 8 - blockposition.getZ();
|
||||
boolean flag = true;
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
@@ -304,6 +310,7 @@
|
||||
nbttagcompound2.setBoolean("Snapshot", false);
|
||||
nbttagcompound.set("Version", nbttagcompound2);
|
||||
nbttagcompound.setInt("DataVersion", 1628);
|
||||
+ if (org.bukkit.craftbukkit.util.CraftMagicNumbers.DATA_VERSION != 1628) throw new AssertionError(); // CraftBukkit - sentinel
|
||||
nbttagcompound.setInt("DataVersion", 1631);
|
||||
+ if (org.bukkit.craftbukkit.util.CraftMagicNumbers.DATA_VERSION != 1631) throw new AssertionError(); // CraftBukkit - sentinel
|
||||
nbttagcompound.setLong("RandomSeed", this.e);
|
||||
nbttagcompound.setString("generatorName", this.f.b());
|
||||
nbttagcompound.setInt("generatorVersion", this.f.getVersion());
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- a/net/minecraft/server/WorldGenFactory.java
|
||||
+++ b/net/minecraft/server/WorldGenFactory.java
|
||||
@@ -9,7 +9,7 @@
|
||||
public class WorldGenFactory {
|
||||
|
||||
private static final Logger a = LogManager.getLogger();
|
||||
- private static final Map<String, Class<? extends StructureStart>> b = Maps.newHashMap();
|
||||
+ public static final Map<String, Class<? extends StructureStart>> b = Maps.newHashMap(); // CraftBukkit private -> public
|
||||
private static final Map<Class<? extends StructureStart>, String> c = Maps.newHashMap();
|
||||
private static final Map<String, Class<? extends StructurePiece>> d = Maps.newHashMap();
|
||||
private static final Map<Class<? extends StructurePiece>, String> e = Maps.newHashMap();
|
8
pom.xml
8
pom.xml
|
@ -4,14 +4,14 @@
|
|||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.13.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
||||
<name>CraftBukkit</name>
|
||||
<url>http://www.bukkit.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<api.version>unknown</api.version>
|
||||
<minecraft.version>1.13.1</minecraft.version>
|
||||
<minecraft.version>1.13.2</minecraft.version>
|
||||
<minecraft_version>1_13_R2</minecraft_version>
|
||||
<buildtag.prefix>git-Bukkit-</buildtag.prefix>
|
||||
<buildtag.suffix></buildtag.suffix>
|
||||
|
@ -48,13 +48,13 @@
|
|||
<dependency>
|
||||
<groupId>org.xerial</groupId>
|
||||
<artifactId>sqlite-jdbc</artifactId>
|
||||
<version>3.23.1</version>
|
||||
<version>3.25.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.46</version>
|
||||
<version>5.1.47</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- testing -->
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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/ ***");
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue