Just another commit

This commit is contained in:
brandon3055 committed 2015-05-06 22:38:59 +10:00
1 parent 0bfb00b274
commit c662bf9cfa
7 files changed
+8 -30

No files matched your search

@@ -1,21 +0,0 @@
package com.brandon3055.draconicevolution.common.entity;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.ForgeChunkManager.LoadingCallback;
import java.util.List;
/**
* Created by Brandon on 9/03/2015.
*/
public class DragonLoader implements LoadingCallback {
@Override
public void ticketsLoaded(List<ForgeChunkManager.Ticket> tickets, World world) {
}
}
@@ -62,7 +62,6 @@ public class EntityDragonHeart extends Entity {
@Override
public boolean attackEntityFrom(DamageSource damageSource, float dmg) {
return false;
}
@@ -52,7 +52,7 @@ public class EntityPersistentItem extends EntityItem {
@Override
public boolean attackEntityFrom (DamageSource par1DamageSource, float par2)
{
if (getEntityItem().getItem() instanceof DragonHeart && par1DamageSource.isExplosion() && par2 > 10f){
if (getEntityItem().getItem() instanceof DragonHeart && par1DamageSource.isExplosion() && par2 > 10f && !this.isDead){
worldObj.spawnEntityInWorld(new EntityDragonHeart(worldObj, posX, posY, posZ));
this.setDead();
}
@@ -9,7 +9,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemBlock;
@@ -259,11 +258,7 @@ public abstract class MiningTool extends ToolBase {//todo add custom information
block.onBlockDestroyedByPlayer(world, x,y,z, meta);
block.harvestBlock(world, player, x,y,z, meta);
player.addExhaustion(-0.025F);
if (block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)) > 0) {
EntityXPOrb xp = new EntityXPOrb(world, player.posX, player.posY, player.posZ, block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
xp.xpOrbAge = 5400;
world.spawnEntityInWorld(xp);
}
if (block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)) > 0) player.addExperience(block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
}
EntityPlayerMP mpPlayer = (EntityPlayerMP) player;
@@ -154,6 +154,7 @@ public abstract class CustomSpawnerBaseLogic {
}
public Entity spawnEntity(Entity par1Entity) {
if (par1Entity instanceof EntityLivingBase && par1Entity.worldObj != null) {
if (par1Entity instanceof EntitySkeleton) {
((EntitySkeleton)par1Entity).setSkeletonType(skeletonType);