2
0
Fork 0

Void dagger small rework,

carriageRoad objects
main
KeyLime17 5 months ago
parent a02e41e958
commit fcd30e2b4a

@ -0,0 +1,14 @@
package com.zivilon.cinder_loe.carriage;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CarriageRoad {
String name;
List<CarriageRoad> neighbors;
List<CarriageDestination> destinations;
}
Map<String, CarriageRoad> roads = new HashMap<>();

@ -37,11 +37,34 @@ public class VoidDagger extends LOTRItemDagger {
return true; return true;
} }
public void onKillEntity(EntityLivingBase entityKilled, EntityLivingBase killer) { public void onKillEntity(EntityLivingBase entityKilled, EntityLivingBase killer) {
if (killer instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) killer; EntityPlayer player = (EntityPlayer) killer;
LOTRFaction faction = getFaction(player); LOTRFaction faction = getFaction(player);
entityKilled.worldObj.playSoundAtEntity(player, "mob.zombie.unfect", 1F,1F); entityKilled.worldObj.playSoundAtEntity(player, "mob.zombie.unfect", 1F,1F);
// God forgive me for a million If Statements instead of a Switch Case
if (!entityKilled.worldObj.isRemote && entityKilled instanceof EntityPlayer) {
CorruptMan entity = new CorruptMan(entityKilled.worldObj);
entity.copyLocationAndAnglesFrom(entityKilled);
for (int i = 0; i < 4; i++) {
ItemStack armor = entityKilled.getEquipmentInSlot(i + 1); // Armor slots
entity.setCurrentItemOrArmor(i + 1, armor);
}
ItemStack mainWeapon = ((LOTREntityMan) entityKilled).npcItemsInv.getMeleeWeapon(); // Main hand weapon
entity.npcItemsInv.setIdleItem(mainWeapon);
entity.npcItemsInv.setMeleeWeapon(mainWeapon);
entity.setHealth(20);
entity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 9999, 0));
entity.setCustomNameTag(((EntityPlayer) entityKilled).getDisplayName());
entityKilled.worldObj.removeEntity(entityKilled);
entity.onSpawnWithEgg((IEntityLivingData) null);
entityKilled.worldObj.spawnEntityInWorld(entity);
entityKilled.worldObj.playAuxSFXAtEntity(null, 1016, (int) entity.posX, (int) entity.posY, (int) entity.posZ, 0);
}
if (!entityKilled.worldObj.isRemote && entityKilled instanceof LOTREntityOrc) { if (!entityKilled.worldObj.isRemote && entityKilled instanceof LOTREntityOrc) {
CorruptOrc corruptOrc = new CorruptOrc(entityKilled.worldObj); CorruptOrc corruptOrc = new CorruptOrc(entityKilled.worldObj);
corruptOrc.copyLocationAndAnglesFrom(entityKilled); corruptOrc.copyLocationAndAnglesFrom(entityKilled);
@ -86,7 +109,6 @@ public class VoidDagger extends LOTRItemDagger {
entityKilled.worldObj.spawnEntityInWorld(entity); entityKilled.worldObj.spawnEntityInWorld(entity);
entityKilled.worldObj.playAuxSFXAtEntity(null, 1016, (int) entity.posX, (int) entity.posY, (int) entity.posZ, 0); entityKilled.worldObj.playAuxSFXAtEntity(null, 1016, (int) entity.posX, (int) entity.posY, (int) entity.posZ, 0);
} }
}
if (entityKilled instanceof LOTREntityHobbit) { if (entityKilled instanceof LOTREntityHobbit) {
CorruptHobbit entity = new CorruptHobbit(entityKilled.worldObj); CorruptHobbit entity = new CorruptHobbit(entityKilled.worldObj);
entity.copyLocationAndAnglesFrom(entityKilled); entity.copyLocationAndAnglesFrom(entityKilled);

Loading…
Cancel
Save