Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Added EntityThrownExpBottle for diff visibility.
Dieser Commit ist enthalten in:
Ursprung
71a51b024b
Commit
9055a20d71
44
src/main/java/net/minecraft/server/EntityThrownExpBottle.java
Normale Datei
44
src/main/java/net/minecraft/server/EntityThrownExpBottle.java
Normale Datei
@ -0,0 +1,44 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
public class EntityThrownExpBottle extends EntityProjectile {
|
||||
|
||||
public EntityThrownExpBottle(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public EntityThrownExpBottle(World world, EntityLiving entityliving) {
|
||||
super(world, entityliving);
|
||||
}
|
||||
|
||||
public EntityThrownExpBottle(World world, double d0, double d1, double d2) {
|
||||
super(world, d0, d1, d2);
|
||||
}
|
||||
|
||||
protected float e() {
|
||||
return 0.07F;
|
||||
}
|
||||
|
||||
protected float c() {
|
||||
return 0.7F;
|
||||
}
|
||||
|
||||
protected float d() {
|
||||
return -20.0F;
|
||||
}
|
||||
|
||||
protected void a(MovingObjectPosition movingobjectposition) {
|
||||
if (!this.world.isStatic) {
|
||||
this.world.triggerEffect(2002, (int) Math.round(this.locX), (int) Math.round(this.locY), (int) Math.round(this.locZ), 0);
|
||||
int i = 3 + this.world.random.nextInt(5) + this.world.random.nextInt(5);
|
||||
|
||||
while (i > 0) {
|
||||
int j = EntityExperienceOrb.getOrbValue(i);
|
||||
|
||||
i -= j;
|
||||
this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j));
|
||||
}
|
||||
|
||||
this.die();
|
||||
}
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren