Restore a constructor that was removed in EntityFallingBlock
Dieser Commit ist enthalten in:
Ursprung
60136e77fe
Commit
a7600285a6
@ -1,6 +1,6 @@
|
||||
From a3fff475189a1edc286a2305139ff98d8e73eb0a Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Fri, 17 Apr 2015 02:26:14 -0700
|
||||
From c5e8524e67e8def786c77dc219c459d0ef932b4a Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Sun, 6 Dec 2015 17:12:38 -0600
|
||||
Subject: [PATCH] Add FallingBlock source location API
|
||||
|
||||
|
||||
@ -37,10 +37,10 @@ index 29f8554..1d952b8 100644
|
||||
this.a(entityfallingblock);
|
||||
world.addEntity(entityfallingblock);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 86556cd..aeade54 100644
|
||||
index 86556cd..b34e93c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -16,13 +16,22 @@ public class EntityFallingBlock extends Entity {
|
||||
@@ -16,13 +16,26 @@ public class EntityFallingBlock extends Entity {
|
||||
private int fallHurtMax = 40;
|
||||
private float fallHurtAmount = 2.0F;
|
||||
public NBTTagCompound tileEntityData;
|
||||
@ -56,7 +56,10 @@ index 86556cd..aeade54 100644
|
||||
+ sourceLoc = loc;
|
||||
}
|
||||
|
||||
- public EntityFallingBlock(World world, double d0, double d1, double d2, IBlockData iblockdata) {
|
||||
public EntityFallingBlock(World world, double d0, double d1, double d2, IBlockData iblockdata) {
|
||||
+ this(null, world, d0, d1, d2, iblockdata);
|
||||
+ }
|
||||
+
|
||||
+ public EntityFallingBlock(org.bukkit.Location loc, World world, double d0, double d1, double d2, IBlockData iblockdata) {
|
||||
super(world);
|
||||
+ sourceLoc = loc;
|
||||
@ -64,7 +67,7 @@ index 86556cd..aeade54 100644
|
||||
this.block = iblockdata;
|
||||
this.k = true;
|
||||
this.setSize(0.98F, 0.98F);
|
||||
@@ -197,7 +206,13 @@ public class EntityFallingBlock extends Entity {
|
||||
@@ -197,7 +210,13 @@ public class EntityFallingBlock extends Entity {
|
||||
if (this.tileEntityData != null) {
|
||||
nbttagcompound.set("TileEntityData", this.tileEntityData);
|
||||
}
|
||||
@ -79,7 +82,7 @@ index 86556cd..aeade54 100644
|
||||
}
|
||||
|
||||
protected void a(NBTTagCompound nbttagcompound) {
|
||||
@@ -233,7 +248,14 @@ public class EntityFallingBlock extends Entity {
|
||||
@@ -233,7 +252,14 @@ public class EntityFallingBlock extends Entity {
|
||||
if (block == null || block.getMaterial() == Material.AIR) {
|
||||
this.block = Blocks.SAND.getBlockData();
|
||||
}
|
||||
@ -95,35 +98,6 @@ index 86556cd..aeade54 100644
|
||||
}
|
||||
|
||||
public void a(boolean flag) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 05b88fd..4402d57 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -886,7 +886,10 @@ public class CraftWorld implements World {
|
||||
double y = location.getBlockY() + 0.5;
|
||||
double z = location.getBlockZ() + 0.5;
|
||||
|
||||
- EntityFallingBlock entity = new EntityFallingBlock(world, x, y, z, net.minecraft.server.Block.getById(material.getId()).fromLegacyData(data));
|
||||
+ // PaperSpigot start - Add FallingBlock source location API
|
||||
+ location = location.clone();
|
||||
+ EntityFallingBlock entity = new EntityFallingBlock(location, world, x, y, z, net.minecraft.server.Block.getById(material.getId()).fromLegacyData(data));
|
||||
+ // PaperSpigot end
|
||||
entity.ticksLived = 1;
|
||||
|
||||
world.addEntity(entity, SpawnReason.CUSTOM);
|
||||
@@ -921,8 +924,10 @@ public class CraftWorld implements World {
|
||||
IBlockData blockData = world.getType(new BlockPosition(x, y, z));
|
||||
int type = CraftMagicNumbers.getId(blockData.getBlock());
|
||||
int data = blockData.getBlock().toLegacyData(blockData);
|
||||
-
|
||||
- entity = new EntityFallingBlock(world, x + 0.5, y + 0.5, z + 0.5, net.minecraft.server.Block.getById(type).fromLegacyData(data));
|
||||
+ // PaperSpigot start - Add FallingBlock source location API
|
||||
+ location = location.clone();
|
||||
+ entity = new EntityFallingBlock(location, world, x + 0.5, y + 0.5, z + 0.5, net.minecraft.server.Block.getById(type).fromLegacyData(data));
|
||||
+ // PaperSpigot end
|
||||
} else if (Projectile.class.isAssignableFrom(clazz)) {
|
||||
if (Snowball.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntitySnowball(world, x, y, z);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingSand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingSand.java
|
||||
index 75eed48..eedb66f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingSand.java
|
||||
@ -141,5 +115,5 @@ index 75eed48..eedb66f 100644
|
||||
+ // PaperSpigot end
|
||||
}
|
||||
--
|
||||
2.5.2
|
||||
2.6.3
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2cee191c817dee1d51419f6461e6a02f6be791fa Mon Sep 17 00:00:00 2001
|
||||
From 3dce862b73862649830c363a11c30e0e2b27ea78 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Tue, 30 Jun 2015 20:45:24 -0700
|
||||
Subject: [PATCH] Force load chunks for specific entities that fly through
|
||||
@ -79,7 +79,7 @@ index f4b5032..319c0bc 100644
|
||||
|
||||
protected void a(MovingObjectPosition movingobjectposition) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index aeade54..ba1cadb 100644
|
||||
index b34e93c..f2d0eee 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -26,6 +26,7 @@ public class EntityFallingBlock extends Entity {
|
||||
@ -89,8 +89,8 @@ index aeade54..ba1cadb 100644
|
||||
+ this.loadChunks = world.paperSpigotConfig.loadUnloadedFallingBlocks; // PaperSpigot
|
||||
}
|
||||
|
||||
public EntityFallingBlock(org.bukkit.Location loc, World world, double d0, double d1, double d2, IBlockData iblockdata) {
|
||||
@@ -42,6 +43,7 @@ public class EntityFallingBlock extends Entity {
|
||||
public EntityFallingBlock(World world, double d0, double d1, double d2, IBlockData iblockdata) {
|
||||
@@ -46,6 +47,7 @@ public class EntityFallingBlock extends Entity {
|
||||
this.lastX = d0;
|
||||
this.lastY = d1;
|
||||
this.lastZ = d2;
|
||||
@ -202,5 +202,5 @@ index d6311bd..5b0c64d 100644
|
||||
return true;
|
||||
}
|
||||
--
|
||||
2.6.1.windows.1
|
||||
2.6.3
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 513c7165df7e3a5308123b771ed5e59fc0151c0b Mon Sep 17 00:00:00 2001
|
||||
From bc36db0be50fef7b6769cb38af1ad11897f822c4 Mon Sep 17 00:00:00 2001
|
||||
From: Iceee <andrew@opticgaming.tv>
|
||||
Date: Thu, 4 Jun 2015 13:55:02 -0700
|
||||
Subject: [PATCH] Configurable TNT cannon fix
|
||||
@ -172,10 +172,10 @@ index bc07d3d..cc7a1e3 100644
|
||||
world.getServer().getPluginManager().callEvent(event);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index ba1cadb..e559049 100644
|
||||
index f2d0eee..36c384e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -278,4 +278,22 @@ public class EntityFallingBlock extends Entity {
|
||||
@@ -282,4 +282,22 @@ public class EntityFallingBlock extends Entity {
|
||||
public IBlockData getBlock() {
|
||||
return this.block;
|
||||
}
|
||||
@ -346,5 +346,5 @@ index d2fe995..beeaa0b 100644
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.5.2
|
||||
2.6.3
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren