@ -0,0 +1,24 @@
|
|||||||
|
package com.zivilon.cinder_loe.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import lotr.common.block.LOTRBlockWeaponRack;
|
||||||
|
import lotr.common.tileentity.LOTRTileEntityWeaponRack;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockContainer;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class VerticalWeaponRack extends LOTRBlockWeaponRack {
|
||||||
|
public VerticalWeaponRack() {
|
||||||
|
super();
|
||||||
|
this.setHardness(0.5f);
|
||||||
|
this.setResistance(1.0f);
|
||||||
|
this.setStepSound(Block.soundTypeWood);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
package com.zivilon.cinder_loe.client.model;
|
||||||
|
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelBase;
|
||||||
|
import net.minecraft.client.model.ModelRenderer;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Vertical Weapon rack - Cleric_red
|
||||||
|
* Created using Tabula 4.1.1
|
||||||
|
*/
|
||||||
|
public class Modelverticalweaponrack extends ModelBase {
|
||||||
|
public ModelRenderer Post;
|
||||||
|
public ModelRenderer Plate;
|
||||||
|
public ModelRenderer Post_1;
|
||||||
|
public ModelRenderer Base;
|
||||||
|
public ModelRenderer HolderBottom;
|
||||||
|
public ModelRenderer HolderBottom_1;
|
||||||
|
public ModelRenderer HolderBottom_2;
|
||||||
|
public ModelRenderer HolderTop;
|
||||||
|
public ModelRenderer HolderTop_1;
|
||||||
|
public ModelRenderer HolderTop_2;
|
||||||
|
public boolean onWall = true;
|
||||||
|
|
||||||
|
public Modelverticalweaponrack() {
|
||||||
|
this.textureWidth = 64;
|
||||||
|
this.textureHeight = 32;
|
||||||
|
this.HolderBottom_2 = new ModelRenderer(this, 0, 17);
|
||||||
|
this.HolderBottom_2.setRotationPoint(-1.0F, 20.0F, 2.0F);
|
||||||
|
this.HolderBottom_2.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
|
||||||
|
this.setRotateAngle(HolderBottom_2, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
this.Base = new ModelRenderer(this, 0, 0);
|
||||||
|
this.Base.setRotationPoint(-8.0F, 10.0F, 2.5F);
|
||||||
|
this.Base.addBox(0.0F, 0.0F, 0.0F, 5, 14, 2, 0.0F);
|
||||||
|
this.setRotateAngle(Base, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
this.HolderTop_1 = new ModelRenderer(this, 0, 17);
|
||||||
|
this.HolderTop_1.setRotationPoint(-1.0F, 12.0F, -1.0F);
|
||||||
|
this.HolderTop_1.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
|
||||||
|
this.setRotateAngle(HolderTop_1, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
this.HolderTop = new ModelRenderer(this, 5, 17);
|
||||||
|
this.HolderTop.setRotationPoint(-1.0F, 12.0F, 2.0F);
|
||||||
|
this.HolderTop.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
|
||||||
|
this.setRotateAngle(HolderTop, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
this.Post_1 = new ModelRenderer(this, 14, 0);
|
||||||
|
this.Post_1.setRotationPoint(-6.0F, 20.0F, 1.0F);
|
||||||
|
this.Post_1.addBox(0.0F, 0.0F, 0.0F, 2, 2, 3, 0.0F);
|
||||||
|
this.setRotateAngle(Post_1, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
this.Plate = new ModelRenderer(this, 24, 0);
|
||||||
|
this.Plate.setRotationPoint(-3.0F, 10.0F, 1.5F);
|
||||||
|
this.Plate.addBox(0.0F, 0.0F, 0.0F, 3, 14, 1, 0.0F);
|
||||||
|
this.setRotateAngle(Plate, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
this.HolderTop_2 = new ModelRenderer(this, 0, 17);
|
||||||
|
this.HolderTop_2.setRotationPoint(-2.0F, 12.0F, 2.0F);
|
||||||
|
this.HolderTop_2.addBox(0.0F, 0.0F, 0.0F, 4, 2, 1, 0.0F);
|
||||||
|
this.setRotateAngle(HolderTop_2, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
this.HolderBottom = new ModelRenderer(this, 5, 17);
|
||||||
|
this.HolderBottom.setRotationPoint(-1.0F, 20.0F, -1.0F);
|
||||||
|
this.HolderBottom.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
|
||||||
|
this.setRotateAngle(HolderBottom, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
this.HolderBottom_1 = new ModelRenderer(this, 0, 17);
|
||||||
|
this.HolderBottom_1.setRotationPoint(-2.0F, 20.0F, 2.0F);
|
||||||
|
this.HolderBottom_1.addBox(0.0F, 0.0F, 0.0F, 4, 2, 1, 0.0F);
|
||||||
|
this.setRotateAngle(HolderBottom_1, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
this.Post = new ModelRenderer(this, 14, 0);
|
||||||
|
this.Post.setRotationPoint(-6.0F, 12.0F, 1.0F);
|
||||||
|
this.Post.addBox(0.0F, 0.0F, 0.0F, 2, 2, 3, 0.0F);
|
||||||
|
this.setRotateAngle(Post, 0.0F, 1.5707963267948966F, 0.0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||||
|
this.HolderBottom_2.render(f5);
|
||||||
|
this.Base.render(f5);
|
||||||
|
this.HolderTop_1.render(f5);
|
||||||
|
this.HolderTop.render(f5);
|
||||||
|
this.Post_1.render(f5);
|
||||||
|
this.Plate.render(f5);
|
||||||
|
this.HolderTop_2.render(f5);
|
||||||
|
this.HolderBottom.render(f5);
|
||||||
|
this.HolderBottom_1.render(f5);
|
||||||
|
this.Post.render(f5);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a helper function from Tabula to set the rotation of model parts
|
||||||
|
*/
|
||||||
|
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||||
|
modelRenderer.rotateAngleX = x;
|
||||||
|
modelRenderer.rotateAngleY = y;
|
||||||
|
modelRenderer.rotateAngleZ = z;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.zivilon.cinder_loe.client.render;
|
||||||
|
|
||||||
|
import lotr.client.render.entity.LOTRRenderSpiderBase;
|
||||||
|
import lotr.client.render.entity.LOTRRenderUtumnoIceSpider;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
public class RenderDarkSpider extends LOTRRenderUtumnoIceSpider {
|
||||||
|
private static ResourceLocation spiderSkin = new ResourceLocation("cinder_loe:mob/spider/spider_dark.png");
|
||||||
|
|
||||||
|
protected ResourceLocation getEntityTexture(Entity entity) {
|
||||||
|
return spiderSkin;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,144 @@
|
|||||||
|
package com.zivilon.cinder_loe.client.render.block;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.client.model.Modelverticalweaponrack;
|
||||||
|
import com.zivilon.cinder_loe.tileentity.TileEntityMistBlock;
|
||||||
|
import lotr.client.model.LOTRModelWeaponRack;
|
||||||
|
import lotr.client.render.item.LOTRRenderBow;
|
||||||
|
import lotr.common.tileentity.LOTRTileEntityWeaponRack;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.client.renderer.entity.RenderManager;
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraftforge.client.IItemRenderer;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
public class Renderverticalweaponrack extends TileEntitySpecialRenderer {
|
||||||
|
private static ResourceLocation rackTexture = new ResourceLocation("lotr:item/verticalweaponRack.png");
|
||||||
|
private static Modelverticalweaponrack rackModel = new Modelverticalweaponrack();
|
||||||
|
public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) {
|
||||||
|
LOTRTileEntityWeaponRack weaponRack = (LOTRTileEntityWeaponRack)tileentity;
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glDisable((int)2884);
|
||||||
|
GL11.glEnable((int)32826);
|
||||||
|
GL11.glEnable((int)3008);
|
||||||
|
GL11.glTranslatef((float)((float)d + 0.5f), (float)((float)d1 + 1.5f), (float)((float)d2 + 0.5f));
|
||||||
|
int meta = weaponRack.getBlockMetadata();
|
||||||
|
int dir = meta & 3;
|
||||||
|
boolean wall = (meta & 4) != 0;
|
||||||
|
switch (dir) {
|
||||||
|
case 0: {
|
||||||
|
GL11.glRotatef((float)0.0f, (float)0.0f, (float)1.0f, (float)0.0f);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1: {
|
||||||
|
GL11.glRotatef((float)270.0f, (float)0.0f, (float)1.0f, (float)0.0f);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
GL11.glRotatef((float)180.0f, (float)0.0f, (float)1.0f, (float)0.0f);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
GL11.glRotatef((float)90.0f, (float)0.0f, (float)1.0f, (float)0.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (wall) {
|
||||||
|
GL11.glTranslatef((float)0.0f, (float)0.375f, (float)-0.5f);
|
||||||
|
}
|
||||||
|
GL11.glScalef((float)-1.0f, (float)-1.0f, (float)1.0f);
|
||||||
|
float scale = 0.0625f;
|
||||||
|
this.bindTexture(rackTexture);
|
||||||
|
Renderverticalweaponrack.rackModel.onWall = wall;
|
||||||
|
rackModel.render(null, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, scale);
|
||||||
|
ItemStack weaponItem = weaponRack.getWeaponItem();
|
||||||
|
if (weaponItem != null) {
|
||||||
|
float weaponScale = 0.625f;
|
||||||
|
GL11.glScalef((float)weaponScale, (float)weaponScale, (float)weaponScale);
|
||||||
|
GL11.glScalef((float)-1.0f, (float)1.0f, (float)1.0f);
|
||||||
|
GL11.glTranslatef((float)0.0f, (float)0.52f, (float)0.0f);
|
||||||
|
if (wall) {
|
||||||
|
GL11.glTranslatef((float)0.0f, (float)1.1f, (float)0.51f);
|
||||||
|
}
|
||||||
|
GL11.glRotatef((float)45.0f, (float)0.0f, (float)0.0f, (float)1.0f);
|
||||||
|
GL11.glTranslatef((float)0.9375f, (float)0.0625f, (float)0.0f);
|
||||||
|
GL11.glRotatef((float)-335.0f, (float)0.0f, (float)0.0f, (float)1.0f);
|
||||||
|
GL11.glRotatef((float)-50.0f, (float)0.0f, (float)1.0f, (float)0.0f);
|
||||||
|
GL11.glScalef((float)0.6666667f, (float)0.6666667f, (float)0.6666667f);
|
||||||
|
GL11.glTranslatef((float)0.0f, (float)0.3f, (float)0.0f);
|
||||||
|
RenderManager renderManager = RenderManager.instance;
|
||||||
|
int passes = 1;
|
||||||
|
if (weaponItem.getItem().requiresMultipleRenderPasses()) {
|
||||||
|
passes = weaponItem.getItem().getRenderPasses(weaponItem.getItemDamage());
|
||||||
|
}
|
||||||
|
LOTRRenderBow.renderingWeaponRack = true;
|
||||||
|
for (int pass = 0; pass < passes; ++pass) {
|
||||||
|
int color = weaponItem.getItem().getColorFromItemStack(weaponItem, pass);
|
||||||
|
float r = (float)(color >> 16 & 0xFF) / 255.0f;
|
||||||
|
float g = (float)(color >> 8 & 0xFF) / 255.0f;
|
||||||
|
float b = (float)(color & 0xFF) / 255.0f;
|
||||||
|
GL11.glColor4f((float)r, (float)g, (float)b, (float)1.0f);
|
||||||
|
renderManager.itemRenderer.renderItem(weaponRack.getEntityForRender(), weaponItem, 0, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||||
|
}
|
||||||
|
LOTRRenderBow.renderingWeaponRack = false;
|
||||||
|
}
|
||||||
|
GL11.glEnable((int)2884);
|
||||||
|
GL11.glDisable((int)32826);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
this.renderWeaponName(weaponRack, d + 0.5, d1 + 0.75, d2 + 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderWeaponName(LOTRTileEntityWeaponRack rack, double d, double d1, double d2) {
|
||||||
|
MovingObjectPosition mop = Minecraft.getMinecraft().objectMouseOver;
|
||||||
|
if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && mop.blockX == rack.xCoord && mop.blockY == rack.yCoord && mop.blockZ == rack.zCoord) {
|
||||||
|
ItemStack weaponItem = rack.getWeaponItem();
|
||||||
|
if (Minecraft.isGuiEnabled() && weaponItem != null && weaponItem.hasDisplayName()) {
|
||||||
|
float f2;
|
||||||
|
RenderManager renderManager = RenderManager.instance;
|
||||||
|
FontRenderer fontRenderer = this.func_147498_b();
|
||||||
|
float f = 1.6f;
|
||||||
|
float f1 = 0.016666668f * f;
|
||||||
|
double dSq = renderManager.livingPlayer.getDistanceSq((double)rack.xCoord + 0.5, (double)rack.yCoord + 0.5, (double)rack.zCoord);
|
||||||
|
if (dSq < (double)((f2 = 64.0f) * f2)) {
|
||||||
|
String name = weaponItem.getDisplayName();
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslatef((float)((float)d), (float)((float)d1 + 0.5f), (float)((float)d2));
|
||||||
|
GL11.glNormal3f((float)0.0f, (float)1.0f, (float)0.0f);
|
||||||
|
GL11.glRotatef((float)(-renderManager.playerViewY), (float)0.0f, (float)1.0f, (float)0.0f);
|
||||||
|
GL11.glRotatef((float)renderManager.playerViewX, (float)1.0f, (float)0.0f, (float)0.0f);
|
||||||
|
GL11.glScalef((float)(-f1), (float)(-f1), (float)f1);
|
||||||
|
GL11.glDisable((int)2896);
|
||||||
|
GL11.glDepthMask((boolean)false);
|
||||||
|
GL11.glDisable((int)2929);
|
||||||
|
GL11.glEnable((int)3042);
|
||||||
|
OpenGlHelper.glBlendFunc((int)770, (int)771, (int)1, (int)0);
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
int b0 = 0;
|
||||||
|
GL11.glDisable((int)3553);
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
int j = fontRenderer.getStringWidth(name) / 2;
|
||||||
|
tessellator.setColorRGBA_F(0.0f, 0.0f, 0.0f, 0.25f);
|
||||||
|
tessellator.addVertex((double)(-j - 1), (double)(-1 + b0), 0.0);
|
||||||
|
tessellator.addVertex((double)(-j - 1), (double)(8 + b0), 0.0);
|
||||||
|
tessellator.addVertex((double)(j + 1), (double)(8 + b0), 0.0);
|
||||||
|
tessellator.addVertex((double)(j + 1), (double)(-1 + b0), 0.0);
|
||||||
|
tessellator.draw();
|
||||||
|
GL11.glEnable((int)3553);
|
||||||
|
fontRenderer.drawString(name, -fontRenderer.getStringWidth(name) / 2, b0, 0x20FFFFFF);
|
||||||
|
GL11.glEnable((int)2929);
|
||||||
|
GL11.glDepthMask((boolean)true);
|
||||||
|
fontRenderer.drawString(name, -fontRenderer.getStringWidth(name) / 2, b0, -1);
|
||||||
|
GL11.glEnable((int)2896);
|
||||||
|
GL11.glDisable((int)3042);
|
||||||
|
GL11.glColor4f((float)1.0f, (float)1.0f, (float)1.0f, (float)1.0f);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import lotr.common.LOTRFoods;
|
||||||
|
import lotr.common.LOTRMod;
|
||||||
|
import lotr.common.entity.ai.*;
|
||||||
|
import lotr.common.entity.animal.LOTREntityHorse;
|
||||||
|
import lotr.common.entity.npc.*;
|
||||||
|
import lotr.common.fac.LOTRFaction;
|
||||||
|
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.potion.Potion;
|
||||||
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
import net.minecraft.util.DamageSource;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DarkSpider extends LOTREntitySpiderBase {
|
||||||
|
public static int VENOM_DARK = 3;
|
||||||
|
public DarkSpider(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected int getRandomSpiderScale() {
|
||||||
|
return this.rand.nextInt(4);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected int getRandomSpiderType() {
|
||||||
|
return VENOM_DARK;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public LOTRFaction getFaction() {
|
||||||
|
return LOTRFaction.UTUMNO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean attackEntityAsMob(Entity entity) {
|
||||||
|
if (super.attackEntityAsMob(entity)) {
|
||||||
|
if (entity instanceof EntityLivingBase) {
|
||||||
|
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.blindness.id, 200, 0));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected boolean canRideSpider() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public boolean attackEntityFrom(DamageSource source, float amount) {
|
||||||
|
if (source.getEntity() instanceof EntityLivingBase) {
|
||||||
|
EntityLivingBase attacker = (EntityLivingBase) source.getEntity();
|
||||||
|
if (attacker instanceof EntityPlayer) {
|
||||||
|
EntityPlayer player = (EntityPlayer) attacker;
|
||||||
|
if (this.getSpiderScale() > 4 && this.rand.nextDouble() < 0.5) {
|
||||||
|
spawnDarkSpiders(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.attackEntityFrom(source, amount);
|
||||||
|
}
|
||||||
|
private void spawnDarkSpiders(EntityPlayer player) {
|
||||||
|
World world = player.worldObj;
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
DarkSpider babySpider = new DarkSpider(world);
|
||||||
|
babySpider.setLocationAndAngles(player.posX, player.posY, player.posZ, player.rotationYaw, 0.0F);
|
||||||
|
babySpider.setSpiderScale(0);
|
||||||
|
babySpider.setHealth(10);
|
||||||
|
world.spawnEntityInWorld(babySpider);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ItemStack getPickedResult(MovingObjectPosition target) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import lotr.common.entity.npc.LOTRBannerBearer;
|
import lotr.common.entity.npc.LOTRBannerBearer;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.entity.ai.LOTREntityAIAttackOnCollide;
|
import lotr.common.entity.ai.LOTREntityAIAttackOnCollide;
|
||||||
import lotr.common.entity.npc.LOTREntityDunedain;
|
import lotr.common.entity.npc.LOTREntityDunedain;
|
||||||
@ -1,18 +1,11 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
import lotr.common.LOTRShields;
|
|
||||||
import lotr.common.entity.ai.LOTREntityAIRangedAttack;
|
import lotr.common.entity.ai.LOTREntityAIRangedAttack;
|
||||||
import lotr.common.entity.npc.LOTREntityNPC;
|
import lotr.common.entity.npc.LOTREntityNPC;
|
||||||
import lotr.common.entity.projectile.LOTREntityDart;
|
|
||||||
import lotr.common.item.LOTRItemBlowgun;
|
|
||||||
import lotr.common.item.LOTRItemDart;
|
|
||||||
import net.minecraft.entity.*;
|
import net.minecraft.entity.*;
|
||||||
import net.minecraft.entity.ai.EntityAIBase;
|
import net.minecraft.entity.ai.EntityAIBase;
|
||||||
import net.minecraft.entity.ai.EntityAISwimming;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ArnorSoldierArcher extends ArnorSoldier {
|
public class ArnorSoldierArcher extends ArnorSoldier {
|
||||||
@ -1,15 +1,9 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import lotr.common.LOTRAchievement;
|
|
||||||
import lotr.common.LOTRShields;
|
|
||||||
import lotr.common.entity.npc.LOTREntityDunedain;
|
|
||||||
import lotr.common.entity.npc.LOTREntityMoredain;
|
|
||||||
import lotr.common.entity.npc.LOTRNPCMount;
|
|
||||||
import lotr.common.quest.LOTRMiniQuest;
|
import lotr.common.quest.LOTRMiniQuest;
|
||||||
import lotr.common.quest.LOTRMiniQuestFactory;
|
import lotr.common.quest.LOTRMiniQuestFactory;
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import lotr.common.LOTRAchievement;
|
import lotr.common.LOTRAchievement;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import lotr.common.*;
|
import lotr.common.*;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.entity.npc.LOTRBannerBearer;
|
import lotr.common.entity.npc.LOTRBannerBearer;
|
||||||
import lotr.common.item.LOTRItemBanner;
|
import lotr.common.item.LOTRItemBanner;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.LOTRAchievement;
|
import lotr.common.LOTRAchievement;
|
||||||
import lotr.common.LOTRFoods;
|
import lotr.common.LOTRFoods;
|
||||||
@ -1,23 +1,16 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
import net.minecraft.entity.ai.EntityAIBase;
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import com.zivilon.cinder_loe.entity.FangornAnimal;
|
|
||||||
|
|
||||||
public class FangornAuroch extends FangornAnimal {
|
public class FangornAuroch extends FangornAnimal {
|
||||||
public FangornAuroch(World world) {
|
public FangornAuroch(World world) {
|
||||||
@ -1,24 +1,18 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
import net.minecraft.entity.ai.EntityAIBase;
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import com.zivilon.cinder_loe.entity.FangornAnimal;
|
|
||||||
|
|
||||||
public class FangornElk extends FangornAnimal {
|
public class FangornElk extends FangornAnimal {
|
||||||
public FangornElk(World world) {
|
public FangornElk(World world) {
|
||||||
@ -1,23 +1,15 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.LOTRMod;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
import net.minecraft.entity.ai.EntityAIBase;
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import com.zivilon.cinder_loe.entity.FangornAnimal;
|
|
||||||
|
|
||||||
public class FangornWildBoar extends FangornAnimal {
|
public class FangornWildBoar extends FangornAnimal {
|
||||||
public FangornWildBoar(World world) {
|
public FangornWildBoar(World world) {
|
||||||
@ -1,23 +1,12 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.LOTRMod;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
import net.minecraft.entity.ai.EntityAIBase;
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
|
||||||
import com.zivilon.cinder_loe.entity.FangornAnimal;
|
|
||||||
|
|
||||||
public class FangornWolf extends FangornAnimal {
|
public class FangornWolf extends FangornAnimal {
|
||||||
public FangornWolf(World world) {
|
public FangornWolf(World world) {
|
||||||
super(world);
|
super(world);
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.entity.npc.LOTREntityMoredain;
|
import lotr.common.entity.npc.LOTREntityMoredain;
|
||||||
import lotr.common.entity.npc.LOTRNPCMount;
|
import lotr.common.entity.npc.LOTRNPCMount;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import lotr.common.LOTRShields;
|
import lotr.common.LOTRShields;
|
||||||
@ -1,45 +1,12 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.entity.npc.LOTREntityMoredain;
|
|
||||||
import lotr.common.entity.npc.LOTRNPCMount;
|
|
||||||
import lotr.common.LOTRAchievement;
|
|
||||||
import lotr.common.LOTRFoods;
|
|
||||||
import lotr.common.LOTRMod;
|
|
||||||
import lotr.common.LOTRShields;
|
import lotr.common.LOTRShields;
|
||||||
import lotr.common.entity.ai.LOTREntityAIAttackOnCollide;
|
|
||||||
import lotr.common.entity.ai.LOTREntityAIDrink;
|
|
||||||
import lotr.common.entity.ai.LOTREntityAIEat;
|
|
||||||
import lotr.common.entity.ai.LOTREntityAIFollowHiringPlayer;
|
|
||||||
import lotr.common.entity.ai.LOTREntityAIHiredRemainStill;
|
|
||||||
import lotr.common.entity.animal.LOTREntityZebra;
|
|
||||||
import lotr.common.fac.LOTRFaction;
|
|
||||||
import lotr.common.quest.LOTRMiniQuest;
|
|
||||||
import lotr.common.quest.LOTRMiniQuestFactory;
|
|
||||||
import lotr.common.world.structure.LOTRChestContents;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.EntityLiving;
|
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
|
||||||
import net.minecraft.entity.ai.EntityAIBase;
|
|
||||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
|
||||||
import net.minecraft.entity.ai.EntityAIOpenDoor;
|
|
||||||
import net.minecraft.entity.ai.EntityAISwimming;
|
|
||||||
import net.minecraft.entity.ai.EntityAIWander;
|
|
||||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
|
||||||
import net.minecraft.entity.ai.EntityAIWatchClosest2;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import com.zivilon.cinder_loe.entity.Limwaith;
|
|
||||||
|
|
||||||
public class LimwaithWarrior extends Limwaith {
|
public class LimwaithWarrior extends Limwaith {
|
||||||
public LimwaithWarrior(World world) {
|
public LimwaithWarrior(World world) {
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.entity.npc.LOTREntityDwarfAxeThrower;
|
import lotr.common.entity.npc.LOTREntityDwarfAxeThrower;
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.npc;
|
||||||
|
|
||||||
import lotr.common.entity.npc.LOTREntityDwarfWarrior;
|
import lotr.common.entity.npc.LOTREntityDwarfWarrior;
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import lotr.common.LOTRFoods;
|
||||||
|
import lotr.common.LOTRLevelData;
|
||||||
|
import lotr.common.LOTRMod;
|
||||||
|
import lotr.common.entity.npc.*;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BladorthinSmith extends LOTREntityDorwinionElf implements LOTRTradeable.Smith {
|
||||||
|
public static LOTRTradeEntries BLADORTHIN_SMITH_BUY;
|
||||||
|
public static LOTRTradeEntries BLADORTHIN_SMITH_SELL;
|
||||||
|
|
||||||
|
public BladorthinSmith(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.blacksmithHammer));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getBuyPool() {
|
||||||
|
return BLADORTHIN_SMITH_BUY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getSellPool() {
|
||||||
|
return BLADORTHIN_SMITH_SELL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getAlignmentBonus() {
|
||||||
|
return 2.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void dropFewItems(boolean flag, int i) {
|
||||||
|
super.dropFewItems(flag, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canTradeWith(EntityPlayer entityplayer) {
|
||||||
|
return (LOTRLevelData.getData(entityplayer).getAlignment(getFaction()) >= 100.0F && isFriendlyAndAligned(entityplayer));
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
BLADORTHIN_SMITH_BUY = new LOTRTradeEntries(TradeType.BUY,
|
||||||
|
new LOTRTradeEntry[] {
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.dorwinionTable), 100),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.swordDorwinionElf), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerDorwinionElf), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.spearBladorthin), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.helmetDorwinionElf), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bodyDorwinionElf), 25),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.legsDorwinionElf), 22),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsDorwinionElf), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.dorwinionElfBow), 15),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
BLADORTHIN_SMITH_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry[] {
|
||||||
|
new LOTRTradeEntry(new ItemStack(Blocks.iron_ore), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Blocks.gold_ore), 15),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreCopper), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreTin), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_ingot), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.elfSteel), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bronze), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.gold_ingot), 15),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.diamond), 25),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.emerald), 15),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.ruby), 12),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.opal), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.amber), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.topaz), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.coal, 2, Short.MAX_VALUE), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.lava_bucket), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.stick, 8), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mithrilNugget), 35)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlayerTrade(EntityPlayer entityplayer, TradeType type, ItemStack itemstack) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ItemStack getPickedResult(MovingObjectPosition target) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,18 +1,15 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.trader;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import com.zivilon.cinder_loe.entity.npc.Limwaith;
|
||||||
import lotr.common.LOTRLevelData;
|
import lotr.common.LOTRLevelData;
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
import lotr.common.entity.npc.LOTREntityDwarf;
|
|
||||||
import lotr.common.entity.npc.LOTRTradeEntries;
|
import lotr.common.entity.npc.LOTRTradeEntries;
|
||||||
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
import lotr.common.entity.npc.LOTRTradeEntry;
|
|
||||||
import lotr.common.entity.npc.LOTRTradeable;
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -1,15 +1,13 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.trader;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
import lotr.common.LOTRFoods;
|
import com.zivilon.cinder_loe.entity.npc.Limwaith;
|
||||||
import lotr.common.LOTRLevelData;
|
import lotr.common.LOTRLevelData;
|
||||||
import lotr.common.LOTRMod;
|
import lotr.common.LOTRMod;
|
||||||
import lotr.common.entity.npc.LOTREntityDwarf;
|
|
||||||
import lotr.common.entity.npc.LOTRTradeEntries;
|
import lotr.common.entity.npc.LOTRTradeEntries;
|
||||||
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
import lotr.common.entity.npc.LOTRTradeEntry;
|
import lotr.common.entity.npc.LOTRTradeEntry;
|
||||||
import lotr.common.entity.npc.LOTRTradeable;
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
import lotr.common.item.LOTRItemMug;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity;
|
package com.zivilon.cinder_loe.entity.trader;
|
||||||
|
|
||||||
import lotr.common.entity.npc.LOTRTradeEntries;
|
import lotr.common.entity.npc.LOTRTradeEntries;
|
||||||
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.zivilon.cinder_loe.items;
|
||||||
|
|
||||||
|
import lotr.common.item.LOTRItemSpear;
|
||||||
|
import lotr.common.item.LOTRItemSword;
|
||||||
|
import lotr.common.item.LOTRMaterial;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class UnnamedSpear extends LOTRItemSpear {
|
||||||
|
private static final double ARMOR_DAMAGE = 0.025; // Default is 5%
|
||||||
|
|
||||||
|
public UnnamedSpear(LOTRMaterial material) {
|
||||||
|
super(material);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hitEntity(ItemStack itemStack, EntityLivingBase target, EntityLivingBase attacker) {
|
||||||
|
if (target instanceof EntityPlayer) {
|
||||||
|
EntityPlayer player = (EntityPlayer) target;
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
ItemStack armorPiece = player.getCurrentArmor(i);
|
||||||
|
if (armorPiece != null) {
|
||||||
|
int currentDurabilty = armorPiece.getMaxDamage() - armorPiece.getItemDamage();
|
||||||
|
int damageAmount = (int) (currentDurabilty * ARMOR_DAMAGE);
|
||||||
|
|
||||||
|
if (damageAmount < 1) {
|
||||||
|
damageAmount = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
armorPiece.damageItem(damageAmount, player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"animation": {
|
||||||
|
"frames": [
|
||||||
|
7,
|
||||||
|
7,
|
||||||
|
7,
|
||||||
|
6,
|
||||||
|
6,
|
||||||
|
6,
|
||||||
|
5,
|
||||||
|
5,
|
||||||
|
5,
|
||||||
|
4,
|
||||||
|
4,
|
||||||
|
4,
|
||||||
|
3,
|
||||||
|
3,
|
||||||
|
3,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 4.4 KiB |