@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/server/Explosion.java
|
||||
+++ b/net/minecraft/server/Explosion.java
|
||||
@@ -15,6 +15,13 @@
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/Explosion.java
|
||||
+++ b/net/minecraft/world/level/Explosion.java
|
||||
@@ -42,6 +42,14 @@
|
||||
import net.minecraft.world.phys.MovingObjectPosition;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.entity.item.EntityFallingBlock;
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
+import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
+import org.bukkit.Location;
|
||||
@@ -14,7 +15,7 @@
|
||||
public class Explosion {
|
||||
|
||||
private static final ExplosionDamageCalculator a = new ExplosionDamageCalculator();
|
||||
@@ -32,11 +39,12 @@
|
||||
@@ -59,11 +67,12 @@
|
||||
private final ExplosionDamageCalculator l;
|
||||
private final List<BlockPosition> blocks = Lists.newArrayList();
|
||||
private final Map<EntityHuman, Vec3D> n = Maps.newHashMap();
|
||||
@@ -28,7 +29,7 @@
|
||||
this.posX = d0;
|
||||
this.posY = d1;
|
||||
this.posZ = d2;
|
||||
@@ -86,6 +94,11 @@
|
||||
@@ -113,6 +122,11 @@
|
||||
}
|
||||
|
||||
public void a() {
|
||||
@@ -40,7 +41,7 @@
|
||||
Set<BlockPosition> set = Sets.newHashSet();
|
||||
boolean flag = true;
|
||||
|
||||
@@ -119,7 +132,7 @@
|
||||
@@ -146,7 +160,7 @@
|
||||
f -= ((Float) optional.get() + 0.3F) * 0.3F;
|
||||
}
|
||||
|
||||
@@ -49,7 +50,7 @@
|
||||
set.add(blockposition);
|
||||
}
|
||||
|
||||
@@ -163,7 +176,16 @@
|
||||
@@ -190,7 +204,16 @@
|
||||
double d12 = (double) a(vec3d, entity);
|
||||
double d13 = (1.0D - d7) * d12;
|
||||
|
||||
@@ -67,7 +68,7 @@
|
||||
double d14 = d13;
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
@@ -205,6 +227,51 @@
|
||||
@@ -232,6 +255,51 @@
|
||||
|
||||
Collections.shuffle(this.blocks, this.world.random);
|
||||
Iterator iterator = this.blocks.iterator();
|
||||
@@ -119,7 +120,7 @@
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
BlockPosition blockposition = (BlockPosition) iterator.next();
|
||||
@@ -219,8 +286,8 @@
|
||||
@@ -246,8 +314,8 @@
|
||||
TileEntity tileentity = block.isTileEntity() ? this.world.getTileEntity(blockposition) : null;
|
||||
LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.ORIGIN, Vec3D.a((BaseBlockPosition) blockposition)).set(LootContextParameters.TOOL, ItemStack.b).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity).setOptional(LootContextParameters.THIS_ENTITY, this.source);
|
||||
|
||||
@@ -130,7 +131,7 @@
|
||||
}
|
||||
|
||||
iblockdata.a(loottableinfo_builder).forEach((itemstack) -> {
|
||||
@@ -250,7 +317,11 @@
|
||||
@@ -277,7 +345,11 @@
|
||||
BlockPosition blockposition2 = (BlockPosition) iterator1.next();
|
||||
|
||||
if (this.d.nextInt(3) == 0 && this.world.getType(blockposition2).isAir() && this.world.getType(blockposition2.down()).i(this.world, blockposition2.down())) {
|
||||
@@ -143,7 +144,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -258,6 +329,7 @@
|
||||
@@ -285,6 +357,7 @@
|
||||
}
|
||||
|
||||
private static void a(ObjectArrayList<Pair<ItemStack, BlockPosition>> objectarraylist, ItemStack itemstack, BlockPosition blockposition) {
|
||||
|
||||
Reference in New Issue
Block a user