mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/Explosion.java
|
||||
+++ b/net/minecraft/world/level/Explosion.java
|
||||
@@ -40,6 +40,15 @@
|
||||
@@ -41,6 +41,15 @@
|
||||
import net.minecraft.world.phys.MovingObjectPosition;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
public class Explosion {
|
||||
|
||||
private static final ExplosionDamageCalculator EXPLOSION_DAMAGE_CALCULATOR = new ExplosionDamageCalculator();
|
||||
@@ -58,6 +67,7 @@
|
||||
@@ -59,6 +68,7 @@
|
||||
private final ExplosionDamageCalculator damageCalculator;
|
||||
private final ObjectArrayList<BlockPosition> toBlow;
|
||||
private final Map<EntityHuman, Vec3D> hitPlayers;
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
public Explosion(World world, @Nullable Entity entity, double d0, double d1, double d2, float f, List<BlockPosition> list) {
|
||||
this(world, entity, d0, d1, d2, f, false, Explosion.Effect.DESTROY_WITH_DECAY, list);
|
||||
@@ -78,7 +88,7 @@
|
||||
@@ -79,7 +89,7 @@
|
||||
this.hitPlayers = Maps.newHashMap();
|
||||
this.level = world;
|
||||
this.source = entity;
|
||||
@@ -33,7 +33,7 @@
|
||||
this.x = d0;
|
||||
this.y = d1;
|
||||
this.z = d2;
|
||||
@@ -128,6 +138,11 @@
|
||||
@@ -129,6 +139,11 @@
|
||||
}
|
||||
|
||||
public void explode() {
|
||||
@@ -45,7 +45,7 @@
|
||||
this.level.gameEvent(this.source, GameEvent.EXPLODE, new Vec3D(this.x, this.y, this.z));
|
||||
Set<BlockPosition> set = Sets.newHashSet();
|
||||
boolean flag = true;
|
||||
@@ -211,7 +226,39 @@
|
||||
@@ -213,7 +228,39 @@
|
||||
double d12 = (double) getSeenPercent(vec3d, entity);
|
||||
double d13 = (1.0D - d7) * d12;
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
double d14;
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
@@ -263,11 +310,66 @@
|
||||
@@ -265,11 +312,66 @@
|
||||
|
||||
SystemUtils.shuffle(this.toBlow, this.level.random);
|
||||
ObjectListIterator objectlistiterator = this.toBlow.iterator();
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
if (!iblockdata.isAir()) {
|
||||
BlockPosition blockposition1 = blockposition.immutable();
|
||||
@@ -281,8 +383,8 @@
|
||||
@@ -283,8 +385,8 @@
|
||||
TileEntity tileentity = iblockdata.hasBlockEntity() ? this.level.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, this.source);
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
}
|
||||
|
||||
iblockdata.spawnAfterBreak(worldserver, blockposition, ItemStack.EMPTY, flag2);
|
||||
@@ -314,7 +416,11 @@
|
||||
@@ -316,7 +418,11 @@
|
||||
BlockPosition blockposition2 = (BlockPosition) objectlistiterator1.next();
|
||||
|
||||
if (this.random.nextInt(3) == 0 && this.level.getBlockState(blockposition2).isAir() && this.level.getBlockState(blockposition2.below()).isSolidRender(this.level, blockposition2.below())) {
|
||||
@@ -177,7 +177,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -326,6 +432,7 @@
|
||||
@@ -328,6 +434,7 @@
|
||||
}
|
||||
|
||||
private static void addBlockDrops(ObjectArrayList<Pair<ItemStack, BlockPosition>> objectarraylist, ItemStack itemstack, BlockPosition blockposition) {
|
||||
|
Reference in New Issue
Block a user