mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 04:09:40 +00:00
1.6.2 test - Finished liquids, added connected textures on glass
This commit is contained in:
1 parent
40c6f445a2
commit
a80fcbce86
704 files changed
+60909
No files matched your search
@@ -0,0 +1,71 @@
|
||||
package tconstruct.entity;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.common.TProxyCommon;
|
||||
import tconstruct.entity.ai.GAIFellTree;
|
||||
import tconstruct.entity.ai.GAIFollowOwner;
|
||||
import tconstruct.entity.ai.GAISwim;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class MiniGardy extends GolemBase
|
||||
{
|
||||
public MiniGardy(World world)
|
||||
{
|
||||
super(world);
|
||||
//this.texture = "/mods/tinker/textures/mob/googirl.png";
|
||||
this.setSize(0.375F, 0.875F);
|
||||
this.tasks.addTask(1, new GAISwim(this));
|
||||
this.tasks.addTask(8, new GAIFellTree(this));
|
||||
this.tasks.addTask(10, new GAIFollowOwner(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInventory ()
|
||||
{
|
||||
inventory = new ItemStack[14];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getShadowSize () //Opacity, not size
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
public boolean interact (EntityPlayer player)
|
||||
{
|
||||
if (player.isSneaking())
|
||||
{
|
||||
if (!worldObj.isRemote)
|
||||
player.openGui(TConstruct.instance, TProxyCommon.miniGardyGui, this.worldObj, this.entityId, 0, 0);
|
||||
return true;
|
||||
//return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemStack stack = this.getHeldItem();
|
||||
if (stack == null)
|
||||
{
|
||||
ItemStack playerStack = player.getCurrentEquippedItem();
|
||||
if (playerStack != null)
|
||||
{
|
||||
this.setCurrentItemOrArmor(0, playerStack.copy());
|
||||
player.destroyCurrentEquippedItem();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player.inventory.addItemStackToInventory(stack.copy()))
|
||||
{
|
||||
//this.worldObj.playSoundAtEntity(this, par1Str, par2, par3);
|
||||
this.worldObj.playSoundAtEntity(player, "random.pop", 0.3F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
|
||||
this.setCurrentItemOrArmor(0, null);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user