3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-19 04:50:06 +01:00

Implemented new EnderCrystal entity class

Dieser Commit ist enthalten in:
Nathan Adams 2011-11-21 22:39:33 +00:00
Ursprung 0a8bd56f16
Commit a83fc1d6a2
3 geänderte Dateien mit 20 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -730,6 +730,9 @@ public class CraftWorld implements World {
} }
} else if (EnderSignal.class.isAssignableFrom(clazz)) { } else if (EnderSignal.class.isAssignableFrom(clazz)) {
entity = new EntityEnderSignal(world, x, y, z); entity = new EntityEnderSignal(world, x, y, z);
} else if (EnderCrystal.class.isAssignableFrom(clazz)) {
entity = new EntityEnderCrystal(world);
entity.setPositionRotation(x, y, z, 0, 0);
} else if (LivingEntity.class.isAssignableFrom(clazz)) { } else if (LivingEntity.class.isAssignableFrom(clazz)) {
if (Chicken.class.isAssignableFrom(clazz)) { if (Chicken.class.isAssignableFrom(clazz)) {
entity = new EntityChicken(world); entity = new EntityChicken(world);

Datei anzeigen

@ -0,0 +1,16 @@
package org.bukkit.craftbukkit.entity;
import net.minecraft.server.Entity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EnderSignal;
public class CraftEnderCrystal extends CraftEntity implements EnderSignal {
public CraftEnderCrystal(CraftServer server, Entity entity) {
super(server, entity);
}
@Override
public String toString() {
return "CraftEnderSignal";
}
}

Datei anzeigen

@ -110,6 +110,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
else { return new CraftFireball(server, (EntityFireball) entity); } else { return new CraftFireball(server, (EntityFireball) entity); }
} }
else if (entity instanceof EntityEnderSignal) { return new CraftEnderSignal(server, (EntityEnderSignal) entity); } else if (entity instanceof EntityEnderSignal) { return new CraftEnderSignal(server, (EntityEnderSignal) entity); }
else if (entity instanceof EntityEnderCrystal) { return new CraftEnderCrystal(server, (EntityEnderCrystal) entity); }
else if (entity instanceof EntityFishingHook) { return new CraftFish(server, (EntityFishingHook) entity); } else if (entity instanceof EntityFishingHook) { return new CraftFish(server, (EntityFishingHook) entity); }
else if (entity instanceof EntityItem) { return new CraftItem(server, (EntityItem) entity); } else if (entity instanceof EntityItem) { return new CraftItem(server, (EntityItem) entity); }
else if (entity instanceof EntityWeather) { else if (entity instanceof EntityWeather) {