Update to Minecraft 1.11

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-11-17 12:41:03 +11:00
parent 49bc1c57f9
commit 4e412ab4e3
279 changed files with 3722 additions and 2992 deletions

View File

@@ -1,13 +1,15 @@
--- a/net/minecraft/server/EntityTNTPrimed.java
+++ b/net/minecraft/server/EntityTNTPrimed.java
@@ -1,10 +1,14 @@
@@ -1,6 +1,7 @@
package net.minecraft.server;
import javax.annotation.Nullable;
+import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit
+
public class EntityTNTPrimed extends Entity {
private static final DataWatcherObject<Integer> FUSE_TICKS = DataWatcher.a(EntityTNTPrimed.class, DataWatcherRegistry.b);
@@ -8,6 +9,8 @@
@Nullable
private EntityLiving source;
private int c;
+ public float yield = 4; // CraftBukkit - add field
@@ -15,7 +17,7 @@
public EntityTNTPrimed(World world) {
super(world);
@@ -60,10 +64,13 @@
@@ -63,10 +66,13 @@
--this.c;
if (this.c <= 0) {
@@ -30,7 +32,7 @@
} else {
this.ak();
this.world.addParticle(EnumParticle.SMOKE_NORMAL, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D, new int[0]);
@@ -72,9 +79,18 @@
@@ -75,9 +81,17 @@
}
private void explode() {
@@ -40,7 +42,6 @@
- this.world.explode(this, this.locX, this.locY + (double) (this.length / 16.0F), this.locZ, 4.0F, true);
+ org.bukkit.craftbukkit.CraftServer server = this.world.getServer();
+
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) org.bukkit.craftbukkit.entity.CraftEntity.getEntity(server, this));
+ server.getPluginManager().callEvent(event);
+