use of be.isach.ultracosmetics.v1_14_R1.customentities.CustomGuardian in project UltraCosmetics by iSach.
the class MorphElderGuardian method onEquip.
@Override
protected void onEquip() {
super.onEquip();
World world = ((CraftWorld) getPlayer().getWorld()).getHandle();
customGuardian = new CustomGuardian(EntityTypes.ELDER_GUARDIAN, world);
customEntities.add(customGuardian);
customGuardian.check();
Location location = getPlayer().getLocation();
double x = location.getX();
double y = location.getY();
double z = location.getZ();
customGuardian.setLocation(x, y, z, 0, 0);
EntitySpawningManager.setBypass(true);
world.addEntity(customGuardian);
EntitySpawningManager.setBypass(false);
getPlayer().setPassenger(customGuardian.getBukkitEntity());
customGuardian.setInvisible(true);
}
use of be.isach.ultracosmetics.v1_14_R1.customentities.CustomGuardian in project UltraCosmetics by iSach.
the class MorphElderGuardian method onEquip.
@Override
protected void onEquip() {
super.onEquip();
World world = ((CraftWorld) getPlayer().getWorld()).getHandle();
customGuardian = new CustomGuardian(world);
customEntities.add(customGuardian);
customGuardian.check();
Location location = getPlayer().getLocation();
double x = location.getX();
double y = location.getY();
double z = location.getZ();
customGuardian.setLocation(x, y, z, 0, 0);
EntitySpawningManager.setBypass(true);
world.addEntity(customGuardian);
EntitySpawningManager.setBypass(false);
getPlayer().addPassenger(customGuardian.getBukkitEntity());
customGuardian.setInvisible(true);
}
use of be.isach.ultracosmetics.v1_14_R1.customentities.CustomGuardian in project UltraCosmetics by iSach.
the class MorphElderGuardian method onEquip.
@Override
protected void onEquip() {
super.onEquip();
Level world = ((CraftWorld) getPlayer().getWorld()).getHandle();
customGuardian = new CustomGuardian(EntityType.ELDER_GUARDIAN, world);
CustomEntities.addCustomEntity(customGuardian);
Location location = getPlayer().getLocation();
double x = location.getX();
double y = location.getY();
double z = location.getZ();
// the methods don't get properly re-obfuscated without casting like this
((Entity) customGuardian).moveTo(x, y, z, 0, 0);
EntitySpawningManager.setBypass(true);
((LevelWriter) world).addFreshEntity(customGuardian);
EntitySpawningManager.setBypass(false);
getPlayer().addPassenger(customGuardian.getBukkitEntity());
((Entity) customGuardian).setInvisible(true);
}
use of be.isach.ultracosmetics.v1_14_R1.customentities.CustomGuardian in project UltraCosmetics by iSach.
the class MorphElderGuardian method onEquip.
@Override
protected void onEquip() {
super.onEquip();
World world = ((CraftWorld) getPlayer().getWorld()).getHandle();
customGuardian = new CustomGuardian(world);
customEntities.add(customGuardian);
customGuardian.check();
Location location = getPlayer().getLocation();
double x = location.getX();
double y = location.getY();
double z = location.getZ();
customGuardian.setLocation(x, y, z, 0, 0);
EntitySpawningManager.setBypass(true);
world.addEntity(customGuardian);
EntitySpawningManager.setBypass(false);
getPlayer().setPassenger(customGuardian.getBukkitEntity());
customGuardian.setInvisible(true);
}
use of be.isach.ultracosmetics.v1_14_R1.customentities.CustomGuardian in project UltraCosmetics by iSach.
the class MorphElderGuardian method onEquip.
@Override
protected void onEquip() {
super.onEquip();
World world = ((CraftWorld) getPlayer().getWorld()).getHandle();
customGuardian = new CustomGuardian(EntityTypes.ELDER_GUARDIAN, world);
customEntities.add(customGuardian);
customGuardian.check();
Location location = getPlayer().getLocation();
double x = location.getX();
double y = location.getY();
double z = location.getZ();
customGuardian.setLocation(x, y, z, 0, 0);
EntitySpawningManager.setBypass(true);
world.addEntity(customGuardian);
EntitySpawningManager.setBypass(false);
getPlayer().setPassenger(customGuardian.getBukkitEntity());
customGuardian.setInvisible(true);
}
Aggregations