2
0
Fork 0
frozen
KeyLime17 2 years ago
parent 9378f40a75
commit 12f858bbbd

Binary file not shown.

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>

@ -189,6 +189,8 @@ public class CinderLoE {
public static Item alatarStaff;
public static Item sarumanStaff;
// Relics
public static Item welfRelic;
// Spawn eggs
public static Item redDwarfWarriorSpawnEgg;
public static Item redDwarfArbalestSpawnEgg;
@ -298,7 +300,7 @@ public class CinderLoE {
EntityRegistry.registerModEntity(FangornAuroch.class, "FangornAuroch", (entityID + 8), this, 64, 1, true);
EntityRegistry.registerModEntity(FangornElk.class, "FangornElk", (entityID + 9), this, 64, 1, true);
EntityRegistry.registerModEntity(FangornWolf.class, "FangornWolf", (entityID + 10), this, 64, 1, true);
EntityRegistry.registerModEntity(FangornWolf.class, "TamedCrocodile", (entityID + 35), this, 64, 1, true);
// EntityRegistry.registerModEntity(FangornWolf.class, "TamedCrocodile", (entityID + 35), this, 64, 1, true);
EntityRegistry.registerModEntity(Limwaith.class, "Limwaith", (entityID + 31), this, 64, 1, true);
EntityRegistry.registerModEntity(LimwaithWarrior.class, "LimwaithWarrior", (entityID + 11), this, 64, 1, true);
@ -443,10 +445,11 @@ public class CinderLoE {
alatarStaff = (new AlatarStaff()).setUnlocalizedName("lotr:alatarStaff").setTextureName("lotr:alatarStaff");
sarumanStaff = (new SarumanStaff()).setUnlocalizedName("lotr:sarumanStaff").setTextureName("lotr:sarumanStaff");
utumnoSlaveSpawnEgg = new CinderLoESpawnEgg(UtumnoSlaveTrader.class).setTextureName("lotr:spawn_egg");
// Last ID added: 86
// Last ID added: 87
ItemRegistration.registerItem(redDwarfWarriorSpawnEgg, "redDwarfWarriorSpawnEgg", 0);
ItemRegistration.registerItem(redDwarfArbalestSpawnEgg, "redDwarfArbalestSpawnEgg", 1);
ItemRegistration.registerItem(redDwarfCommanderSpawnEgg, "redDwarfCommanderSpawnEgg", 2);
@ -497,12 +500,19 @@ public class CinderLoE {
linkLOTRWeapon(alatarStaff, "alatarStaff");
linkLOTRWeapon(sarumanStaff, "sarumanStaff");
//Relics
welfRelic = (new WoodElfRelic()).setUnlocalizedName("lotr:welfRelic").setTextureName("lotr:welfRelic");
ItemRegistration.registerItem(welfRelic, "welfRelic", 87);
// Misc
EVENT = getLOTRMaterialByName("EVENT");
frostblade = (new LOTRItemSword(EVENT)).setUnlocalizedName("lotr:frostblade").setTextureName("lotr:frostblade");
spearsolidgold = (new LOTRItemSpear(EVENT)).setUnlocalizedName("lotr:spearsolidgold").setTextureName("lotr:spearsolidgold");
spearsolidgold = (new LOTRItemSpear(EVENT)).setUnlocalizedName("lotr:spearsolidgold").setTextureName("lotr:spearsolidgold").setCreativeTab(null);
whip = (new Whip()).setUnlocalizedName("lotr:whip").setTextureName("lotr:whip");
ItemRegistration.registerItem(frostblade, "frostblade", 30);
ItemRegistration.registerItem(spearsolidgold, "spearsolidgold", 31);
ItemRegistration.registerItem(whip, "whip", 32);
@ -726,7 +736,7 @@ public class CinderLoE {
RenderingRegistry.registerEntityRenderingHandler(LimwaithBannerBearer.class, new RenderLimwaith());
RenderingRegistry.registerEntityRenderingHandler(LimwaithChieftain.class, new RenderLimwaith());
RenderingRegistry.registerEntityRenderingHandler(LimwaithCrocodile.class, new RenderTamedCrocodile());
//RenderingRegistry.registerEntityRenderingHandler(LimwaithCrocodile.class, new RenderTamedCrocodile());
RenderingRegistry.registerEntityRenderingHandler(FangornBear.class, new RenderFangornBear());
RenderingRegistry.registerEntityRenderingHandler(FangornWildBoar.class, new RenderFangornWildBoar());
RenderingRegistry.registerEntityRenderingHandler(FangornAuroch.class, new RenderFangornAuroch());
@ -883,6 +893,8 @@ public class CinderLoE {
CinderCore.registerItemFallback(Item.getIdFromItem(alatarStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0");
CinderCore.registerItemFallback(Item.getIdFromItem(sarumanStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0");
CinderCore.registerItemFallback(Item.getIdFromItem(welfRelic), Item.getIdFromItem(LOTRMod.rhinoHorn), "cinder_loe", "1.2");
CinderCore.registerItemFallback(Item.getIdFromItem(frostblade), Item.getIdFromItem(LOTRMod.swordMithril), "cinder_loe", "1.0");
CinderCore.registerItemFallback(Item.getIdFromItem(spearsolidgold), Item.getIdFromItem(LOTRMod.spearMithril), "cinder_loe", "1.1");
CinderCore.registerItemFallback(Item.getIdFromItem(whip), Item.getIdFromItem(LOTRMod.balrogWhip), "cinder_loe", "1.2");
@ -981,7 +993,7 @@ public class CinderLoE {
CinderCore.registerEntityFallback(LimwaithBannerBearer.class, LOTREntityMoredainBannerBearer.class, "cinder_loe", "1.0");
CinderCore.registerEntityFallback(LimwaithChieftain.class, LOTREntityMoredainChieftain.class, "cinder_loe", "1.0");
CinderCore.registerEntityFallback(LimwaithCrocodile.class, LOTREntityCrocodile.class, "cinder_loe", "1.2");
//CinderCore.registerEntityFallback(LimwaithCrocodile.class, LOTREntityCrocodile.class, "cinder_loe", "1.2");
CinderCore.registerEntityFallback(FangornBear.class, LOTREntityBear.class, "cinder_loe", "1.0");
CinderCore.registerEntityFallback(FangornWildBoar.class, LOTREntityWildBoar.class, "cinder_loe", "1.0");
CinderCore.registerEntityFallback(FangornAuroch.class, LOTREntityAurochs.class, "cinder_loe", "1.0");

@ -0,0 +1,64 @@
package com.zivilon.cinder_loe.items;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import lotr.common.LOTRLevelData;
import lotr.common.LOTRMod;
import lotr.common.fac.LOTRFaction;
import lotr.common.network.LOTRPacketHandler;
import lotr.common.network.LOTRPacketWeaponFX;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import java.util.List;
public class WoodElfRelic extends WizardStaff {
public WoodElfRelic() {
super();
}
public ItemStack onEaten(ItemStack itemstack, World world, EntityPlayer entityplayer) {
entityplayer.swingItem();
itemstack.damageItem(2, (EntityLivingBase)entityplayer);
world.playSoundAtEntity((Entity)entityplayer, "lotr:elf.woodElf_teleport", 2.0F, (Item.itemRand.nextFloat() - Item.itemRand.nextFloat()) * 0.2F + 1.0F);
LOTRFaction faction = getFaction(entityplayer);
if (!world.isRemote) {
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, ((Entity)entityplayer).boundingBox.expand(12.0D, 8.0D, 12.0D));
if (!entities.isEmpty())
for (int i = 0; i < entities.size(); i++) {
EntityLivingBase entity = entities.get(i);
if (entity != entityplayer) {
if (entity instanceof EntityLiving) {
EntityLiving entityliving = (EntityLiving)entity;
if (!faction.isGoodRelation(LOTRMod.getNPCFaction((Entity)entityliving)))
continue;
}
if (entity instanceof EntityPlayer)
if (!MinecraftServer.getServer().isPVPEnabled() || LOTRLevelData.getData((EntityPlayer)entity).getAlignment(faction) < 0.0F)
continue;
entity.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 1200, 0));
entity.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 1200, 0));
}
}
LOTRPacketWeaponFX packet = new LOTRPacketWeaponFX(LOTRPacketWeaponFX.Type.MACE_SAURON, (Entity)entityplayer);
LOTRPacketHandler.networkWrapper.sendToAllAround((IMessage)packet, LOTRPacketHandler.nearEntity((Entity)entityplayer, 64.0D));
}
return itemstack;
}
private LOTRFaction getFaction(EntityPlayer player) {
LOTRFaction faction = LOTRFaction.WOOD_ELF;
if (faction == null) {
faction = LOTRFaction.WOOD_ELF;
}
return faction;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Loading…
Cancel
Save