geforkt von Mirrors/Paper
Cat has luckily since stopped singing
Dieser Commit ist enthalten in:
Ursprung
e97bf6933c
Commit
9d837fe4b6
@ -1,10 +1,7 @@
|
||||
--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -47,8 +_,14 @@
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.HitResult;
|
||||
@@ -49,6 +_,11 @@
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start;
|
||||
@ -28,20 +25,23 @@
|
||||
|
||||
public static FallingBlockEntity fall(Level level, BlockPos pos, BlockState blockState) {
|
||||
+ // CraftBukkit start
|
||||
+ return FallingBlockEntity.fall(level, pos, blockState, CreatureSpawnEvent.SpawnReason.DEFAULT);
|
||||
+ return FallingBlockEntity.fall(level, pos, blockState, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
|
||||
+ }
|
||||
+ public static FallingBlockEntity fall(Level level, BlockPos pos, BlockState blockState, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
+ public static FallingBlockEntity fall(Level level, BlockPos pos, BlockState blockState, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason creatureSpawnReason) {
|
||||
FallingBlockEntity fallingBlockEntity = new FallingBlockEntity(
|
||||
level,
|
||||
pos.getX() + 0.5,
|
||||
@@ -89,6 +_,7 @@
|
||||
@@ -89,8 +_,9 @@
|
||||
? blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false))
|
||||
: blockState
|
||||
);
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(fallingBlockEntity, pos, blockState.getFluidState().createLegacyBlock())) return fallingBlockEntity; // CraftBukkit
|
||||
level.setBlock(pos, blockState.getFluidState().createLegacyBlock(), 3);
|
||||
level.addFreshEntity(fallingBlockEntity);
|
||||
- level.addFreshEntity(fallingBlockEntity);
|
||||
+ level.addFreshEntity(fallingBlockEntity, creatureSpawnReason); // CraftBukkit
|
||||
return fallingBlockEntity;
|
||||
}
|
||||
|
||||
@@ -139,13 +_,22 @@
|
||||
@Override
|
||||
public void tick() {
|
||||
|
@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
@VisibleForDebug
|
||||
@@ -325,11 +_,16 @@
|
||||
@@ -325,7 +_,9 @@
|
||||
@Override
|
||||
protected void finishConversion(ServerLevel serverLevel) {
|
||||
PiglinAi.cancelAdmiring(serverLevel, this);
|
||||
@ -73,13 +73,6 @@
|
||||
super.finishConversion(serverLevel);
|
||||
}
|
||||
|
||||
+
|
||||
private ItemStack createSpawnWeapon() {
|
||||
+ // Food time for 10 minutes WOOP WOOP
|
||||
+ // Please send help cat started singing
|
||||
return this.random.nextFloat() < 0.5 ? new ItemStack(Items.CROSSBOW) : new ItemStack(Items.GOLDEN_SWORD);
|
||||
}
|
||||
|
||||
@@ -400,7 +_,7 @@
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren