diff --git a/.gradle/8.2.1/checksums/checksums.lock b/.gradle/8.2.1/checksums/checksums.lock index 7cf831a..163d130 100644 Binary files a/.gradle/8.2.1/checksums/checksums.lock and b/.gradle/8.2.1/checksums/checksums.lock differ diff --git a/.gradle/8.2.1/checksums/sha1-checksums.bin b/.gradle/8.2.1/checksums/sha1-checksums.bin index 179fc3f..a1b1167 100644 Binary files a/.gradle/8.2.1/checksums/sha1-checksums.bin and b/.gradle/8.2.1/checksums/sha1-checksums.bin differ diff --git a/.gradle/8.2.1/executionHistory/executionHistory.bin b/.gradle/8.2.1/executionHistory/executionHistory.bin index 92cc25e..f541e4b 100644 Binary files a/.gradle/8.2.1/executionHistory/executionHistory.bin and b/.gradle/8.2.1/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.2.1/executionHistory/executionHistory.lock b/.gradle/8.2.1/executionHistory/executionHistory.lock index 0fc7cc6..3722a2d 100644 Binary files a/.gradle/8.2.1/executionHistory/executionHistory.lock and b/.gradle/8.2.1/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.2.1/fileHashes/fileHashes.bin b/.gradle/8.2.1/fileHashes/fileHashes.bin index 183c0bd..bca5ae7 100644 Binary files a/.gradle/8.2.1/fileHashes/fileHashes.bin and b/.gradle/8.2.1/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.2.1/fileHashes/fileHashes.lock b/.gradle/8.2.1/fileHashes/fileHashes.lock index f127d2c..93b1bdd 100644 Binary files a/.gradle/8.2.1/fileHashes/fileHashes.lock and b/.gradle/8.2.1/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.2.1/fileHashes/resourceHashesCache.bin b/.gradle/8.2.1/fileHashes/resourceHashesCache.bin index 5c8da3d..a1086d2 100644 Binary files a/.gradle/8.2.1/fileHashes/resourceHashesCache.bin and b/.gradle/8.2.1/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 2682f8a..490092c 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index a67ddf9..a4f3244 100644 Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ diff --git a/src/main/java/com/zivilon/cinder_loe/CinderLoE.java b/src/main/java/com/zivilon/cinder_loe/CinderLoE.java index 4a05df8..085e608 100644 --- a/src/main/java/com/zivilon/cinder_loe/CinderLoE.java +++ b/src/main/java/com/zivilon/cinder_loe/CinderLoE.java @@ -445,6 +445,7 @@ public class CinderLoE { alatarStaff = (new AlatarStaff()).setUnlocalizedName("lotr:alatarStaff").setTextureName("lotr:alatarStaff"); sarumanStaff = (new SarumanStaff()).setUnlocalizedName("lotr:sarumanStaff").setTextureName("lotr:sarumanStaff"); + welfRelic = (new WoodElfRelic()).setUnlocalizedName("lotr:welfRelic").setTextureName("lotr:welfRelic"); utumnoSlaveSpawnEgg = new CinderLoESpawnEgg(UtumnoSlaveTrader.class).setTextureName("lotr:spawn_egg"); @@ -501,10 +502,10 @@ public class CinderLoE { linkLOTRWeapon(sarumanStaff, "sarumanStaff"); //Relics - - welfRelic = (new WoodElfRelic()).setUnlocalizedName("lotr:welfRelic").setTextureName("lotr:welfRelic"); ItemRegistration.registerItem(welfRelic, "welfRelic", 87); + linkLOTRWeapon(welfRelic, "welfRelic"); + // Misc EVENT = getLOTRMaterialByName("EVENT"); frostblade = (new LOTRItemSword(EVENT)).setUnlocalizedName("lotr:frostblade").setTextureName("lotr:frostblade"); diff --git a/src/main/java/com/zivilon/cinder_loe/coremod/CoreMod.java b/src/main/java/com/zivilon/cinder_loe/coremod/CoreMod.java index 09716a8..7a0c855 100644 --- a/src/main/java/com/zivilon/cinder_loe/coremod/CoreMod.java +++ b/src/main/java/com/zivilon/cinder_loe/coremod/CoreMod.java @@ -14,7 +14,7 @@ import java.util.Map; public class CoreMod implements IFMLLoadingPlugin { @Override public String[] getASMTransformerClass() { - return new String[] {"com.zivilon.cinder_loe.coremod.LOTRMaterialTransformer","com.zivilon.cinder_loe.coremod.DwarvenForgeTransformer","com.zivilon.cinder_loe.coremod.LOTRWeaponLinker", "com.zivilon.cinder_loe.coremod.LOTRBannerAdder", "com.zivilon.cinder_loe.coremod.LOTRSpawnListLinker", "com.zivilon.cinder_loe.coremod.OptiFinePatcher"}; + return new String[] {"com.zivilon.cinder_loe.coremod.LOTRMaterialTransformer","com.zivilon.cinder_loe.coremod.LOTRWeaponLinker", "com.zivilon.cinder_loe.coremod.LOTRBannerAdder", "com.zivilon.cinder_loe.coremod.LOTRSpawnListLinker", "com.zivilon.cinder_loe.coremod.OptiFinePatcher"}; } @Override diff --git a/src/main/java/com/zivilon/cinder_loe/entity/LimwaithCrocodile.java b/src/main/java/com/zivilon/cinder_loe/entity/LimwaithCrocodile.java deleted file mode 100644 index 8e03883..0000000 --- a/src/main/java/com/zivilon/cinder_loe/entity/LimwaithCrocodile.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.zivilon.cinder_loe.entity; - -import com.zivilon.cinder_loe.CinderLoE; -import lotr.common.LOTRLevelData; -import lotr.common.LOTRMod; -import lotr.common.entity.LOTREntities; -import lotr.common.entity.ai.LOTREntityAIAttackOnCollide; -import lotr.common.entity.ai.LOTREntityAIFollowHiringPlayer; -import lotr.common.entity.ai.LOTREntityAIHiredRemainStill; -import lotr.common.entity.npc.LOTREntityNPC; -import lotr.common.entity.npc.LOTREntityNPCRideable; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class LimwaithCrocodile extends LOTREntityNPCRideable { - public LimwaithCrocodile(World world) { - super(world); - this.setSize(2.1f, 0.7f); - ((EntityLiving) this).tasks.addTask(0, (EntityAIBase) new EntityAISwimming((EntityLiving) this)); - ((EntityLiving) this).tasks.addTask(1, (EntityAIBase) new LOTREntityAIHiredRemainStill(this)); - ((EntityLiving) this).tasks.addTask(2, (EntityAIBase) new LOTREntityAIAttackOnCollide(this, 1.5D, false)); - ((EntityLiving) this).tasks.addTask(3, (EntityAIBase) new LOTREntityAIFollowHiringPlayer(this)); - ((EntityLiving) this).tasks.addTask(4, (EntityAIBase) new EntityAIWander(this, 1.0D)); - ((EntityLiving) this).tasks.addTask(5, (EntityAIBase) new EntityAIWatchClosest2((EntityLiving) this, EntityPlayer.class, 8.0F, 0.02F)); - ((EntityLiving) this).tasks.addTask(6, (EntityAIBase) new EntityAIWatchClosest2((EntityLiving) this, LOTREntityNPC.class, 12.0F, 0.02F)); - ((EntityLiving) this).tasks.addTask(7, (EntityAIBase) new EntityAIWatchClosest((EntityLiving) this, EntityLiving.class, 8.0F, 0.02F)); - ((EntityLiving) this).tasks.addTask(8, (EntityAIBase) new EntityAILookIdle((EntityLiving) this)); - - this.addTargetTasks(true); - this.spawnsInDarkness = true; - } - - protected void entityInit() { - super.entityInit(); - ((Entity) this).getDataWatcher().addObject(20, (Object) 0); - } - - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(30.0D); - getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.2D); - getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(8.0D); - } - - public int getSnapTime() { - return ((Entity) this).getDataWatcher().getWatchableObjectInt(20); - } - - public void setSnapTime(int i) { - ((Entity) this).getDataWatcher().updateObject(20, (Object) i); - } - - public boolean isAIEnabled() { - return true; - } - - public boolean canBreatheUnderwater() { - return true; - } - - - public boolean attackEntityAsMob(Entity entity) { - boolean flag = super.attackEntityAsMob(entity); - if (flag) { - if (!((Entity) this).worldObj.isRemote) { - this.setSnapTime(20); - } - ((Entity) this).worldObj.playSoundAtEntity((Entity) this, "lotr:crocodile.snap", this.getSoundVolume(), this.getSoundPitch()); - } - return flag; - } - protected void dropFewItems(boolean flag, int i) { - int hides = 2 + rand.nextInt(3) + rand.nextInt(1 + i); - for (int l = 0; l < hides; l++) - dropItem(Items.bone, 1); - int meats = 2 + rand.nextInt(3) + rand.nextInt(1 + i); - for (int j = 0; j < meats; j++) { - if (isBurning()) { - dropItem(Items.fish, 1); - } else { - dropItem(Items.leather, 1); - } - } - dropItem(LOTRMod.zebraRaw, 1); - } - protected String getLivingSound() { - return "lotr:crocodile.say"; - } - - protected String getHurtSound() { - return "lotr:crocodile.say"; - } - - protected String getDeathSound() { - return "lotr:crocodile.death"; - } - - public void attackEntityWithRangedAttack(EntityLivingBase target, float distanceFactor) { - // No ranged attack implemented - } - - @Override - public ItemStack getPickedResult(MovingObjectPosition target) { - return new ItemStack(LOTRMod.spawnEgg, 1, LOTREntities.getEntityID((Entity) this)); - } - - @Override - public boolean isMountSaddled() { - return this.isNPCTamed() && ((Entity) this).riddenByEntity instanceof EntityPlayer; - } - - @Override - public boolean getBelongsToNPC() { - return false; - } - - @Override - public void setBelongsToNPC(boolean flag) { - } - - @Override - public String getMountArmorTexture() { - return null; - } - - public void onLivingUpdate() { - super.onLivingUpdate(); - if (!((Entity) this).worldObj.isRemote) { - Entity rider = ((Entity) this).riddenByEntity; - } - if (!((Entity) this).worldObj.isRemote && ((Entity) this).riddenByEntity instanceof EntityPlayer && LOTRLevelData.getData((EntityPlayer) ((Entity) this).riddenByEntity).getAlignment(this.getFaction()) < 50.0f) { - ((Entity) this).riddenByEntity.mountEntity(null); - } - } -} diff --git a/src/main/java/com/zivilon/cinder_loe/items/WoodElfRelic.java b/src/main/java/com/zivilon/cinder_loe/items/WoodElfRelic.java index 12062fa..d976c27 100644 --- a/src/main/java/com/zivilon/cinder_loe/items/WoodElfRelic.java +++ b/src/main/java/com/zivilon/cinder_loe/items/WoodElfRelic.java @@ -1,9 +1,12 @@ package com.zivilon.cinder_loe.items; +import com.zivilon.cinder_loe.CinderLoE; import cpw.mods.fml.common.network.simpleimpl.IMessage; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; import lotr.common.fac.LOTRFaction; +import lotr.common.item.LOTRItemSword; +import lotr.common.item.LOTRStoryItem; import lotr.common.network.LOTRPacketHandler; import lotr.common.network.LOTRPacketWeaponFX; import net.minecraft.entity.Entity; @@ -19,16 +22,17 @@ import net.minecraft.world.World; import java.util.List; -public class WoodElfRelic extends WizardStaff { +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); + LOTRFaction faction = LOTRFaction.WOOD_ELF; if (!world.isRemote) { List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, ((Entity)entityplayer).boundingBox.expand(12.0D, 8.0D, 12.0D)); if (!entities.isEmpty()) @@ -53,12 +57,4 @@ public class WoodElfRelic extends WizardStaff { } return itemstack; } - - private LOTRFaction getFaction(EntityPlayer player) { - LOTRFaction faction = LOTRFaction.WOOD_ELF; - if (faction == null) { - faction = LOTRFaction.WOOD_ELF; - } - return faction; - } } \ No newline at end of file