@@ -1,7 +1,15 @@
|
||||
--- a/net/minecraft/world/level/block/state/BlockBase.java
|
||||
+++ b/net/minecraft/world/level/block/state/BlockBase.java
|
||||
@@ -1,3 +1,4 @@
|
||||
+// mc-dev import
|
||||
package net.minecraft.world.level.block.state;
|
||||
@@ -188,8 +188,10 @@
|
||||
TileEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition) : null;
|
||||
LootParams.a lootparams_a = (new LootParams.a(worldserver)).withParameter(LootContextParameters.ORIGIN, Vec3D.atCenterOf(blockposition)).withParameter(LootContextParameters.TOOL, ItemStack.EMPTY).withOptionalParameter(LootContextParameters.BLOCK_ENTITY, tileentity).withOptionalParameter(LootContextParameters.THIS_ENTITY, explosion.getDirectSourceEntity());
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
- if (explosion.getBlockInteraction() == Explosion.Effect.DESTROY_WITH_DECAY) {
|
||||
- lootparams_a.withParameter(LootContextParameters.EXPLOSION_RADIUS, explosion.radius());
|
||||
+ // CraftBukkit start - add yield
|
||||
+ if (explosion.yield < 1.0F) {
|
||||
+ lootparams_a.withParameter(LootContextParameters.EXPLOSION_RADIUS, 1.0F / explosion.yield);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
iblockdata.spawnAfterBreak(worldserver, blockposition, ItemStack.EMPTY, flag);
|
||||
|
||||
Reference in New Issue
Block a user