mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
Adding all Entities into CraftBukkit.
These are needed to properly allow for determining class type, in accordance with current practice.
This commit is contained in:
committed by
Dinner Bone
parent
5f2c8108b7
commit
5209e17e1b
71
src/main/java/net/minecraft/server/EntityTNTPrimed.java
Normal file
71
src/main/java/net/minecraft/server/EntityTNTPrimed.java
Normal file
@@ -0,0 +1,71 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
public class EntityTNTPrimed extends Entity {
|
||||
|
||||
public int a;
|
||||
|
||||
public EntityTNTPrimed(World world) {
|
||||
super(world);
|
||||
a = 0;
|
||||
i = true;
|
||||
a(0.98F, 0.98F);
|
||||
H = J / 2.0F;
|
||||
}
|
||||
|
||||
public EntityTNTPrimed(World world, double d1, double d2, double d3) {
|
||||
this(world);
|
||||
a(d1, d2, d3);
|
||||
float f = (float) (Math.random() * 3.1415927410125732D * 2D);
|
||||
|
||||
s = -MathHelper.a((f * 3.141593F) / 180F) * 0.02F;
|
||||
t = 0.20000000298023224D;
|
||||
u = -MathHelper.b((f * 3.141593F) / 180F) * 0.02F;
|
||||
M = false;
|
||||
a = 80;
|
||||
m = d1;
|
||||
n = d2;
|
||||
o = d3;
|
||||
}
|
||||
|
||||
protected void a() {}
|
||||
|
||||
public boolean c_() {
|
||||
return !G;
|
||||
}
|
||||
|
||||
public void b_() {
|
||||
m = p;
|
||||
n = q;
|
||||
o = r;
|
||||
t -= 0.039999999105930328D;
|
||||
c(s, t, u);
|
||||
s *= 0.98000001907348633D;
|
||||
t *= 0.98000001907348633D;
|
||||
u *= 0.98000001907348633D;
|
||||
if (A) {
|
||||
s *= 0.69999998807907104D;
|
||||
u *= 0.69999998807907104D;
|
||||
t *= -0.5D;
|
||||
}
|
||||
if (a-- <= 0) {
|
||||
q();
|
||||
d();
|
||||
} else {
|
||||
l.a("smoke", p, q + 0.5D, r, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
private void d() {
|
||||
float f = 4F;
|
||||
|
||||
l.a(((Entity) (null)), p, q, r, f);
|
||||
}
|
||||
|
||||
protected void a(NBTTagCompound nbttagcompound) {
|
||||
nbttagcompound.a("Fuse", (byte) a);
|
||||
}
|
||||
|
||||
protected void b(NBTTagCompound nbttagcompound) {
|
||||
a = ((int) (nbttagcompound.b("Fuse")));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user