mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Working health bars.
This commit is contained in:
1 parent
09a738a5b3
commit
ab5d1f8ecb
1 file changed
+14
-2
@@ -15,6 +15,8 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntitySpider;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -105,7 +107,17 @@ public class ItemSpawnerMover extends ItemMod {
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
if(getEntityId(itemstack) == null) {
|
||||
EntitySkeleton skeleton = new EntitySkeleton(world);
|
||||
EntitySpider spider = new EntitySpider(world);
|
||||
skeleton.setPosition(x, y + 2, z);
|
||||
spider.setPosition(x, y + 2, z);
|
||||
if(!world.isRemote) {
|
||||
world.spawnEntityInWorld(skeleton);
|
||||
world.spawnEntityInWorld(spider);
|
||||
skeleton.mountEntity(spider);
|
||||
}
|
||||
return true;
|
||||
/*if(getEntityId(itemstack) == null) {
|
||||
if(world.getBlock(x, y, z).equals(Blocks.mob_spawner)) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
@@ -127,7 +139,7 @@ public class ItemSpawnerMover extends ItemMod {
|
||||
if(getDelay(itemstack) <= 0 && placeBlock(itemstack, player, world, x, y, z, side, xOffset, yOffset, zOffset))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private boolean placeBlock(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
|
||||
Reference in new issue
Block a user