#1159: Add missing API for explosive minecarts

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot
2023-04-02 13:21:31 +10:00
parent c48c822440
commit ad8f95c3df
2 changed files with 53 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/vehicle/EntityMinecartTNT.java
+++ b/net/minecraft/world/entity/vehicle/EntityMinecartTNT.java
@@ -23,6 +23,10 @@
@@ -23,10 +23,14 @@
import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.level.material.Fluid;
@@ -11,6 +11,20 @@
public class EntityMinecartTNT extends EntityMinecartAbstract {
private static final byte EVENT_PRIME = 10;
- private int fuse = -1;
+ public int fuse = -1;
public EntityMinecartTNT(EntityTypes<? extends EntityMinecartTNT> entitytypes, World world) {
super(entitytypes, world);
@@ -103,7 +107,7 @@
return Items.TNT_MINECART;
}
- protected void explode(double d0) {
+ public void explode(double d0) {
this.explode((DamageSource) null, d0);
}
@@ -115,7 +119,15 @@
d1 = 5.0D;
}