new workspace

This commit is contained in:
KitsuShadow
2015-07-28 23:27:27 -04:00
parent 28a22a6d43
commit a1d3b54d6f
530 changed files with 2222 additions and 21468 deletions

View File

@@ -1,198 +0,0 @@
package com.kitsu.medievalcraft.block.machines;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.block.ingots.IngotBase;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.machine.TileForge;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Forge extends BlockContainer{
private final Random random = new Random();
public Forge(String unlocalizedName, Material material) {
super(material.rock);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(3.0F);
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeStone);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
this.setBlockBounds(0.0F, 0.00F, 0.0F,
1.0F, 0.5F, 1.0F);
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face)
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack p_149689_6_) {
if(!world.isRemote){
world.setBlockMetadataWithNotify(x, y, z, (MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3), 2);
}
world.markBlockForUpdate(x, y, z);
}
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
//System.out.println("");
if(!world.isRemote){
if(player.inventory.getCurrentItem()!=null){
if(player.inventory.getCurrentItem()==new ItemStack(ModBlocks.damascus,1)){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
}
return true;
}
/* if(player.inventory.getCurrentItem()!=null){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
if (tileEnt.getStackInSlot(0)!=null){
if(player.inventory.getCurrentItem()!=null){
ItemStack pStack = player.inventory.getCurrentItem().copy();
ItemStack sStack = tileEnt.getStackInSlot(0).copy();
ItemStack sStackTemp = tileEnt.getStackInSlot(0).copy();
if(tileEnt.getStackInSlot(0).stackSize < 64){
sStackTemp.stackSize++;
if ((sStack.getItem().equals(pStack.getItem())) && (sStack.getItemDamage() == pStack.getItemDamage()) ){
tileEnt.setInventorySlotContents(0, sStackTemp);
player.inventory.decrStackSize(player.inventory.currentItem, 1);
}
}
}
}
return true;
}
if (player.isSneaking() && player.inventory.getCurrentItem()==null) {
if(tileEnt.getStackInSlot(0)!=null){
player.inventory.setInventorySlotContents(player.inventory.currentItem, tileEnt.getStackInSlot(0));
tileEnt.setInventorySlotContents(0, null);
}
return true;
}
if (!player.isSneaking()) {
if((player.inventory.getCurrentItem()==null)){
if(tileEnt.getStackInSlot(0)!=null){
ItemStack pStack = tileEnt.getStackInSlot(0).copy();
pStack.stackSize = 1;
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, pStack));
tileEnt.decrStackSize(0, 1);
}
}
return true;
}
//tileEnt.markDirty();
*/
}
tileEnt.markForUpdate();
tileEnt.markDirty();
//System.out.println(player.inventory.getCurrentItem());
return true;
}
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
if (tileEnt != null) {
for (int i = 0; i < tileEnt.getSizeInventory(); ++i) {
ItemStack itemstack = tileEnt.getStackInSlot(i);
if (itemstack != null) {
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;
while (itemstack.stackSize > 0) {
int j = this.random.nextInt(21) + 10;
if (j > itemstack.stackSize) {
j = itemstack.stackSize;
}
itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}
float f3 = 0.025F;
entityitem.motionX = (float) this.random.nextGaussian() * f3;
entityitem.motionY = (float) this.random.nextGaussian() * f3 + 0.1F;
entityitem.motionZ = (float) this.random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileForge();
}
@Override
public int getRenderType() {
return RenderId.forgeID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -1,79 +0,0 @@
package com.kitsu.medievalcraft.block.crucible;
import java.util.Random;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.util.CustomTab;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public abstract class CrucibleBase extends BlockContainer {
protected CrucibleBase(Material mat, String unlocalizedName) {
super(mat);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(2.0F);
this.setResistance(1.0F);
this.setHarvestLevel("pickaxe", 0);
this.setStepSound(soundTypeStone);
//xmin, ymin, zmin,
//xmax, ymax, zmax
this.setBlockBounds(0.2F, 0.0F, 0.25F,
0.8F, 0.66F, 0.8F);
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_){
int a = player.inventory.currentItem;
if(player.inventory.getStackInSlot(a)!=null){
if(player.inventory.getStackInSlot(a).getItem()==Item.getItemFromBlock(this)){
ItemStack jar = new ItemStack(this);
player.inventory.addItemStackToInventory(jar);
if(!world.isRemote){
world.setBlock(x, y, z, Blocks.air, 0, 2);
}
}
}
if(player.inventory.getStackInSlot(a)==null){
ItemStack jar = new ItemStack(this);
player.inventory.setInventorySlotContents(a, jar);
if(!world.isRemote){
world.setBlock(x, y, z, Blocks.air, 0, 2);
}
}
return true;
}
@Override
public Item getItemDropped(int metadata, Random random, int fortune) {
return Item.getItemFromBlock(this);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
// TODO Auto-generated method stub
return null;
}
@Override
public int getRenderType() {
return 0;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -1,204 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public EntityAIWaterMob(World world)
{
super(world);
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPrey()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPrey();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,229 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public EntityAIWaterMob(World world)
{
super(world);
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntitySquid.class, 32, true, true, IMob.mobSelector));
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
protected Entity findPreySquid()
{
//EntitySquid squid = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
AxisAlignedBB ab = this.boundingBox.expand(64D, 16D, 64D);
EntitySquid squid = this.worldObj.getEntitiesWithinAABB(EntitySquid.class, ab);
System.out.println("Finding Squid");
return (squid != null) ? squid : null;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
this.targetedEntity = findPreySquid();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,229 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public EntityAIWaterMob(World world)
{
super(world);
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntitySquid.class, 32, true, true, IMob.mobSelector));
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
protected Entity findPreySquid()
{
//EntitySquid squid = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
AxisAlignedBB ab = this.boundingBox.expand(64D, 16D, 64D);
EntitySquid squid = (EntitySquid) this.worldObj.getEntitiesWithinAABB(EntitySquid.class, ab);
System.out.println("Finding Squid");
return (squid != null) && (canEntityBeSeen(squid)) ? squid : null;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
this.targetedEntity = findPreySquid();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,221 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public EntityAIWaterMob(World world)
{
super(world);
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntitySquid.class, 32, true, true, IMob.mobSelector));
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
protected Entity findPreySquid()
{
//EntitySquid squid = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
//AxisAlignedBB ab = new AxisAlignedBB(-16d, -16d, -16d, 16d, 16d, 16d);
EntitySquid squid = (EntitySquid) this.worldObj.getEntitiesWithinAABB(EntitySquid.class, AxisAlignedBB.getBoundingBox(-106d, -106d, -106d, 106d, 106d, 106d));
System.out.println("Finding Squid");
return (squid != null) && (canEntityBeSeen(squid)) ? squid : null;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -20,7 +20,7 @@ public class RenderModelArrow extends Render
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/ModelArrow.obj");
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/modelarrow.png");
//public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
public void doRender(EntityModelArrow p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
@@ -30,7 +30,7 @@ public class RenderModelArrow extends Render
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
//model.renderAll();
model.renderAll();
GL11.glPopMatrix();
}

View File

@@ -1,209 +0,0 @@
package com.kitsu.medievalcraft.block.machines;
import static net.minecraftforge.common.util.ForgeDirection.UP;
import java.util.Random;
import org.lwjgl.opengl.GL11;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
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.ItemBlock;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.machine.TileEntityFirebox;
import com.kitsu.medievalcraft.tileents.machine.TileForge;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Forge extends BlockContainer{
private final Random random = new Random();
EntityItem entCoal = null;
public Forge(String unlocalizedName, Material material) {
super(material.rock);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(3.0F);
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeStone);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
this.setBlockBounds(0.0F, 0.00F, 0.0F,
1.0F, 0.5F, 1.0F);
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face)
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack p_149689_6_) {
if(!world.isRemote){
world.setBlockMetadataWithNotify(x, y, z, (MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3), 2);
}
world.markBlockForUpdate(x, y, z);
}
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
//System.out.println("");
if(!world.isRemote){
if(player.inventory.getCurrentItem()!=null){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
}
/* if(player.inventory.getCurrentItem()!=null){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
if (tileEnt.getStackInSlot(0)!=null){
if(player.inventory.getCurrentItem()!=null){
ItemStack pStack = player.inventory.getCurrentItem().copy();
ItemStack sStack = tileEnt.getStackInSlot(0).copy();
ItemStack sStackTemp = tileEnt.getStackInSlot(0).copy();
if(tileEnt.getStackInSlot(0).stackSize < 64){
sStackTemp.stackSize++;
if ((sStack.getItem().equals(pStack.getItem())) && (sStack.getItemDamage() == pStack.getItemDamage()) ){
tileEnt.setInventorySlotContents(0, sStackTemp);
player.inventory.decrStackSize(player.inventory.currentItem, 1);
}
}
}
}
return true;
}
if (player.isSneaking() && player.inventory.getCurrentItem()==null) {
if(tileEnt.getStackInSlot(0)!=null){
player.inventory.setInventorySlotContents(player.inventory.currentItem, tileEnt.getStackInSlot(0));
tileEnt.setInventorySlotContents(0, null);
}
return true;
}
if (!player.isSneaking()) {
if((player.inventory.getCurrentItem()==null)){
if(tileEnt.getStackInSlot(0)!=null){
ItemStack pStack = tileEnt.getStackInSlot(0).copy();
pStack.stackSize = 1;
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, pStack));
tileEnt.decrStackSize(0, 1);
}
}
return true;
}
//tileEnt.markDirty();
*/
}
tileEnt.markForUpdate();
tileEnt.markDirty();
//System.out.println(player.inventory.getCurrentItem());
return true;
}
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
if (tileEnt != null) {
for (int i = 0; i < tileEnt.getSizeInventory(); ++i) {
ItemStack itemstack = tileEnt.getStackInSlot(i);
if (itemstack != null) {
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;
while (itemstack.stackSize > 0) {
int j = this.random.nextInt(21) + 10;
if (j > itemstack.stackSize) {
j = itemstack.stackSize;
}
itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}
float f3 = 0.025F;
entityitem.motionX = (float) this.random.nextGaussian() * f3;
entityitem.motionY = (float) this.random.nextGaussian() * f3 + 0.1F;
entityitem.motionZ = (float) this.random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileForge();
}
@Override
public int getRenderType() {
return RenderId.forgeID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -1,205 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public EntityAIWaterMob(World world)
{
super(world);
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,198 +0,0 @@
package com.kitsu.medievalcraft.block.machines;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.block.ingots.IngotBase;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.machine.TileForge;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Forge extends BlockContainer{
private final Random random = new Random();
public Forge(String unlocalizedName, Material material) {
super(material.rock);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(3.0F);
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeStone);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
this.setBlockBounds(0.0F, 0.00F, 0.0F,
1.0F, 0.5F, 1.0F);
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face)
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack p_149689_6_) {
if(!world.isRemote){
world.setBlockMetadataWithNotify(x, y, z, (MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3), 2);
}
world.markBlockForUpdate(x, y, z);
}
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
//System.out.println("");
if(!world.isRemote){
if(player.inventory.getCurrentItem()!=null){
if(player.inventory.getCurrentItem()==new ItemStack(ModBlocks.damascus)){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
}
}
/* if(player.inventory.getCurrentItem()!=null){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
if (tileEnt.getStackInSlot(0)!=null){
if(player.inventory.getCurrentItem()!=null){
ItemStack pStack = player.inventory.getCurrentItem().copy();
ItemStack sStack = tileEnt.getStackInSlot(0).copy();
ItemStack sStackTemp = tileEnt.getStackInSlot(0).copy();
if(tileEnt.getStackInSlot(0).stackSize < 64){
sStackTemp.stackSize++;
if ((sStack.getItem().equals(pStack.getItem())) && (sStack.getItemDamage() == pStack.getItemDamage()) ){
tileEnt.setInventorySlotContents(0, sStackTemp);
player.inventory.decrStackSize(player.inventory.currentItem, 1);
}
}
}
}
return true;
}
if (player.isSneaking() && player.inventory.getCurrentItem()==null) {
if(tileEnt.getStackInSlot(0)!=null){
player.inventory.setInventorySlotContents(player.inventory.currentItem, tileEnt.getStackInSlot(0));
tileEnt.setInventorySlotContents(0, null);
}
return true;
}
if (!player.isSneaking()) {
if((player.inventory.getCurrentItem()==null)){
if(tileEnt.getStackInSlot(0)!=null){
ItemStack pStack = tileEnt.getStackInSlot(0).copy();
pStack.stackSize = 1;
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, pStack));
tileEnt.decrStackSize(0, 1);
}
}
return true;
}
//tileEnt.markDirty();
*/
}
tileEnt.markForUpdate();
tileEnt.markDirty();
//System.out.println(player.inventory.getCurrentItem());
return true;
}
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
if (tileEnt != null) {
for (int i = 0; i < tileEnt.getSizeInventory(); ++i) {
ItemStack itemstack = tileEnt.getStackInSlot(i);
if (itemstack != null) {
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;
while (itemstack.stackSize > 0) {
int j = this.random.nextInt(21) + 10;
if (j > itemstack.stackSize) {
j = itemstack.stackSize;
}
itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}
float f3 = 0.025F;
entityitem.motionX = (float) this.random.nextGaussian() * f3;
entityitem.motionY = (float) this.random.nextGaussian() * f3 + 0.1F;
entityitem.motionZ = (float) this.random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileForge();
}
@Override
public int getRenderType() {
return RenderId.forgeID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -1,198 +0,0 @@
package com.kitsu.medievalcraft.block.machines;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.block.ingots.IngotBase;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.machine.TileForge;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Forge extends BlockContainer{
private final Random random = new Random();
public Forge(String unlocalizedName, Material material) {
super(material.rock);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(3.0F);
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeStone);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
this.setBlockBounds(0.0F, 0.00F, 0.0F,
1.0F, 0.5F, 1.0F);
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face)
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack p_149689_6_) {
if(!world.isRemote){
world.setBlockMetadataWithNotify(x, y, z, (MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3), 2);
}
world.markBlockForUpdate(x, y, z);
}
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
//System.out.println("");
if(!world.isRemote){
if(player.inventory.getCurrentItem()!=null){
if(player.inventory.getCurrentItem()==new ItemStack(ModBlocks.damascus)){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
}
return true;
}
/* if(player.inventory.getCurrentItem()!=null){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
if (tileEnt.getStackInSlot(0)!=null){
if(player.inventory.getCurrentItem()!=null){
ItemStack pStack = player.inventory.getCurrentItem().copy();
ItemStack sStack = tileEnt.getStackInSlot(0).copy();
ItemStack sStackTemp = tileEnt.getStackInSlot(0).copy();
if(tileEnt.getStackInSlot(0).stackSize < 64){
sStackTemp.stackSize++;
if ((sStack.getItem().equals(pStack.getItem())) && (sStack.getItemDamage() == pStack.getItemDamage()) ){
tileEnt.setInventorySlotContents(0, sStackTemp);
player.inventory.decrStackSize(player.inventory.currentItem, 1);
}
}
}
}
return true;
}
if (player.isSneaking() && player.inventory.getCurrentItem()==null) {
if(tileEnt.getStackInSlot(0)!=null){
player.inventory.setInventorySlotContents(player.inventory.currentItem, tileEnt.getStackInSlot(0));
tileEnt.setInventorySlotContents(0, null);
}
return true;
}
if (!player.isSneaking()) {
if((player.inventory.getCurrentItem()==null)){
if(tileEnt.getStackInSlot(0)!=null){
ItemStack pStack = tileEnt.getStackInSlot(0).copy();
pStack.stackSize = 1;
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, pStack));
tileEnt.decrStackSize(0, 1);
}
}
return true;
}
//tileEnt.markDirty();
*/
}
tileEnt.markForUpdate();
tileEnt.markDirty();
//System.out.println(player.inventory.getCurrentItem());
return true;
}
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
if (tileEnt != null) {
for (int i = 0; i < tileEnt.getSizeInventory(); ++i) {
ItemStack itemstack = tileEnt.getStackInSlot(i);
if (itemstack != null) {
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;
while (itemstack.stackSize > 0) {
int j = this.random.nextInt(21) + 10;
if (j > itemstack.stackSize) {
j = itemstack.stackSize;
}
itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}
float f3 = 0.025F;
entityitem.motionX = (float) this.random.nextGaussian() * f3;
entityitem.motionY = (float) this.random.nextGaussian() * f3 + 0.1F;
entityitem.motionZ = (float) this.random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileForge();
}
@Override
public int getRenderType() {
return RenderId.forgeID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -0,0 +1,64 @@
package com.kitsu.medievalcraft.renderer.blocks;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
import org.lwjgl.opengl.GL11;
import com.kitsu.medievalcraft.entity.EntityModelArrow;
public class RenderModelArrow extends Render
{
//private static final ResourceLocation arrowTextures = new ResourceLocation("textures/entity/arrow.png");
private static final ResourceLocation arrowTextures = new ResourceLocation("kitsumedievalcraft:textures/items/itemModelArrow.png");
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/ModelArrow.obj");
//public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/modelarrow.png");
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
public void doRender(EntityModelArrow p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
GL11.glPushMatrix();
GL11.glScalef(1.0F, 1.0F, 1.0F);
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_ );
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
model.renderAll();
GL11.glPopMatrix();
}
protected ResourceLocation getEntityTexture(EntityModelArrow p_110775_1_)
{
return arrowTextures;
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return this.getEntityTexture((EntityModelArrow)p_110775_1_);
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
//System.out.println("doRender Ran");
this.doRender((EntityModelArrow)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
}

View File

@@ -1,5 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
public class EntityAIWaterMob {
}

View File

@@ -1,123 +0,0 @@
package com.kitsu.medievalcraft.block.ingots;
import java.util.Random;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public abstract class IngotBase extends BlockContainer {
private final Random random = new Random();
public static boolean makeParts;
public static int locX, locY, locZ;
public IngotBase(String unlocalizedName, Material material) {
super(material);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(1.0F);
this.setResistance(1.0F);
this.setHarvestLevel(null, 0);
this.setStepSound(soundTypeMetal);
//xmin, ymin, zmin,
//xmax, ymax, zmax
this.setBlockBounds(0.25F, 0.0F, 0.35F,
0.75F , 0.15F, 0.7F);
}
@Override
public Item getItemDropped(int metadata, Random random, int fortune) {
return Item.getItemFromBlock(this);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return null;
}
@Override
public int quantityDropped(Random p_149745_1_)
{
return 1;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
if(makeParts == true){
parts(world, locX, locY, locZ);
makeParts = false;
}
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int aa, float bb, float cc, float ff){
//System.out.println(this.getUnlocalizedName());
if(player.inventory.getCurrentItem().getItem()!=ModItems.forgeHammer){
int a = player.inventory.currentItem;
if(player.inventory.getStackInSlot(a)==null){
ItemStack jar = new ItemStack(this);
player.inventory.setInventorySlotContents(a, jar);
if(!world.isRemote){
world.setBlock(x, y, z, Blocks.air, 0, 2);
}
return true;
}
if(player.inventory.getStackInSlot(a)!=null){
if(player.inventory.getStackInSlot(a).getItem()==Item.getItemFromBlock(this)){
ItemStack jar = new ItemStack(this);
player.inventory.addItemStackToInventory(jar);
if(!world.isRemote){
world.setBlock(x, y, z, Blocks.air, 0, 2);
}
}
return true;
}
}
return false;
}
private void parts(World world, int x, int y, int z){
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
}
@Override
public int getRenderType() {
return 0;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -1,202 +0,0 @@
package com.kitsu.medievalcraft.block.machines;
import static net.minecraftforge.common.util.ForgeDirection.UP;
import java.util.Random;
import org.lwjgl.opengl.GL11;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
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.ItemBlock;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.machine.TileEntityFirebox;
import com.kitsu.medievalcraft.tileents.machine.TileForge;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Forge extends BlockContainer{
private final Random random = new Random();
EntityItem entCoal = null;
public Forge(String unlocalizedName, Material material) {
super(material.rock);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(3.0F);
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeStone);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
this.setBlockBounds(0.0F, 0.00F, 0.0F,
1.0F, 0.5F, 1.0F);
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face)
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack p_149689_6_) {
if(!world.isRemote){
world.setBlockMetadataWithNotify(x, y, z, (MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3), 2);
}
world.markBlockForUpdate(x, y, z);
}
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
//System.out.println("");
if(!world.isRemote){
System.out.println(tileEnt.isCoal);
/* if(player.inventory.getCurrentItem()!=null){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
if (tileEnt.getStackInSlot(0)!=null){
if(player.inventory.getCurrentItem()!=null){
ItemStack pStack = player.inventory.getCurrentItem().copy();
ItemStack sStack = tileEnt.getStackInSlot(0).copy();
ItemStack sStackTemp = tileEnt.getStackInSlot(0).copy();
if(tileEnt.getStackInSlot(0).stackSize < 64){
sStackTemp.stackSize++;
if ((sStack.getItem().equals(pStack.getItem())) && (sStack.getItemDamage() == pStack.getItemDamage()) ){
tileEnt.setInventorySlotContents(0, sStackTemp);
player.inventory.decrStackSize(player.inventory.currentItem, 1);
}
}
}
}
return true;
}
if (player.isSneaking() && player.inventory.getCurrentItem()==null) {
if(tileEnt.getStackInSlot(0)!=null){
player.inventory.setInventorySlotContents(player.inventory.currentItem, tileEnt.getStackInSlot(0));
tileEnt.setInventorySlotContents(0, null);
}
return true;
}
if (!player.isSneaking()) {
if((player.inventory.getCurrentItem()==null)){
if(tileEnt.getStackInSlot(0)!=null){
ItemStack pStack = tileEnt.getStackInSlot(0).copy();
pStack.stackSize = 1;
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, pStack));
tileEnt.decrStackSize(0, 1);
}
}
return true;
}
//tileEnt.markDirty();
*/
}
tileEnt.markForUpdate();
tileEnt.markDirty();
//System.out.println(player.inventory.getCurrentItem());
return true;
}
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
if (tileEnt != null) {
for (int i = 0; i < tileEnt.getSizeInventory(); ++i) {
ItemStack itemstack = tileEnt.getStackInSlot(i);
if (itemstack != null) {
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;
while (itemstack.stackSize > 0) {
int j = this.random.nextInt(21) + 10;
if (j > itemstack.stackSize) {
j = itemstack.stackSize;
}
itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}
float f3 = 0.025F;
entityitem.motionX = (float) this.random.nextGaussian() * f3;
entityitem.motionY = (float) this.random.nextGaussian() * f3 + 0.1F;
entityitem.motionZ = (float) this.random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileForge();
}
@Override
public int getRenderType() {
return RenderId.forgeID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -1,199 +0,0 @@
package com.kitsu.medievalcraft.block.machines;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.block.ingots.IngotBase;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.machine.TileForge;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Forge extends BlockContainer{
private final Random random = new Random();
public Forge(String unlocalizedName, Material material) {
super(material.rock);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(3.0F);
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeStone);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
this.setBlockBounds(0.0F, 0.00F, 0.0F,
1.0F, 0.5F, 1.0F);
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face)
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack p_149689_6_) {
if(!world.isRemote){
world.setBlockMetadataWithNotify(x, y, z, (MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3), 2);
}
world.markBlockForUpdate(x, y, z);
}
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
//System.out.println("");
if(!world.isRemote){
if(player.inventory.getCurrentItem()!=null){
ItemStack c = new ItemStack(ModBlocks.damascus,1);
if(player.inventory.getCurrentItem()==c){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
}
return true;
}
/* if(player.inventory.getCurrentItem()!=null){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
if (tileEnt.getStackInSlot(0)!=null){
if(player.inventory.getCurrentItem()!=null){
ItemStack pStack = player.inventory.getCurrentItem().copy();
ItemStack sStack = tileEnt.getStackInSlot(0).copy();
ItemStack sStackTemp = tileEnt.getStackInSlot(0).copy();
if(tileEnt.getStackInSlot(0).stackSize < 64){
sStackTemp.stackSize++;
if ((sStack.getItem().equals(pStack.getItem())) && (sStack.getItemDamage() == pStack.getItemDamage()) ){
tileEnt.setInventorySlotContents(0, sStackTemp);
player.inventory.decrStackSize(player.inventory.currentItem, 1);
}
}
}
}
return true;
}
if (player.isSneaking() && player.inventory.getCurrentItem()==null) {
if(tileEnt.getStackInSlot(0)!=null){
player.inventory.setInventorySlotContents(player.inventory.currentItem, tileEnt.getStackInSlot(0));
tileEnt.setInventorySlotContents(0, null);
}
return true;
}
if (!player.isSneaking()) {
if((player.inventory.getCurrentItem()==null)){
if(tileEnt.getStackInSlot(0)!=null){
ItemStack pStack = tileEnt.getStackInSlot(0).copy();
pStack.stackSize = 1;
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, pStack));
tileEnt.decrStackSize(0, 1);
}
}
return true;
}
//tileEnt.markDirty();
*/
}
tileEnt.markForUpdate();
tileEnt.markDirty();
//System.out.println(player.inventory.getCurrentItem());
return true;
}
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
if (tileEnt != null) {
for (int i = 0; i < tileEnt.getSizeInventory(); ++i) {
ItemStack itemstack = tileEnt.getStackInSlot(i);
if (itemstack != null) {
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;
while (itemstack.stackSize > 0) {
int j = this.random.nextInt(21) + 10;
if (j > itemstack.stackSize) {
j = itemstack.stackSize;
}
itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}
float f3 = 0.025F;
entityitem.motionX = (float) this.random.nextGaussian() * f3;
entityitem.motionY = (float) this.random.nextGaussian() * f3 + 0.1F;
entityitem.motionZ = (float) this.random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileForge();
}
@Override
public int getRenderType() {
return RenderId.forgeID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -1,210 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public EntityAIWaterMob(World world)
{
super(world);
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntitySquid.class, 32, true, true, IMob.mobSelector));
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,210 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public EntityAIWaterMob(World world)
{
super(world);
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntitySquid.class, 32, true, true, IMob.mobSelector));
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,256 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import java.util.List;
import net.minecraft.block.material.Material;
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.EntityAINearestAttackableTarget;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.pathfinding.PathEntity;
import net.minecraft.pathfinding.PathFinder;
import net.minecraft.profiler.Profiler;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.ChunkCache;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public Profiler theProfiler;
public EntityAIWaterMob(World world)
{
super(world);
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntitySquid.class, 32, true, true, IMob.mobSelector));
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
protected Entity findPreySquid()
{
//EntitySquid squid = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
AxisAlignedBB ab = this.boundingBox.expand(64D, 16D, 64D);
EntityLivingBase squid = this.getpa
System.out.println("Finding Squid");
return (Entity) squid;
}
public PathEntity getPathEntityToEntity(Entity p_72865_1_, Entity p_72865_2_, float p_72865_3_, boolean p_72865_4_, boolean p_72865_5_, boolean p_72865_6_, boolean p_72865_7_)
{
this.theProfiler.startSection("pathfind");
int i = MathHelper.floor_double(p_72865_1_.posX);
int j = MathHelper.floor_double(p_72865_1_.posY + 1.0D);
int k = MathHelper.floor_double(p_72865_1_.posZ);
int l = (int)(p_72865_3_ + 16.0F);
int i1 = i - l;
int j1 = j - l;
int k1 = k - l;
int l1 = i + l;
int i2 = j + l;
int j2 = k + l;
ChunkCache chunkcache = new ChunkCache(this, i1, j1, k1, l1, i2, j2, 0);
PathEntity pathentity = (new PathFinder(chunkcache, p_72865_4_, p_72865_5_, p_72865_6_, p_72865_7_)).createEntityPathTo(p_72865_1_, p_72865_2_, p_72865_3_);
this.theProfiler.endSection();
return pathentity;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
this.targetedEntity = findPreySquid();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,231 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import java.util.List;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public EntityAIWaterMob(World world)
{
super(world);
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntitySquid.class, 32, true, true, IMob.mobSelector));
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
protected Entity findPreySquid()
{
//EntitySquid squid = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
AxisAlignedBB ab = this.boundingBox.expand(64D, 16D, 64D);
List squid = this.worldObj.getEntitiesWithinAABB(EntitySquid.class, ab);
System.out.println("Finding Squid");
return (Entity) ((squid != null) ? squid : null);
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
this.targetedEntity = findPreySquid();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,229 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public EntityAIWaterMob(World world)
{
super(world);
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntitySquid.class, 32, true, true, IMob.mobSelector));
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
protected Entity findPreySquid()
{
//EntitySquid squid = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
//AxisAlignedBB ab = new AxisAlignedBB(-16d, -16d, -16d, 16d, 16d, 16d);
EntitySquid squid = (EntitySquid) this.worldObj.getEntitiesWithinAABB(EntitySquid.class, AxisAlignedBB.getBoundingBox(-106d, -106d, -106d, 106d, 106d, 106d));
System.out.println("Finding Squid");
return (squid != null) && (canEntityBeSeen(squid)) ? squid : null;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
this.targetedEntity = findPreySquid();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,228 +0,0 @@
package com.kitsu.medievalcraft.entityAI;
import java.util.List;
import net.minecraft.block.material.Material;
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.EntityAINearestAttackableTarget;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.pathfinding.PathEntity;
import net.minecraft.pathfinding.PathFinder;
import net.minecraft.profiler.Profiler;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.ChunkCache;
import net.minecraft.world.World;
public class EntityAIWaterMob extends EntityWaterMob implements IAnimals{
protected int attackInterval = 50;
protected float attackSpeed = 1.2F;
protected float swimSpeed = 0.5F;
private double targetX;
private double targetY;
private double targetZ;
private Entity targetedEntity;
private boolean isAttacking;
protected float swimRadius = 4.0F;
protected float swimRadiusHeight = 4.0F;
protected boolean Agrooed = false;
protected boolean landBounce = true;
protected float moreDamage = 0.5F;
public Profiler theProfiler;
public EntityAIWaterMob(World world)
{
super(world);
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntitySquid.class, 32, true, true, IMob.mobSelector));
}
protected boolean canTriggerWalking()
{
return false;
}
protected boolean isAIEnabled()
{
return true;
}
public boolean canBreatheUnderwater()
{
return true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage);
}
public boolean isInWater()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
public void onUpdate()
{
super.onUpdate();
if (isInWater()) {
this.motionY *= 0.1D;
}
}
public void applyEntityCollision(Entity entity)
{
super.applyEntityCollision(entity);
if ((this.Agrooed) && (this.targetedEntity == entity))
{
attackEntityAsMob(entity);
}
}
protected Entity findPreyHuman()
{
EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
return (player != null) && (canEntityBeSeen(player)) ? player : null;
}
public boolean attackEntityAsMob(Entity entity)
{
float f = (float)getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
return entity.attackEntityFrom(DamageSource.causeMobDamage(this), f + moreDamage);
}
public void onEntityUpdate()
{
int air = getAir();
super.onEntityUpdate();
if ((isEntityAlive()) && (!isInWater()))
{
air--;
setAir(air);
if (getAir() == -20)
{
setAir(0);
attackEntityFrom(DamageSource.drown, 2.0F);
}
}
else
{
setAir(300);
}
}
protected void updateAITasks()
{
super.updateAITasks();
if (isInWater())
{
double dx = this.targetX - this.posX;
double dy = this.targetY - this.posY;
double dz = this.targetZ - this.posZ;
double dist = MathHelper.sqrt_double(dx * dx + dy * dy + dz * dz);
if ((dist < 1.0D) || (dist > 1000.0D))
{
this.targetX = (this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.targetY = (this.posY + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadiusHeight);
this.targetZ = (this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * this.swimRadius);
this.isAttacking = false;
}
if (this.worldObj.getBlock(MathHelper.floor_double(this.targetX), MathHelper.floor_double(this.targetY + this.height), MathHelper.floor_double(this.targetZ)).getMaterial() == Material.water)
{
this.motionX += dx / dist * 0.05D * this.swimSpeed;
this.motionY += dy / dist * 0.1D * this.swimSpeed;
this.motionZ += dz / dist * 0.05D * this.swimSpeed;
}
else
{
this.targetX = this.posX;
this.targetY = (this.posY + 0.1D);
this.targetZ = this.posZ;
}
if (this.isAttacking)
{
this.motionX *= this.attackSpeed;
this.motionY *= this.attackSpeed;
this.motionZ *= this.attackSpeed;
}
if ((this.Agrooed) && (this.rand.nextInt(this.attackInterval) == 0))
{
this.targetedEntity = findPreyHuman();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
this.targetedEntity = findPreySquid();
if ((this.targetedEntity != null) && (this.targetedEntity.isInWater()))
{
this.targetX = this.targetedEntity.posX;
this.targetY = this.targetedEntity.posY;
this.targetZ = this.targetedEntity.posZ;
this.isAttacking = true;
}
}
this.renderYawOffset += (-(float)Math.atan2(this.motionX, this.motionZ) * 180.0F / 3.141593F - this.renderYawOffset) * 0.5F;
this.rotationYaw = this.renderYawOffset;
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationPitch += ((float)Math.atan2(this.motionY, f) * 180.0F / 3.141593F - this.rotationPitch) * 0.5F;
}
else
{
this.motionX = 0.0D;
this.motionY -= 0.08D;
this.motionY *= 0.9800000190734863D;
this.motionZ = 0.0D;
if ((this.landBounce) && (this.onGround) && (this.rand.nextInt(30) == 0))
{
this.motionY = 0.300000011920929D;
this.motionX = (-0.4F + this.rand.nextFloat() * 0.8F);
this.motionZ = (-0.4F + this.rand.nextFloat() * 0.8F);
}
}
}
}
/*when you extend it,
you want to add these to your constructor:
this.Agrooed = true;
this.swimRadius = 25F;
this.swimSpeed = 0.5F;
this.attackInterval = 23;
this.landBounce = true;
what these stand for are pretty self explanitory. add this to your class:
@Override
protected Entity findPrey()
{
AxisAlignedBB area = this.boundingBox.expand(16.0D, 16.0D, 16.0D);
EntityPlayer player = (EntityPlayer)super.findPrey();
if (player != null) {
return player;
}
return worldObj.findNearestEntityWithinAABB(EntityPlayer.class, area, this);
*/

View File

@@ -1,198 +0,0 @@
package com.kitsu.medievalcraft.block.machines;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.block.ingots.IngotBase;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.machine.TileForge;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Forge extends BlockContainer{
private final Random random = new Random();
ItemStack[] placeArray = new ItemStack[5];
public Forge(String unlocalizedName, Material material) {
super(material.rock);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(3.0F);
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeStone);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
this.setBlockBounds(0.0F, 0.00F, 0.0F,
1.0F, 0.5F, 1.0F);
placeArray[0].equals(new ItemStack(ModBlocks.damascus));
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face)
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack p_149689_6_) {
if(!world.isRemote){
world.setBlockMetadataWithNotify(x, y, z, (MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3), 2);
}
world.markBlockForUpdate(x, y, z);
}
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
//System.out.println("");
if(!world.isRemote){
if(player.inventory.getCurrentItem()!=null){
if(player.inventory.getCurrentItem()==placeArray[0]){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
}
}
/* if(player.inventory.getCurrentItem()!=null){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
if (tileEnt.getStackInSlot(0)!=null){
if(player.inventory.getCurrentItem()!=null){
ItemStack pStack = player.inventory.getCurrentItem().copy();
ItemStack sStack = tileEnt.getStackInSlot(0).copy();
ItemStack sStackTemp = tileEnt.getStackInSlot(0).copy();
if(tileEnt.getStackInSlot(0).stackSize < 64){
sStackTemp.stackSize++;
if ((sStack.getItem().equals(pStack.getItem())) && (sStack.getItemDamage() == pStack.getItemDamage()) ){
tileEnt.setInventorySlotContents(0, sStackTemp);
player.inventory.decrStackSize(player.inventory.currentItem, 1);
}
}
}
}
return true;
}
if (player.isSneaking() && player.inventory.getCurrentItem()==null) {
if(tileEnt.getStackInSlot(0)!=null){
player.inventory.setInventorySlotContents(player.inventory.currentItem, tileEnt.getStackInSlot(0));
tileEnt.setInventorySlotContents(0, null);
}
return true;
}
if (!player.isSneaking()) {
if((player.inventory.getCurrentItem()==null)){
if(tileEnt.getStackInSlot(0)!=null){
ItemStack pStack = tileEnt.getStackInSlot(0).copy();
pStack.stackSize = 1;
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, pStack));
tileEnt.decrStackSize(0, 1);
}
}
return true;
}
//tileEnt.markDirty();
*/
}
tileEnt.markForUpdate();
tileEnt.markDirty();
//System.out.println(player.inventory.getCurrentItem());
return true;
}
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
if (tileEnt != null) {
for (int i = 0; i < tileEnt.getSizeInventory(); ++i) {
ItemStack itemstack = tileEnt.getStackInSlot(i);
if (itemstack != null) {
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;
while (itemstack.stackSize > 0) {
int j = this.random.nextInt(21) + 10;
if (j > itemstack.stackSize) {
j = itemstack.stackSize;
}
itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}
float f3 = 0.025F;
entityitem.motionX = (float) this.random.nextGaussian() * f3;
entityitem.motionY = (float) this.random.nextGaussian() * f3 + 0.1F;
entityitem.motionZ = (float) this.random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileForge();
}
@Override
public int getRenderType() {
return RenderId.forgeID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -1,198 +0,0 @@
package com.kitsu.medievalcraft.block.machines;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.block.ingots.IngotBase;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.machine.TileForge;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Forge extends BlockContainer{
private final Random random = new Random();
ItemStack[] placeArray = new ItemStack[5];
public Forge(String unlocalizedName, Material material) {
super(material.rock);
this.setBlockName(unlocalizedName);
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setHardness(3.0F);
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeStone);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
this.setBlockBounds(0.0F, 0.00F, 0.0F,
1.0F, 0.5F, 1.0F);
placeArray[0].equals(new ItemStack(ModBlocks.damascus));
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face)
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack p_149689_6_) {
if(!world.isRemote){
world.setBlockMetadataWithNotify(x, y, z, (MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3), 2);
}
world.markBlockForUpdate(x, y, z);
}
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
//System.out.println("");
if(!world.isRemote){
if(player.inventory.getCurrentItem()!=null){
if(player.inventory.getCurrentItem()==){
}
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
}
/* if(player.inventory.getCurrentItem()!=null){
if (tileEnt.getStackInSlot(0)==null){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
if (tileEnt.getStackInSlot(0)!=null){
if(player.inventory.getCurrentItem()!=null){
ItemStack pStack = player.inventory.getCurrentItem().copy();
ItemStack sStack = tileEnt.getStackInSlot(0).copy();
ItemStack sStackTemp = tileEnt.getStackInSlot(0).copy();
if(tileEnt.getStackInSlot(0).stackSize < 64){
sStackTemp.stackSize++;
if ((sStack.getItem().equals(pStack.getItem())) && (sStack.getItemDamage() == pStack.getItemDamage()) ){
tileEnt.setInventorySlotContents(0, sStackTemp);
player.inventory.decrStackSize(player.inventory.currentItem, 1);
}
}
}
}
return true;
}
if (player.isSneaking() && player.inventory.getCurrentItem()==null) {
if(tileEnt.getStackInSlot(0)!=null){
player.inventory.setInventorySlotContents(player.inventory.currentItem, tileEnt.getStackInSlot(0));
tileEnt.setInventorySlotContents(0, null);
}
return true;
}
if (!player.isSneaking()) {
if((player.inventory.getCurrentItem()==null)){
if(tileEnt.getStackInSlot(0)!=null){
ItemStack pStack = tileEnt.getStackInSlot(0).copy();
pStack.stackSize = 1;
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, pStack));
tileEnt.decrStackSize(0, 1);
}
}
return true;
}
//tileEnt.markDirty();
*/
}
tileEnt.markForUpdate();
tileEnt.markDirty();
//System.out.println(player.inventory.getCurrentItem());
return true;
}
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileForge tileEnt = (TileForge) world.getTileEntity(x, y, z);
if (tileEnt != null) {
for (int i = 0; i < tileEnt.getSizeInventory(); ++i) {
ItemStack itemstack = tileEnt.getStackInSlot(i);
if (itemstack != null) {
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;
while (itemstack.stackSize > 0) {
int j = this.random.nextInt(21) + 10;
if (j > itemstack.stackSize) {
j = itemstack.stackSize;
}
itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}
float f3 = 0.025F;
entityitem.motionX = (float) this.random.nextGaussian() * f3;
entityitem.motionY = (float) this.random.nextGaussian() * f3 + 0.1F;
entityitem.motionZ = (float) this.random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileForge();
}
@Override
public int getRenderType() {
return RenderId.forgeID;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
}

View File

@@ -1,16 +1,7 @@
Console.highWaterMark=88000
StringVariablePreferencePage=130,107,107,86,
eclipse.preferences.version=1
org.eclipse.debug.ui.MemoryHistoryKnownColor=235,235,235
org.eclipse.debug.ui.MemoryHistoryUnknownColor=170,175,185
org.eclipse.debug.ui.PREF_CHANGED_VALUE_BACKGROUND=150,80,115
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<launchPerspectives/>\n
org.eclipse.debug.ui.UseContextualLaunch=false
org.eclipse.debug.ui.changedDebugElement=255,128,128
org.eclipse.debug.ui.consoleBackground=53,53,53
org.eclipse.debug.ui.errorColor=225,30,70
org.eclipse.debug.ui.inColor=140,175,210
org.eclipse.debug.ui.outColor=235,235,235
org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.ui.console.ConsoleView">\r\n<perspective id\="org.eclipse.jdt.ui.JavaPerspective" userAction\="opened"/>\r\n</view>\r\n</viewBindings>\r\n
overriddenByCSS=,org.eclipse.debug.ui.MemoryHistoryKnownColor,org.eclipse.debug.ui.MemoryHistoryUnknownColor,org.eclipse.debug.ui.PREF_CHANGED_VALUE_BACKGROUND,org.eclipse.debug.ui.changedDebugElement,org.eclipse.debug.ui.consoleBackground,org.eclipse.debug.ui.errorColor,org.eclipse.debug.ui.inColor,org.eclipse.debug.ui.outColor,
preferredTargets=default\:default|

View File

@@ -1,2 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.launching.PREF_VM_XML=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1437453373784" defaultVMConnector\="">\n<vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\n<vm id\="1437453373784" name\="java-8-oracle" path\="/usr/lib/jvm/java-8-oracle"/>\n</vmType>\n</vmSettings>\n
org.eclipse.jdt.launching.PREF_VM_XML=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1438126155724">\n<vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\n<vm id\="1438126155724" name\="java-8-oracle" path\="/usr/lib/jvm/java-8-oracle"/>\n</vmType>\n</vmSettings>\n

View File

@@ -1,87 +1,13 @@
content_assist_completion_replacement_background=200,200,0
content_assist_completion_replacement_foreground=200,0,0
content_assist_number_of_computers=18
content_assist_parameters_background=52,57,61
content_assist_parameters_foreground=238,238,238
content_assist_proposals_background=18,18,18
content_assist_proposals_foreground=252,252,252
eclipse.preferences.version=1
fontPropagated=true
java_bracket=249,250,244
java_comment_task_tag=154,140,124
java_default=217,232,247
java_doc_default=98,98,98
java_doc_keyword=154,140,124
java_doc_link=169,156,140
java_doc_tag=30,120,155
java_keyword=221,40,103
java_keyword_return=221,40,103
java_multi_line_comment=98,98,98
java_operator=230,230,250
java_single_line_comment=98,98,98
java_string=23,198,163
matchingBracketsColor=102,112,125
org.eclipse.jdt.ui.editor.tab.width=
org.eclipse.jdt.ui.formatterprofiles.version=12
org.eclipse.jdt.ui.javadoclocations.migrated=true
org.eclipse.jface.textfont=1|Monospace|10.0|0|GTK|1|;
overriddenByCSS=,content_assist_completion_replacement_background,content_assist_completion_replacement_foreground,content_assist_parameters_background,content_assist_parameters_foreground,java_bracket,java_comment_task_tag,java_default,java_doc_default,java_doc_keyword,java_doc_link,java_doc_tag,java_keyword,java_keyword_return,java_multi_line_comment,java_operator,java_single_line_comment,java_string,matchingBracketsColor,pf_coloring_argument,pf_coloring_assignment,pf_coloring_comment,pf_coloring_key,pf_coloring_value,semanticHighlighting.abstractClass.bold,semanticHighlighting.abstractClass.color,semanticHighlighting.abstractClass.enabled,semanticHighlighting.abstractMethodInvocation.color,semanticHighlighting.abstractMethodInvocation.enabled,semanticHighlighting.annotation.bold,semanticHighlighting.annotation.color,semanticHighlighting.annotation.enabled,semanticHighlighting.annotation.italic,semanticHighlighting.annotationElementReference.color,semanticHighlighting.annotationElementReference.enabled,semanticHighlighting.class.color,semanticHighlighting.class.enabled,semanticHighlighting.class.bold,semanticHighlighting.deprecatedMember.color,semanticHighlighting.deprecatedMember.enabled,semanticHighlighting.deprecatedMember.underline,semanticHighlighting.deprecatedMember.strikethrough,semanticHighlighting.enum.color,semanticHighlighting.enum.enabled,semanticHighlighting.enum.italic,semanticHighlighting.field.color,semanticHighlighting.field.enabled,semanticHighlighting.inheritedMethodInvocation.color,semanticHighlighting.inheritedMethodInvocation.enabled,semanticHighlighting.interface.color,semanticHighlighting.interface.enabled,semanticHighlighting.localVariable.color,semanticHighlighting.localVariable.enabled,semanticHighlighting.localVariableDeclaration.color,semanticHighlighting.localVariableDeclaration.enabled,semanticHighlighting.method.color,semanticHighlighting.method.enabled,semanticHighlighting.methodDeclarationName.color,semanticHighlighting.methodDeclarationName.enabled,semanticHighlighting.number.color,semanticHighlighting.number.enabled,semanticHighlighting.parameterVariable.color,semanticHighlighting.parameterVariable.enabled,semanticHighlighting.staticField.color,semanticHighlighting.staticField.enabled,semanticHighlighting.staticFinalField.color,semanticHighlighting.staticFinalField.enabled,semanticHighlighting.staticMethodInvocation.color,semanticHighlighting.staticMethodInvocation.enabled,semanticHighlighting.typeArgument.color,semanticHighlighting.typeArgument.enabled,semanticHighlighting.typeParameter.color,semanticHighlighting.typeParameter.enabled,sourceHoverBackgroundColor,
pf_coloring_argument=221,40,103
pf_coloring_assignment=217,232,247
pf_coloring_comment=98,98,98
pf_coloring_key=217,232,247
pf_coloring_value=23,198,163
proposalOrderMigrated=true
semanticHighlighting.abstractClass.bold=true
semanticHighlighting.abstractClass.color=62,171,230
semanticHighlighting.abstractClass.enabled=true
semanticHighlighting.abstractMethodInvocation.color=128,246,167
semanticHighlighting.abstractMethodInvocation.enabled=true
semanticHighlighting.annotation.bold=true
semanticHighlighting.annotation.color=255,147,147
semanticHighlighting.annotation.enabled=true
semanticHighlighting.annotation.italic=true
semanticHighlighting.annotationElementReference.color=235,75,100
semanticHighlighting.annotationElementReference.enabled=true
semanticHighlighting.class.bold=true
semanticHighlighting.class.color=18,144,195
semanticHighlighting.class.enabled=true
semanticHighlighting.deprecatedMember.color=171,31,54
semanticHighlighting.deprecatedMember.enabled=true
semanticHighlighting.deprecatedMember.strikethrough=true
semanticHighlighting.deprecatedMember.underline=false
semanticHighlighting.enum.color=204,129,186
semanticHighlighting.enum.enabled=true
semanticHighlighting.enum.italic=true
semanticHighlighting.field.color=102,225,248
semanticHighlighting.field.enabled=true
semanticHighlighting.inheritedMethodInvocation.color=205,246,104
semanticHighlighting.inheritedMethodInvocation.enabled=true
semanticHighlighting.interface.color=128,242,246
semanticHighlighting.interface.enabled=true
semanticHighlighting.localVariable.color=255,191,38
semanticHighlighting.localVariable.enabled=true
semanticHighlighting.localVariableDeclaration.color=237,127,72
semanticHighlighting.localVariableDeclaration.enabled=true
semanticHighlighting.method.color=167,236,33
semanticHighlighting.method.enabled=true
semanticHighlighting.methodDeclarationName.color=30,181,64
semanticHighlighting.methodDeclarationName.enabled=true
semanticHighlighting.number.color=104,151,187
semanticHighlighting.number.enabled=true
semanticHighlighting.parameterVariable.color=121,171,255
semanticHighlighting.parameterVariable.enabled=true
semanticHighlighting.staticField.color=141,218,248
semanticHighlighting.staticField.enabled=true
semanticHighlighting.staticFinalField.color=141,218,248
semanticHighlighting.staticFinalField.enabled=true
semanticHighlighting.staticMethodInvocation.color=150,236,63
semanticHighlighting.staticMethodInvocation.enabled=true
semanticHighlighting.typeArgument.color=215,131,127
semanticHighlighting.typeArgument.enabled=true
semanticHighlighting.typeParameter.color=191,164,164
semanticHighlighting.typeParameter.enabled=true
sourceHoverBackgroundColor=68,68,68
spelling_locale_initialized=true
tabWidthPropagated=true
useAnnotationsPrefPage=true

View File

@@ -1,3 +0,0 @@
eclipse.preferences.version=1
org.eclipse.mylyn.java.ui.run.count.3_10_0=1
org.eclipse.mylyn.java.ui.run.count.3_1_0=1

View File

@@ -2,3 +2,4 @@ eclipse.preferences.version=1
migrated.task.repositories.secure.store=true
org.eclipse.mylyn.tasks.ui.filters.nonmatching=true
org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true
org.eclipse.mylyn.tasks.ui.servicemessage.id=0

View File

@@ -1,2 +0,0 @@
completion_tips_seen=org.eclipse.recommenders.completion.rcp.tips.discovery\:org.eclipse.recommenders.subwords.rcp.tips.enableSubwords
eclipse.preferences.version=1

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.debug.ui.SCOPED_SAVE_SELECTION_DIALOG">
<item value="295" key="DIALOG_WIDTH"/>
<item value="1|Noto Sans|9.0|0|GTK|1|" key="DIALOG_FONT_NAME"/>
<item value="377" key="DIALOG_HEIGHT"/>
</section>
</section>

View File

@@ -10,7 +10,7 @@
</natures>
<linkedResources>
<link>
<name>.link1</name>
<name>.link0</name>
<type>2</type>
<location>/home/kitsudesktop/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.4.1448-1.7.10/start</location>
</link>

View File

@@ -1 +0,0 @@
INDEX VERSION 1.127

View File

@@ -1,75 +1,75 @@
INDEX VERSION 1.127+/home/kitsudesktop/Development/ForgeCraft/eclipse/.metadata/.plugins/org.eclipse.jdt.core
3204670091.index
902335247.index
INDEX VERSION 1.127+/home/kitsudesktop/Development/forgecraft/eclipse/.metadata/.plugins/org.eclipse.jdt.core
2771403403.index
46282419.index
381934593.index
1088117431.index
1913109094.index
143665107.index
1557244763.index
2249673962.index
1126531185.index
3747265063.index
4268974357.index
22201617.index
2982035129.index
2779764988.index
3885805113.index
3448033636.index
2856046201.index
2137156864.index
276287408.index
208370467.index
2630498905.index
2513815553.index
4003539098.index
1040045458.index
1491957848.index
378217139.index
3973669341.index
362793693.index
226762682.index
2102142672.index
3204670091.index
588472640.index
2604609558.index
135292806.index
46282419.index
120211678.index
664250093.index
2395005229.index
62093115.index
477019728.index
382122984.index
4278895844.index
359966132.index
4153569552.index
1390482922.index
2233963263.index
1345940684.index
2387000283.index
1739000648.index
742522455.index
2262966189.index
3927724147.index
2952585412.index
3765020915.index
1155683227.index
2660577132.index
3585830745.index
3288746679.index
3471536732.index
381934593.index
902335247.index
944496423.index
2841451250.index
2268700320.index
2674879370.index
2066489604.index
953586732.index
3591913134.index
3721837726.index
3214207201.index
3888198363.index
1713085507.index
2630498905.index
1390482922.index
649430602.index
2540607589.index
2982035129.index
3448033636.index
1345940684.index
2841451250.index
3927724147.index
2660577132.index
143665107.index
664250093.index
4278895844.index
3063591243.index
1328863621.index
1088117431.index
2952585412.index
2233963263.index
4153569552.index
3885805113.index
359966132.index
477019728.index
953586732.index
2779764988.index
1739000648.index
3973669341.index
2102142672.index
3591913134.index
135292806.index
1155683227.index
944496423.index
742522455.index
62093115.index
1491957848.index
3585830745.index
1913109094.index
378217139.index
276287408.index
3471536732.index
2268700320.index
4268974357.index
120211678.index
649430602.index
1713085507.index
1773673397.index
2856046201.index
362793693.index
2604609558.index
2262966189.index
2513815553.index
3288746679.index
1040045458.index
4003539098.index
1932949083.index
1126531185.index
226762682.index
588472640.index
382122984.index
2387000283.index
2395005229.index
1557244763.index
2066489604.index
3747265063.index
2137156864.index
22201617.index
2674879370.index
3721837726.index
1328863621.index

View File

@@ -3,17 +3,12 @@
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
<item value="1" key="layout"/>
<item value="true" key="group_libraries"/>
<item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;1&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;Aggregate for window 1437453373596&quot;&gt;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;false&quot;&gt;&#x0A;&lt;xmlDefinedFilters&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.mylyn.java.ui.MembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.m2e.MavenModuleFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0A;&lt;/customFilters&gt;&#x0A;&lt;/packageExplorer&gt;" key="memento"/>
<item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;1&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;Aggregate for window 1438126155811&quot;&gt;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;false&quot;&gt;&#x0A;&lt;xmlDefinedFilters&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.mylyn.java.ui.MembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.m2e.MavenModuleFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0A;&lt;/customFilters&gt;&#x0A;&lt;/packageExplorer&gt;" key="memento"/>
<item value="1" key="rootMode"/>
<item value="false" key="linkWithEditor"/>
</section>
<section name="quick_assist_proposal_size">
</section>
<section name="BuildPathsPropertyPage">
<item value="3" key="pageIndex"/>
</section>
<section name="completion_proposal_size">
</section>
<section name="JavaElementSearchActions">
</section>
</section>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 B

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<session version="1.0">
<refactoring comment="Delete resource &apos;bitMC&apos;" deleteContents="false" description="Delete resource &apos;bitMC&apos;" element1="/bitMC" flags="7" id="org.eclipse.ltk.core.refactoring.delete.resources" resources="1" stamp="1437340755456"/>
</session>

View File

@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<session version="1.0">&#x0A;<refactoring accessors="true" comment="Delete element from project &apos;Minecraft&apos;&#x0A;- Original project: &apos;Minecraft&apos;&#x0A;- Original element: &apos;com.kitsu.medievalcraft.renderer.blocks.machine.SandFilterEmptyRenderer.java&apos;" description="Delete element" element1="/src\/main\/java&lt;com.kitsu.medievalcraft.renderer.blocks.machine{SandFilterEmptyRenderer.java" elements="1" flags="589830" id="org.eclipse.jdt.ui.delete" resources="0" stamp="1435928355419" subPackages="false" version="1.0"/>&#x0A;<refactoring comment="Rename type &apos;com.kitsu.medievalcraft.util.IronFormNames&apos; to &apos;AnvilUtil&apos;&#x0A;- Original project: &apos;Minecraft&apos;&#x0A;- Original element: &apos;com.kitsu.medievalcraft.util.IronFormNames&apos;&#x0A;- Renamed element: &apos;com.kitsu.medievalcraft.util.AnvilUtil&apos;&#x0A;- Update references to refactored element&#x0A;- Update textual occurrences in comments and strings" description="Rename type &apos;IronFormNames&apos;" flags="589830" id="org.eclipse.jdt.ui.rename.type" input="/src\/main\/java&lt;com.kitsu.medievalcraft.util{IronFormNames.java[IronFormNames" matchStrategy="1" name="AnvilUtil" qualified="false" references="true" similarDeclarations="false" stamp="1436033100243" textual="false" version="1.0"/>
</session>

View File

@@ -1,2 +0,0 @@
1435928355419 Delete element
1436033100243 Rename type 'IronFormNames'

View File

@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<session version="1.0">&#x0A;<refactoring accessors="true" comment="Delete 6 elements from project &apos;Minecraft&apos;&#x0A;- Original project: &apos;Minecraft&apos;&#x0A;- Original elements:&#x0A; com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.ItemRendererCDCrucible.java&#x0A; com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.ItemRendererCICrucible.java&#x0A; com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.ItemRendererFDCrucible.java&#x0A; com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.ItemRendererFICrucible.java&#x0A; com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.ItemRendererHDCrucible.java&#x0A; com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.ItemRendererHICrucible.java" description="Delete elements" element1="/src\/main\/java&lt;com.kitsu.medievalcraft.renderer.itemrenderer.crucibles{ItemRendererCICrucible.java" element2="/src\/main\/java&lt;com.kitsu.medievalcraft.renderer.itemrenderer.crucibles{ItemRendererHDCrucible.java" element3="/src\/main\/java&lt;com.kitsu.medievalcraft.renderer.itemrenderer.crucibles{ItemRendererHICrucible.java" element4="/src\/main\/java&lt;com.kitsu.medievalcraft.renderer.itemrenderer.crucibles{ItemRendererCDCrucible.java" element5="/src\/main\/java&lt;com.kitsu.medievalcraft.renderer.itemrenderer.crucibles{ItemRendererFICrucible.java" element6="/src\/main\/java&lt;com.kitsu.medievalcraft.renderer.itemrenderer.crucibles{ItemRendererFDCrucible.java" elements="6" flags="589830" id="org.eclipse.jdt.ui.delete" resources="0" stamp="1436099626294" subPackages="false" version="1.0"/>&#x0A;<refactoring accessors="true" comment="Delete 4 elements from project &apos;Minecraft&apos;&#x0A;- Original project: &apos;Minecraft&apos;&#x0A;- Original elements:&#x0A; com.kitsu.medievalcraft.item.tools.CustomHandleIronPick.java&#x0A; com.kitsu.medievalcraft.item.tools.CustomHandleStrongIronPick.java&#x0A; com.kitsu.medievalcraft.item.tools.CustomStrongIronPick.java&#x0A; com.kitsu.medievalcraft.item.tools.CustomWeakIronPick.java" description="Delete elements" element1="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomWeakIronPick.java" element2="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomStrongIronPick.java" element3="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomHandleIronPick.java" element4="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomHandleStrongIronPick.java" elements="4" flags="589830" id="org.eclipse.jdt.ui.delete" resources="0" stamp="1436533041267" subPackages="false" version="1.0"/>&#x0A;<refactoring accessors="true" comment="Delete 4 elements from project &apos;Minecraft&apos;&#x0A;- Original project: &apos;Minecraft&apos;&#x0A;- Original elements:&#x0A; com.kitsu.medievalcraft.item.tools.CustomStrongIronLumberAxe.java&#x0A; com.kitsu.medievalcraft.item.tools.CustomStrongIronShovel.java&#x0A; com.kitsu.medievalcraft.item.tools.CustomWeakIronLumberAxe.java&#x0A; com.kitsu.medievalcraft.item.tools.CustomWeakIronShovel.java" description="Delete elements" element1="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomWeakIronShovel.java" element2="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomStrongIronShovel.java" element3="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomStrongIronLumberAxe.java" element4="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomWeakIronLumberAxe.java" elements="4" flags="589830" id="org.eclipse.jdt.ui.delete" resources="0" stamp="1436534038504" subPackages="false" version="1.0"/>&#x0A;<refactoring accessors="true" comment="Delete 4 elements from project &apos;Minecraft&apos;&#x0A;- Original project: &apos;Minecraft&apos;&#x0A;- Original elements:&#x0A; com.kitsu.medievalcraft.item.tools.CustomHandleIronLumberAxe.java&#x0A; com.kitsu.medievalcraft.item.tools.CustomHandleIronShovel.java&#x0A; com.kitsu.medievalcraft.item.tools.CustomHandleStrongIronLumberAxe.java&#x0A; com.kitsu.medievalcraft.item.tools.CustomHandleStrongIronShovel.java" description="Delete elements" element1="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomHandleIronShovel.java" element2="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomHandleStrongIronShovel.java" element3="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomHandleIronLumberAxe.java" element4="/src\/main\/java&lt;com.kitsu.medievalcraft.item.tools{CustomHandleStrongIronLumberAxe.java" elements="4" flags="589830" id="org.eclipse.jdt.ui.delete" resources="0" stamp="1436534060287" subPackages="false" version="1.0"/>
</session>

View File

@@ -1,4 +0,0 @@
1436099626294 Delete elements
1436533041267 Delete elements
1436534038504 Delete elements
1436534060287 Delete elements

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="RefactoringWizard.preview">
<item value="600" key="width"/>
<item value="400" key="height"/>
</section>
</section>

View File

@@ -1,43 +0,0 @@
<configuration scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>OFF</level> <!-- change to DEBUG to mimic '-consolelog' behaviour -->
</filter>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${org.eclipse.m2e.log.dir}/0.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
<MinIndex>1</MinIndex>
<MaxIndex>10</MaxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>100MB</MaxFileSize>
</triggeringPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
</appender>
<root level="INFO">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
<appender-ref ref="EclipseLog" />
<appender-ref ref="MavenConsoleLog" />
</root>
<logger name="com.ning.http.client" level="INFO" />
</configuration>

View File

@@ -1,43 +0,0 @@
<configuration scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>OFF</level> <!-- change to DEBUG to mimic '-consolelog' behaviour -->
</filter>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${org.eclipse.m2e.log.dir}/0.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
<MinIndex>1</MinIndex>
<MaxIndex>10</MaxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>100MB</MaxFileSize>
</triggeringPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
</appender>
<root level="INFO">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
<appender-ref ref="EclipseLog" />
<appender-ref ref="MavenConsoleLog" />
</root>
<logger name="com.ning.http.client" level="INFO" />
</configuration>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="quick_assist_proposal_size">
</section>
</section>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="WORKBENCH_SETTINGS">
<list key="ENABLED_TRANSFERS">
</list>
</section>
<section name="ChooseWorkspaceDialogSettings">
<item value="662" key="DIALOG_X_ORIGIN"/>
<item value="328" key="DIALOG_Y_ORIGIN"/>
</section>
</section>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.ui.texteditor.FindReplaceDialog">
<item value="false" key="isRegEx"/>
<item value="craft" key="selection"/>
<item value="false" key="casesensitive"/>
<item value="false" key="incremental"/>
<item value="true" key="wrap"/>
<item value="false" key="wholeword"/>
<list key="findhistory">
<item value="craft"/>
<item value="blocktocheck"/>
<item value="forge"/>
<item value="ironspad"/>
<item value="shitblock"/>
<item value="TileEntityHotIronPlate"/>
<item value="tileBlock"/>
<item value="valid"/>
</list>
<list key="replacehistory">
<item value="TileIronPlate"/>
<item value="tileRefIngot"/>
</list>
</section>
<section name="org.eclipse.ui.texteditor.FindReplaceDialog_dialogBounds">
<item value="245" key="DIALOG_WIDTH"/>
<item value="1|Noto Sans|9.0|0|GTK|1|" key="DIALOG_FONT_NAME"/>
<item value="384" key="DIALOG_HEIGHT"/>
<item value="1027" key="DIALOG_X_ORIGIN"/>
<item value="311" key="DIALOG_Y_ORIGIN"/>
</section>
</section>

View File

@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="WorkbenchPreferenceDialogSettings">
<item value="652" key="DIALOG_X_ORIGIN"/>
<item value="178" key="DIALOG_Y_ORIGIN"/>
</section>
<section name="org.eclipse.ui.internal.QuickAccess">
<item value="675" key="dialogHeight"/>
<item value="1200" key="dialogWidth"/>
@@ -12,6 +16,4 @@
<list key="textArray">
</list>
</section>
<section name="ImportExportAction">
</section>
</section>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<workingSetManager>
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1437453373596_0" label="Window Working Set" name="Aggregate for window 1437453373596"/>
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1438126155812_0" label="Window Working Set" name="Aggregate for window 1438126155811"/>
</workingSetManager>