geforkt von Mirrors/Paper
NOT WORKING! Even even more patches!
Dieser Commit ist enthalten in:
Ursprung
828dea48de
Commit
c8d8659ad3
@ -6,44 +6,44 @@ Subject: [PATCH] Activation Range Improvements
|
||||
Fixes and adds new Immunities to improve gameplay behavior
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
index 0c82c6f5b..9659a45ef 100644
|
||||
index e2e109511..34dcd01de 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
||||
|
||||
public abstract class EntityCreature extends EntityInsentient {
|
||||
|
||||
public static final UUID bv = UUID.fromString("E199AD21-BA8A-4C53-8D13-6182D5C69D3A");
|
||||
public static final AttributeModifier bw = (new AttributeModifier(EntityCreature.bv, "Fleeing speed bonus", 2.0D, 2)).a(false);
|
||||
+ public BlockPosition movingTarget = null; public BlockPosition getMovingTarget() { return movingTarget; } // Paper
|
||||
private BlockPosition a;
|
||||
private float b;
|
||||
private final float c;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index dda6219a7..9e864864d 100644
|
||||
index b12c9e461..1b2e802ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
public float aQ;
|
||||
public float aR;
|
||||
public float aT;
|
||||
public float aU;
|
||||
public EntityHuman killer;
|
||||
- protected int lastDamageByPlayerTime;
|
||||
+ public int lastDamageByPlayerTime; // Paper - public
|
||||
protected boolean aU;
|
||||
protected boolean aX;
|
||||
protected int ticksFarFromPlayer;
|
||||
protected float aW;
|
||||
protected float aZ;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java
|
||||
index dbda68dd0..af49b7273 100644
|
||||
index 269857960..864ca3cc6 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLlama.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLlama.java
|
||||
@@ -0,0 +0,0 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
|
||||
return this.bM != null;
|
||||
return this.bR != null;
|
||||
}
|
||||
|
||||
+ public boolean inCaravan() { return this.dW(); } // Paper - OBFHELPER
|
||||
public boolean dW() {
|
||||
return this.bL != null;
|
||||
+ public boolean inCaravan() { return this.em(); } // Paper - OBFHELPER
|
||||
public boolean em() {
|
||||
return this.bQ != null;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java
|
||||
index 83d9c43f3..1cb6652c2 100644
|
||||
index a146a8b45..a19853463 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoal.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoal.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PathfinderGoal {
|
||||
@ -59,44 +59,47 @@ index 83d9c43f3..1cb6652c2 100644
|
||||
public void e() {}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java
|
||||
index e5b5e9887..e3781f3a8 100644
|
||||
index d5c08aa7c..fe6570c88 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
|
||||
public abstract class PathfinderGoalGotoTarget extends PathfinderGoal {
|
||||
|
||||
- private final EntityCreature c;
|
||||
+ private final EntityCreature c; public EntityCreature getEntity() { return c; } // Paper - OBFHELPER
|
||||
private final double d;
|
||||
protected int a;
|
||||
private int e;
|
||||
private int f;
|
||||
- protected BlockPosition b;
|
||||
+ protected BlockPosition b; public BlockPosition getTarget() { return b; } public void setTarget(BlockPosition pos) { this.b = pos; getEntity().movingTarget = pos != BlockPosition.ZERO ? pos : null; } // Paper - OBFHELPER
|
||||
+
|
||||
+ // Paper start
|
||||
- private final EntityCreature f;
|
||||
+ private final EntityCreature f; public EntityCreature getEntity() { return f; } // Paper - OBFHELPER
|
||||
public double a;
|
||||
protected int b;
|
||||
protected int c;
|
||||
private int g;
|
||||
- protected BlockPosition d;
|
||||
+ protected BlockPosition d; public BlockPosition getTarget() { return d; } public void setTarget(BlockPosition pos) { this.d = pos; getEntity().movingTarget = pos != BlockPosition.ZERO ? pos : null; } // Paper - OBFHELPER
|
||||
private boolean h;
|
||||
private final int i;
|
||||
private final int j;
|
||||
public int e;
|
||||
|
||||
+ // Paper start - activation range improvements
|
||||
+ @Override
|
||||
+ public void onTaskReset() {
|
||||
+ super.onTaskReset();
|
||||
+ setTarget(BlockPosition.ZERO);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
private boolean g;
|
||||
private final int h;
|
||||
|
||||
public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int i) {
|
||||
this(entitycreature, d0, i, 1);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal {
|
||||
BlockPosition blockposition1 = blockposition.a(l, j - 1, i1);
|
||||
|
||||
if (this.c.f(blockposition1) && this.a(this.c.world, blockposition1)) {
|
||||
- this.b = blockposition1;
|
||||
+ setTarget(blockposition1); // Paper
|
||||
for (int j1 = i1 < l && i1 > -l ? l : 0; j1 <= l; j1 = j1 > 0 ? -j1 : 1 - j1) {
|
||||
blockposition_mutableblockposition.g(blockposition).d(i1, k - 1, j1);
|
||||
if (this.f.f((BlockPosition) blockposition_mutableblockposition) && this.a(this.f.world, blockposition_mutableblockposition)) {
|
||||
- this.d = blockposition_mutableblockposition;
|
||||
+ setTarget(blockposition_mutableblockposition); // Paper
|
||||
return true;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index b79bf70f0..33ae73890 100644
|
||||
index e02647f80..cdbf769e7 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -0,0 +0,0 @@ import net.minecraft.server.EntityFireball;
|
||||
@ -140,15 +143,6 @@ index b79bf70f0..33ae73890 100644
|
||||
if ( entity instanceof EntityAnimal )
|
||||
{
|
||||
EntityAnimal animal = (EntityAnimal) entity;
|
||||
@@ -0,0 +0,0 @@ public class ActivationRange
|
||||
{
|
||||
// Never safe to skip fireworks or entities not yet added to chunk
|
||||
// PAIL: inChunk - boolean under datawatchers
|
||||
- if ( !entity.aa || entity instanceof EntityFireworks ) {
|
||||
+ if ( !entity.isAddedToChunk() || entity instanceof EntityFireworks ) { // Paper (use obf helper)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ActivationRange
|
||||
{
|
||||
isActive = false;
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
index c9054fc91..ee3d37a71 100644
|
||||
index 4c615baea..52a1036fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
|
||||
@ -15,9 +15,9 @@ index c9054fc91..ee3d37a71 100644
|
||||
+ public boolean canMove = true; // Paper
|
||||
|
||||
public EntityArmorStand(World world) {
|
||||
super(world);
|
||||
super(EntityTypes.ARMOR_STAND, world);
|
||||
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
|
||||
public boolean cS() {
|
||||
public boolean de() {
|
||||
return false;
|
||||
}
|
||||
+
|
||||
|
@ -23,33 +23,23 @@ index 459c86bce..ea6fcb39f 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||
index 14af226f3..e3d2c0ff7 100644
|
||||
index 172f72fd8..7ba12c23d 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||
@@ -0,0 +0,0 @@ public class ServerStatisticManager extends StatisticManager {
|
||||
JsonObject jsonobject = jsonelement.getAsJsonObject();
|
||||
HashMap hashmap = Maps.newHashMap();
|
||||
Iterator iterator = jsonobject.entrySet().iterator();
|
||||
try {
|
||||
JsonReader jsonreader = new JsonReader(new StringReader(s));
|
||||
Throwable throwable = null;
|
||||
+ java.util.List<String> invalidStats = com.google.common.collect.Lists.newArrayList(); // Paper
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
Entry entry = (Entry) iterator.next();
|
||||
try {
|
||||
jsonreader.setLenient(false);
|
||||
@@ -0,0 +0,0 @@ public class ServerStatisticManager extends StatisticManager {
|
||||
hashmap.put(statistic, statisticwrapper);
|
||||
} else {
|
||||
ServerStatisticManager.b.warn("Invalid statistic in {}: Don\'t know what {} is", this.d, entry.getKey());
|
||||
+ if (com.destroystokyo.paper.PaperConfig.removeInvalidStatistics) invalidStats.add((String) entry.getKey()); // Paper
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start - Remove invalid statistics
|
||||
+ for (String invalid : invalidStats) {
|
||||
+ jsonobject.remove(invalid);
|
||||
+ ServerStatisticManager.b.info("Removing invalid statistic: " + invalid);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
return hashmap;
|
||||
}
|
||||
}
|
||||
if (statistic == null) {
|
||||
ServerStatisticManager.b.warn("Invalid statistic in {}: Don\'t know what {} is", this.d, s2);
|
||||
+ if (com.destroystokyo.paper.PaperConfig.removeInvalidStatistics) invalidStats.add(s2); // Paper
|
||||
} else {
|
||||
this.a.put(statistic, nbttagcompound2.getInt(s2));
|
||||
}
|
||||
--
|
@ -5,15 +5,16 @@ Subject: [PATCH] Assign the World in WorldGenStronghold
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java
|
||||
index c93754704..a3b958e01 100644
|
||||
index 8b285bdd4..b6e60e9df 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldGenStronghold.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java
|
||||
@@ -0,0 +0,0 @@ public class WorldGenStronghold extends StructureGenerator {
|
||||
}
|
||||
|
||||
public BlockPosition getNearestGeneratedFeature(World world, BlockPosition blockposition, boolean flag) {
|
||||
+ this.g = world; // Paper
|
||||
if (!this.b) {
|
||||
this.c();
|
||||
this.b = true;
|
||||
@@ -0,0 +0,0 @@ public class WorldGenStronghold extends StructureGenerator<WorldGenFeatureStrong
|
||||
if (this.d != world.getSeed()) {
|
||||
this.c();
|
||||
}
|
||||
-
|
||||
+ this.g = world; // Paper
|
||||
if (!this.b) {
|
||||
this.a(chunkgenerator);
|
||||
this.b = true;
|
||||
--
|
@ -11,21 +11,19 @@ that is outside happens to be closer, but unreachable, yet another reachable
|
||||
one is in border that would of been missed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
index 34fd7edfe..e8263baa4 100644
|
||||
index 263ea953a..8b8b468f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
@@ -0,0 +0,0 @@ public abstract class StructureGenerator extends WorldGenBase {
|
||||
@@ -0,0 +0,0 @@ public abstract class StructureGenerator<C extends WorldGenFeatureConfiguration>
|
||||
|
||||
WorldGenBase.a(world.getSeed(), random, l2, i3);
|
||||
random.nextInt();
|
||||
+
|
||||
+ if (!world.getWorldBorder().isChunkInBounds(l2, i3)) { continue; } // Paper
|
||||
+
|
||||
if (structuregenerator.a(l2, i3)) {
|
||||
if (!flag1 || !world.b(l2, i3)) {
|
||||
return new BlockPosition((l2 << 4) + 8, 64, (i3 << 4) + 8);
|
||||
if (flag || flag1) {
|
||||
ChunkCoordIntPair chunkcoordintpair = this.a(chunkgenerator, seededrandom, j, k, i1, j1);
|
||||
+ if (!world.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper
|
||||
StructureStart structurestart = this.a(world, chunkgenerator, seededrandom, chunkcoordintpair.a());
|
||||
|
||||
if (structurestart != StructureGenerator.a) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
index 632eb1c9d..1bb172bbf 100644
|
||||
index ec5386fd5..08424a88b 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
@@ -0,0 +0,0 @@ public class WorldBorder {
|
||||
@ -45,6 +43,6 @@ index 632eb1c9d..1bb172bbf 100644
|
||||
+ // Paper end
|
||||
+
|
||||
public boolean isInBounds(ChunkCoordIntPair chunkcoordintpair) {
|
||||
return (double) chunkcoordintpair.e() > this.b() && (double) chunkcoordintpair.c() < this.d() && (double) chunkcoordintpair.f() > this.c() && (double) chunkcoordintpair.d() < this.e();
|
||||
return (double) chunkcoordintpair.f() > this.b() && (double) chunkcoordintpair.d() < this.d() && (double) chunkcoordintpair.g() > this.c() && (double) chunkcoordintpair.e() < this.e();
|
||||
}
|
||||
--
|
@ -9,7 +9,7 @@ Also allow turning off treasure maps all together as they can eat up Map ID's
|
||||
which are limited in quantity.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 4b9bf3b4f..2ba3bcb8e 100644
|
||||
index f64a5ef35..5df8b1143 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
@ -28,17 +28,15 @@ index 4b9bf3b4f..2ba3bcb8e 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 9d201b14e..57fcc3c05 100644
|
||||
index abfd9adbd..dcc14aa11 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
|
||||
public void a(IMerchant imerchant, MerchantRecipeList merchantrecipelist, Random random) {
|
||||
int i = this.a.a(random);
|
||||
World world = imerchant.u_();
|
||||
- BlockPosition blockposition = world.a(this.b, imerchant.v_(), true);
|
||||
World world = imerchant.getWorld();
|
||||
+ if (!world.paperConfig.enableTreasureMaps) return; //Paper
|
||||
+ BlockPosition blockposition = world.a(this.b, imerchant.v_(), world.paperConfig.treasureMapsAlreadyDiscovered); // Paper - pass false to return first structure, regardless of if its been discovered. true returns only undiscovered.
|
||||
BlockPosition blockposition = world.a(this.b, imerchant.getPosition(), 100);
|
||||
|
||||
if (blockposition != null) {
|
||||
ItemStack itemstack = ItemWorldMap.a(world, (double) blockposition.getX(), (double) blockposition.getZ(), (byte) 2, true, true);
|
||||
--
|
@ -5,15 +5,15 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index b6711dcfa..e7f63c927 100644
|
||||
index eb2a693af..b47bf9738 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
protected void o(Entity entity) {
|
||||
+ if (entity == this) throw new IllegalArgumentException("Entities cannot become a passenger of themselves"); // Paper - issue 572
|
||||
if (entity.bJ() != this) {
|
||||
if (entity.getVehicle() != this) {
|
||||
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
|
||||
} else {
|
||||
--
|
@ -7,7 +7,7 @@ Unloading Chunks async is extremely dangerous. This will force it to main
|
||||
the same way we handle async chunk loads.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 2e78cd8cf..4ffe0d208 100644
|
||||
index 4fd6d3dbf..013c5b4cf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main
|
||||
the same way we handle async chunk loads.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 23ed9efbf..c49711cad 100644
|
||||
index 1f2265231..e41850742 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
|
@ -8,10 +8,10 @@ Adds lots of information about why this orb exists.
|
||||
Replaces isFromBottle() with logic that persists entity reloads too.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index 352310960..3e2f52647 100644
|
||||
index ff110c8e9..d95587c8c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -0,0 +0,0 @@ public class Block {
|
||||
@@ -0,0 +0,0 @@ public class Block implements IMaterial {
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ index 352310960..3e2f52647 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
index a8cc6b61a..c925de971 100644
|
||||
index e5f064577..e237c5dc1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
@@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
@ -41,7 +41,7 @@ index a8cc6b61a..c925de971 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
||||
index bf5f1f0e8..d567ad4a5 100644
|
||||
index 3c888d601..79d80596d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
||||
@@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity {
|
||||
@ -86,13 +86,17 @@ index bf5f1f0e8..d567ad4a5 100644
|
||||
+ }
|
||||
+ nbttagcompound.set("Paper.ExpData", comp);
|
||||
+ }
|
||||
|
||||
public EntityExperienceOrb(World world, double d0, double d1, double d2, int i) {
|
||||
+ this(world, d0, d1, d2, i, null, null);
|
||||
+ }
|
||||
+
|
||||
+ public EntityExperienceOrb(World world, double d0, double d1, double d2, int i, org.bukkit.entity.ExperienceOrb.SpawnReason reason, Entity triggerId) {
|
||||
+ this(world, d0, d1, d2, i, reason, triggerId, null);
|
||||
+ }
|
||||
|
||||
- public EntityExperienceOrb(World world, double d0, double d1, double d2, int i) {
|
||||
+
|
||||
+ public EntityExperienceOrb(World world, double d0, double d1, double d2, int i, org.bukkit.entity.ExperienceOrb.SpawnReason reason, Entity triggerId, Entity sourceId) {
|
||||
super(world);
|
||||
super(EntityTypes.EXPERIENCE_ORB, world);
|
||||
+ this.sourceEntityId = sourceId != null ? sourceId.getUniqueID() : null;
|
||||
+ this.triggerEntityId = triggerId != null ? triggerId.getUniqueID() : null;
|
||||
+ this.spawnReason = reason != null ? reason : org.bukkit.entity.ExperienceOrb.SpawnReason.UNKNOWN;
|
||||
@ -116,7 +120,7 @@ index bf5f1f0e8..d567ad4a5 100644
|
||||
|
||||
public void d(EntityHuman entityhuman) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
index 6ac89d1e3..177d8582f 100644
|
||||
index 7440e4a2a..895254c15 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
|
||||
@ -127,9 +131,9 @@ index 6ac89d1e3..177d8582f 100644
|
||||
+ this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.owner, this)); // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
Item item = itemstack.getItem();
|
||||
if (itemstack1.getItem().a(TagsItem.G)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 9e864864d..38c043375 100644
|
||||
index 1b2e802ea..3a38f384e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -143,7 +147,7 @@ index 9e864864d..38c043375 100644
|
||||
this.expToDrop = 0;
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
|
||||
index 0255986fd..e14f614f5 100644
|
||||
index a5e1939e0..e73dba09a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
|
||||
@@ -0,0 +0,0 @@ public class EntityThrownExpBottle extends EntityProjectile {
|
||||
@ -156,7 +160,7 @@ index 0255986fd..e14f614f5 100644
|
||||
|
||||
this.die();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 57fcc3c05..a9c4ab10d 100644
|
||||
index dcc14aa11..0a9d9fd26 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
|
||||
@ -169,20 +173,20 @@ index 57fcc3c05..a9c4ab10d 100644
|
||||
|
||||
if (this.tradingPlayer instanceof EntityPlayer) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
|
||||
index 059671b54..444792ea0 100644
|
||||
index 4a128f707..b87096467 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
|
||||
@@ -0,0 +0,0 @@ public class PathfinderGoalBreed extends PathfinderGoal {
|
||||
if (this.a.getGameRules().getBoolean("doMobLoot")) {
|
||||
if (this.b.getGameRules().getBoolean("doMobLoot")) {
|
||||
// CraftBukkit start - use event experience
|
||||
if (experience > 0) {
|
||||
- this.a.addEntity(new EntityExperienceOrb(this.a, this.animal.locX, this.animal.locY, this.animal.locZ, experience));
|
||||
+ this.a.addEntity(new EntityExperienceOrb(this.a, this.animal.locX, this.animal.locY, this.animal.locZ, experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer, entityageable)); // Paper
|
||||
- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, experience));
|
||||
+ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer, entityageable)); // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
index a1689c065..a49b5c81a 100644
|
||||
index 33b508014..e34198e40 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerInteractManager {
|
||||
@ -195,7 +199,7 @@ index a1689c065..a49b5c81a 100644
|
||||
// CraftBukkit end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
|
||||
index 1dcf967a1..ed394f7a5 100644
|
||||
index 998662d9e..6b4eb7f05 100644
|
||||
--- a/src/main/java/net/minecraft/server/SlotFurnaceResult.java
|
||||
+++ b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.event.inventory.FurnaceExtractEvent;
|
||||
@ -208,16 +212,16 @@ index 1dcf967a1..ed394f7a5 100644
|
||||
|
||||
public SlotFurnaceResult(EntityHuman entityhuman, IInventory iinventory, int i, int j, int k) {
|
||||
@@ -0,0 +0,0 @@ public class SlotFurnaceResult extends Slot {
|
||||
while (i > 0) {
|
||||
j = EntityExperienceOrb.getOrbValue(i);
|
||||
i -= j;
|
||||
- this.a.world.addEntity(new EntityExperienceOrb(this.a.world, this.a.locX, this.a.locY + 0.5D, this.a.locZ + 0.5D, j));
|
||||
+ this.a.world.addEntity(new EntityExperienceOrb(this.a.world, this.a.locX, this.a.locY + 0.5D, this.a.locZ + 0.5D, j, org.bukkit.entity.ExperienceOrb.SpawnReason.FURNACE, getPlayer())); // Paper
|
||||
while (i > 0) {
|
||||
j = EntityExperienceOrb.getOrbValue(i);
|
||||
i -= j;
|
||||
- this.a.world.addEntity(new EntityExperienceOrb(this.a.world, this.a.locX, this.a.locY + 0.5D, this.a.locZ + 0.5D, j));
|
||||
+ this.a.world.addEntity(new EntityExperienceOrb(this.a.world, this.a.locX, this.a.locY + 0.5D, this.a.locZ + 0.5D, j, org.bukkit.entity.ExperienceOrb.SpawnReason.FURNACE, getPlayer())); // Paper
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 4ffe0d208..568a50ec4 100644
|
||||
index 013c5b4cf..817e29474 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Firework API's
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
index 48cdef5db..bd0ec95f2 100644
|
||||
index 4c2cdd4bc..abf8799c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
@ -26,7 +26,7 @@ index 48cdef5db..bd0ec95f2 100644
|
||||
+ private EntityLiving e;public EntityLiving getBoostedEntity() { return e; } // Paper - OBFHELPER
|
||||
|
||||
public EntityFireworks(World world) {
|
||||
super(world);
|
||||
super(EntityTypes.FIREWORK_ROCKET, world);
|
||||
@@ -0,0 +0,0 @@ public class EntityFireworks extends Entity {
|
||||
if (!itemstack.isEmpty()) {
|
||||
nbttagcompound.set("FireworksItem", itemstack.save(new NBTTagCompound()));
|
||||
@ -40,8 +40,8 @@ index 48cdef5db..bd0ec95f2 100644
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class EntityFireworks extends Entity {
|
||||
this.datawatcher.set(EntityFireworks.FIREWORK_ITEM, itemstack);
|
||||
}
|
||||
if (!itemstack.isEmpty()) {
|
||||
this.datawatcher.set(EntityFireworks.FIREWORK_ITEM, itemstack);
|
||||
}
|
||||
-
|
||||
+ // Paper start
|
||||
@ -51,19 +51,19 @@ index 48cdef5db..bd0ec95f2 100644
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public boolean bd() {
|
||||
public boolean bk() {
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||
index b0bb4aa23..44a997215 100644
|
||||
index 7b1d51e5a..b0863b4db 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||
@@ -0,0 +0,0 @@ public class ItemFireworks extends Item {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
EntityFireworks entityfireworks = new EntityFireworks(world, (double) ((float) blockposition.getX() + f), (double) ((float) blockposition.getY() + f1), (double) ((float) blockposition.getZ() + f2), itemstack);
|
||||
ItemStack itemstack = itemactioncontext.getItemStack();
|
||||
EntityFireworks entityfireworks = new EntityFireworks(world, (double) ((float) blockposition.getX() + itemactioncontext.m()), (double) ((float) blockposition.getY() + itemactioncontext.n()), (double) ((float) blockposition.getZ() + itemactioncontext.o()), itemstack);
|
||||
|
||||
+ entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper
|
||||
world.addEntity(entityfireworks);
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
itemstack.subtract(1);
|
||||
itemstack.subtract(1);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ItemFireworks extends Item {
|
||||
if (!world.isClientSide) {
|
||||
EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman);
|
||||
@ -73,10 +73,10 @@ index b0bb4aa23..44a997215 100644
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
itemstack.subtract(1);
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
index e15c23367..82c2537b3 100644
|
||||
index e658816c2..0d69deb51 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
@@ -0,0 +0,0 @@ public class NBTTagCompound extends NBTBase {
|
||||
@@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase {
|
||||
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ index e15c23367..82c2537b3 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
index 99746b3c2..d4fbe31d6 100644
|
||||
index 7b3b20682..b39e33f4f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix block break desync
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 4f8865d61..802008b4e 100644
|
||||
index b69c194bb..25e3d6423 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
@ -1,70 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 23 Jun 2016 23:33:57 -0400
|
||||
Subject: [PATCH] IllegalPacketEvent
|
||||
|
||||
Fired for invalid data from players that represents hacking attempts
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 09f1ef560..cca1c6aa3 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
+import com.destroystokyo.paper.event.player.IllegalPacketEvent; // Paper
|
||||
import co.aikar.timings.MinecraftTimings; // Paper
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
CraftEventFactory.handleEditBookEvent(player, itemstack1); // CraftBukkit
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
- PlayerConnection.LOGGER.error("Couldn\'t handle book info", exception);
|
||||
- this.disconnect("Invalid book data!"); // CraftBukkit
|
||||
+ IllegalPacketEvent.process(player.getBukkitEntity(), "InvalidBookEdit", "Invalid book data!", exception); // Paper
|
||||
}
|
||||
} else {
|
||||
String s1;
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
CraftEventFactory.handleEditBookEvent(player, itemstack2); // CraftBukkit
|
||||
}
|
||||
} catch (Exception exception1) {
|
||||
- PlayerConnection.LOGGER.error("Couldn\'t sign book", exception1);
|
||||
- this.disconnect("Invalid book data!"); // CraftBukkit
|
||||
+ IllegalPacketEvent.process(player.getBukkitEntity(), "InvalidBookSign", "Invalid book data!", exception1); // Paper
|
||||
}
|
||||
} else if ("MC|TrSel".equals(s)) {
|
||||
try {
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
((ContainerMerchant) container).d(j);
|
||||
}
|
||||
} catch (Exception exception2) {
|
||||
- PlayerConnection.LOGGER.error("Couldn\'t select trade", exception2);
|
||||
- this.disconnect("Invalid trade data!"); // CraftBukkit
|
||||
+ IllegalPacketEvent.process(player.getBukkitEntity(), "InvalidTrade", "Invalid trade data!", exception2); // Paper
|
||||
}
|
||||
} else {
|
||||
TileEntity tileentity;
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
iinventory.update();
|
||||
}
|
||||
} catch (Exception exception5) {
|
||||
- PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5);
|
||||
- this.disconnect("Invalid beacon data!"); // CraftBukkit
|
||||
+ IllegalPacketEvent.process(player.getBukkitEntity(), "InvalidBeacon", "Invalid beacon data!", exception5); // Paper
|
||||
}
|
||||
}
|
||||
} else if ("MC|ItemName".equals(s)) {
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(-2, k, this.player.inventory.getItem(k)));
|
||||
this.player.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(this.player.inventory.itemInHandIndex));
|
||||
} catch (Exception exception7) {
|
||||
- PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7);
|
||||
- this.disconnect("Invalid pick item!"); // CraftBukkit
|
||||
+ IllegalPacketEvent.process(player.getBukkitEntity(), "InvalidPickItem", "Invalid PickItem", exception7); // Paper
|
||||
}
|
||||
}
|
||||
// CraftBukkit start
|
||||
--
|
@ -6,24 +6,16 @@ Subject: [PATCH] Optimize ItemStack.isEmpty()
|
||||
Remove hashMap lookup every check, simplify code to remove ternary
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 5047a57e9..736686bed 100644
|
||||
index 70f2dcc9e..be6205275 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -0,0 +0,0 @@ public final class ItemStack {
|
||||
this.F();
|
||||
}
|
||||
|
||||
+ // Paper start - optimize isEmpty
|
||||
+ private static Item airItem;
|
||||
public boolean isEmpty() {
|
||||
- return this == ItemStack.a ? true : (this.item != null && this.item != Item.getItemOf(Blocks.AIR) ? (this.count <= 0 ? true : this.damage < -32768 || this.damage > '\uffff') : true);
|
||||
+ if (airItem == null) {
|
||||
+ airItem = Item.REGISTRY.get(new MinecraftKey("air"));
|
||||
+ }
|
||||
+ return this == ItemStack.a || this.item == null || this.item == airItem || (this.count <= 0 || (this.damage < -32768 || this.damage > '\uffff'));
|
||||
- return this == ItemStack.a ? true : (this.getItem() != null && this.getItem() != Items.AIR ? this.count <= 0 : true);
|
||||
+ return this == ItemStack.a || this.item == null || this.item == Items.AIR || this.count <= 0; // Paper
|
||||
}
|
||||
+ // Paper end
|
||||
|
||||
public static void a(DataConverterManager dataconvertermanager) {
|
||||
dataconvertermanager.a(DataConverterTypes.ITEM_INSTANCE, (DataInspector) (new DataInspectorBlockEntity()));
|
||||
public ItemStack cloneAndSubtract(int i) {
|
||||
--
|
@ -1,33 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Riley Park <rileysebastianpark@gmail.com>
|
||||
Date: Wed, 21 Dec 2016 11:52:04 -0600
|
||||
Subject: [PATCH] Option to prevent armor stands from doing entity lookups
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 2ba3bcb8e..5f06d4e5e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
log("Treasure Maps will return already discovered locations");
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public boolean armorStandEntityLookups = true;
|
||||
+ private void armorStandEntityLookups() {
|
||||
+ armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 424b956e8..b85c55168 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
|
||||
this.a(entity, axisalignedbb, false, arraylist);
|
||||
if (entity != null) {
|
||||
+ if (entity instanceof EntityArmorStand && !entity.world.paperConfig.armorStandEntityLookups) return arraylist; // Paper
|
||||
List list = this.getEntities(entity, axisalignedbb.g(0.25D));
|
||||
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
--
|
@ -6,7 +6,7 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
||||
Allows you to access the Gateway being used in a teleport event
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||
index cfce9274a..ecbc48b0c 100644
|
||||
index bb9822799..c3d30dc94 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||
@@ -0,0 +0,0 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Prevent Pathfinding out of World Border
|
||||
This prevents Entities from trying to run outside of the World Border
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index 3ac6f84d3..935b2e81e 100644
|
||||
index 0c5215657..05e0545fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
@@ -0,0 +0,0 @@ public abstract class NavigationAbstract {
|
||||
@ -26,7 +26,7 @@ index 3ac6f84d3..935b2e81e 100644
|
||||
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
||||
return this.c;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
index 9038d52eb..632eb1c9d 100644
|
||||
index 4763c30a8..ec5386fd5 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
@@ -0,0 +0,0 @@ public class WorldBorder {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Properly fix item duplication bug
|
||||
Credit to prplz for figuring out the real issue
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index f8e289475..cce3f98da 100644
|
||||
index cf2a39384..c91caf578 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -19,15 +19,16 @@ index f8e289475..cce3f98da 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index cca1c6aa3..3f9e60171 100644
|
||||
index 53d3e9775..b69c194bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
}
|
||||
|
||||
// CraftBukkit start - Add "isDisconnected" method
|
||||
public final boolean isDisconnected() {
|
||||
- return !this.player.joining && !this.networkManager.isConnected();
|
||||
+ return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
--
|
@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
||||
which creates copy of the collections.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 284dc6391..2e78cd8cf 100644
|
||||
index e516ec603..4fd6d3dbf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
@ -7,15 +7,15 @@ This ensures that Shulker Boxes can never drop their contents twice, and
|
||||
that the inventory is cleared incase it some how also got saved to the world.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockShulkerBox.java b/src/main/java/net/minecraft/server/BlockShulkerBox.java
|
||||
index 8811eb3e3..74e2e448f 100644
|
||||
index a823e7073..37ec634f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockShulkerBox.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockShulkerBox.java
|
||||
@@ -0,0 +0,0 @@ public class BlockShulkerBox extends BlockTileEntity {
|
||||
}
|
||||
|
||||
a(world, blockposition, itemstack);
|
||||
+ tileentityshulkerbox.clear(); // Paper - This was intended to be called in Vanilla (is checked in the if statement above if has been called) - Fixes dupe issues
|
||||
}
|
||||
|
||||
a(world, blockposition, itemstack);
|
||||
+ tileentityshulkerbox.clear(); // Paper - This was intended to be called in Vanilla (is checked in the if statement above if has been called) - Fixes dupe issues
|
||||
}
|
||||
|
||||
world.updateAdjacentComparators(blockposition, iblockdata.getBlock());
|
||||
--
|
@ -62,7 +62,7 @@ index a4b0901cf..02940d697 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 98e9da59a..a9186b77a 100644
|
||||
index 7d4355439..3c1f02c18 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -1,98 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Fri, 16 Dec 2016 22:10:35 -0600
|
||||
Subject: [PATCH] Vanished players don't have rights
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index f71528b5f..b13830e87 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
|
||||
private static double f = 1.0D;
|
||||
private static int entityCount;
|
||||
private int id;
|
||||
- public boolean i;
|
||||
+ public boolean i; public boolean blocksEntitySpawning() { return i; } // Paper - OBFHELPER
|
||||
public final List<Entity> passengers;
|
||||
protected int j;
|
||||
private Entity au;public void setVehicle(Entity entity) { this.au = entity; } // Paper // OBFHELPER
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
index 60149c1ca..a5730d1c7 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
@@ -0,0 +0,0 @@ public class ItemBlock extends Item {
|
||||
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
|
||||
- if (!itemstack.isEmpty() && entityhuman.a(blockposition, enumdirection, itemstack) && world.a(this.a, blockposition, false, enumdirection, (Entity) null)) {
|
||||
+ if (!itemstack.isEmpty() && entityhuman.a(blockposition, enumdirection, itemstack) && world.a(this.a, blockposition, false, enumdirection, entityhuman)) { // Paper - Pass entityhuman instead of null
|
||||
int i = this.filterData(itemstack.getData());
|
||||
IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index d7bf8378e..424b956e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
return this.a(axisalignedbb, (Entity) null);
|
||||
}
|
||||
|
||||
+ // Paper start - Based on method below
|
||||
+ /**
|
||||
+ * @param axisalignedbb area to search within
|
||||
+ * @param entity causing the action ex. block placer
|
||||
+ * @return if there are no visible players colliding
|
||||
+ */
|
||||
+ public boolean checkNoVisiblePlayerCollisions(AxisAlignedBB axisalignedbb, @Nullable Entity entity) {
|
||||
+ List list = this.getEntities((Entity) null, axisalignedbb);
|
||||
+
|
||||
+ for (int i = 0; i < list.size(); ++i) {
|
||||
+ Entity entity1 = (Entity) list.get(i);
|
||||
+
|
||||
+ if (entity instanceof EntityPlayer && entity1 instanceof EntityPlayer) {
|
||||
+ if (!((EntityPlayer) entity).getBukkitEntity().canSee(((EntityPlayer) entity1).getBukkitEntity())) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!entity1.dead && entity1.blocksEntitySpawning()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public boolean a(AxisAlignedBB axisalignedbb, @Nullable Entity entity) {
|
||||
List list = this.getEntities((Entity) null, axisalignedbb);
|
||||
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().d(this, blockposition);
|
||||
|
||||
// CraftBukkit start - store default return
|
||||
- boolean defaultReturn = axisalignedbb != Block.k && !this.a(axisalignedbb.a(blockposition), entity) ? false : (iblockdata.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL ? true : iblockdata.getMaterial().isReplaceable() && block.canPlace(this, blockposition, enumdirection));
|
||||
+ boolean defaultReturn = axisalignedbb != Block.k && !this.checkNoVisiblePlayerCollisions(axisalignedbb.a(blockposition), entity) ? false : (iblockdata.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL ? true : iblockdata.getMaterial().isReplaceable() && block.canPlace(this, blockposition, enumdirection)); // Paper - Use our entity search
|
||||
BlockCanBuildEvent event = new BlockCanBuildEvent(this.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftMagicNumbers.getId(block), defaultReturn);
|
||||
this.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 06a277b3b..5f816e44f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -0,0 +0,0 @@ public class CraftEventFactory {
|
||||
Projectile projectile = (Projectile) entity.getBukkitEntity();
|
||||
org.bukkit.entity.Entity collided = position.entity.getBukkitEntity();
|
||||
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);
|
||||
+
|
||||
+ if (projectile.getShooter() instanceof Player && collided instanceof Player) {
|
||||
+ if (!((Player) projectile.getShooter()).canSee((Player) collided)) {
|
||||
+ event.setCancelled(true);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
return event;
|
||||
}
|
||||
--
|
@ -1 +1 @@
|
||||
Subproject commit b4bff6fc3d3f80a7e297624f5d9dbf3ec7d6f6aa
|
||||
Subproject commit a71d06a0c8426f7d1d23f9e76ea6cdf47b666db5
|
@ -1 +1 @@
|
||||
Subproject commit 1d0aef704b8cca70ab2c71dbabad4a09b91287e3
|
||||
Subproject commit 11bdb291b30fed321b346668a4b5e4ddf45229b6
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren