Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Drop skulls like every other block. Fixes BUKKIT-2678
Instead of having a special case for skulls just use the normal logic for breaking a block. This avoids issues when interacting with API.
Dieser Commit ist enthalten in:
Ursprung
f4cdf8fe98
Commit
d16f8c5e65
@ -78,7 +78,8 @@ public class BlockSkull extends BlockContainer {
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) {}
|
// CraftBukkit - drop the item like every other block
|
||||||
|
// public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) {}
|
||||||
|
|
||||||
public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {
|
public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {
|
||||||
if (entityhuman.abilities.canInstantlyBuild) {
|
if (entityhuman.abilities.canInstantlyBuild) {
|
||||||
@ -91,9 +92,11 @@ public class BlockSkull extends BlockContainer {
|
|||||||
|
|
||||||
public void remove(World world, int i, int j, int k, int l, int i1) {
|
public void remove(World world, int i, int j, int k, int l, int i1) {
|
||||||
if (!world.isStatic) {
|
if (!world.isStatic) {
|
||||||
|
/* CraftBukkit start - don't special code dropping the item
|
||||||
if ((i1 & 8) == 0) {
|
if ((i1 & 8) == 0) {
|
||||||
this.a(world, i, j, k, new ItemStack(Item.SKULL.id, 1, this.getDropData(world, i, j, k)));
|
this.a(world, i, j, k, new ItemStack(Item.SKULL.id, 1, this.getDropData(world, i, j, k)));
|
||||||
}
|
}
|
||||||
|
// CraftBukkit end */
|
||||||
|
|
||||||
super.remove(world, i, j, k, l, i1);
|
super.remove(world, i, j, k, l, i1);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren