mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
soo many errors
This commit is contained in:
1 parent
b9cdef8209
commit
c0599dc707
9 files changed
+48
-42
No files matched your search
@@ -6,16 +6,17 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import tconstruct.util.landmine.Helper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -44,19 +45,19 @@ public abstract class Behavior
|
||||
{
|
||||
defaultBehavior = new BehaviorDefault();
|
||||
|
||||
addBehavior(new ItemStack(Item.stick), dummy);
|
||||
addBehavior(new ItemStack(Item.redstone), utilityMode);
|
||||
addBehavior(new ItemStack(Block.torchWood), blockThrow);
|
||||
addBehavior(new ItemStack(Item.gunpowder), explosive);
|
||||
addBehavior(new ItemStack(Block.tnt), explosive);
|
||||
addBehavior(new ItemStack(Item.firework), firework);
|
||||
addBehavior(new ItemStack(Item.potion), potion);
|
||||
addBehavior(new ItemStack(Item.fireballCharge), fireball);
|
||||
addBehavior(new ItemStack(Item.monsterPlacer), spawn);
|
||||
addBehavior(new ItemStack(Item.arrow), shoot);
|
||||
addBehavior(new ItemStack(Item.snowball), shoot);
|
||||
addBehavior(new ItemStack(Item.enderPearl), shoot);
|
||||
addBehavior(new ItemStack(Item.shears), shear);
|
||||
addBehavior(new ItemStack(Items.stick), dummy);
|
||||
addBehavior(new ItemStack(Items.redstone), utilityMode);
|
||||
addBehavior(new ItemStack(Blocks.torch), blockThrow);
|
||||
addBehavior(new ItemStack(Items.gunpowder), explosive);
|
||||
addBehavior(new ItemStack(Blocks.tnt), explosive);
|
||||
addBehavior(new ItemStack(Items.firework), firework);
|
||||
addBehavior(new ItemStack(Items.potion), potion);
|
||||
addBehavior(new ItemStack(Items.fireballCharge), fireball);
|
||||
addBehavior(new ItemStack(Items.monsterPlacer), spawn);
|
||||
addBehavior(new ItemStack(Items.arrow), shoot);
|
||||
addBehavior(new ItemStack(Items.snowball), shoot);
|
||||
addBehavior(new ItemStack(Items.ender_pearl), shoot);
|
||||
addBehavior(new ItemStack(Items.shears), shear);
|
||||
|
||||
//Make sure the part below this comment is executed last(to avoid conflicts)
|
||||
for (int i = 1; i < Block.blocksList.length; i++)
|
||||
|
||||
@@ -6,6 +6,8 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityTNTPrimed;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -22,11 +24,11 @@ public class BehaviorExplosive extends Behavior
|
||||
public void executeLogic (World par1World, int par2, int par3, int par4, ItemStack par5ItemStack, Entity triggerer, boolean willBlockBeRemoved)
|
||||
{
|
||||
float explodeStrenght = 0;
|
||||
if (par5ItemStack.itemID == Block.tnt.blockID)
|
||||
if (par5ItemStack.itemID == Blocks.tnt.blockID)
|
||||
{
|
||||
explodeStrenght = 4.0F * par5ItemStack.stackSize;
|
||||
}
|
||||
else if (par5ItemStack.itemID == Item.gunpowder.itemID)
|
||||
else if (par5ItemStack.itemID == Items.gunpowder.itemID)
|
||||
{
|
||||
explodeStrenght = 0.8F * par5ItemStack.stackSize;
|
||||
}
|
||||
@@ -38,11 +40,11 @@ public class BehaviorExplosive extends Behavior
|
||||
public void getInformation (ItemStack par1ItemStack, List par2List)
|
||||
{
|
||||
String str = "UNDEFINED";
|
||||
if (par1ItemStack.itemID == Block.tnt.blockID)
|
||||
if (par1ItemStack.itemID == Blocks.tnt.blockID)
|
||||
{
|
||||
str = "medium";
|
||||
}
|
||||
else if (par1ItemStack.itemID == Item.gunpowder.itemID)
|
||||
else if (par1ItemStack.itemID == Items.gunpowder.itemID)
|
||||
{
|
||||
str = "small";
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import tconstruct.items.blocks.ItemBlockLandmine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.projectile.EntitySmallFireball;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
@@ -46,7 +46,7 @@ public class BehaviorFirecharge extends Behavior
|
||||
if ((par1World.getBlockId(i, par3, j) == 0 || (Block.blocksList[par1World.getBlockId(i, par3, j)] != null && Block.blocksList[par1World.getBlockId(i, par3, j)].isBlockReplaceable(
|
||||
par1World, i, par3, j))) && ItemBlockLandmine.getRandom().nextInt(5) == 0 && Block.fire.canPlaceBlockAt(par1World, i, par3, j))
|
||||
{
|
||||
par1World.setBlock(i, par3, j, Block.fire.blockID);
|
||||
par1World.setBlock(i, par3, j, Blocks.fire.blockID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import tconstruct.items.blocks.ItemBlockLandmine;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityPotion;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemPotion;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -46,13 +46,13 @@ public class BehaviorPotion extends Behavior
|
||||
{
|
||||
if (triggerer instanceof EntityPlayer)
|
||||
{
|
||||
Item.potion.onEaten(par5ItemStack, par1World, (EntityPlayer) triggerer);
|
||||
Items.potion.onEaten(par5ItemStack, par1World, (EntityPlayer) triggerer);
|
||||
}
|
||||
else if (triggerer instanceof EntityLivingBase)
|
||||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
List list = Item.potion.getEffects(par5ItemStack);
|
||||
List list = Items.potion.getEffects(par5ItemStack);
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.item.EntityEnderPearl;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntitySnowball;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
@@ -26,16 +27,16 @@ public class BehaviorProjectile extends Behavior
|
||||
|
||||
EnumFacing enumfacing = getFacing(par1World, par2, par3, par4);
|
||||
|
||||
if (par5ItemStack.itemID == Item.arrow.itemID)
|
||||
if (par5ItemStack.itemID == Items.arrow.itemID)
|
||||
{
|
||||
entity = new EntityArrow(par1World, par2, par3, par4);
|
||||
((EntityArrow) entity).canBePickedUp = 1;
|
||||
}
|
||||
else if (par5ItemStack.itemID == Item.snowball.itemID)
|
||||
else if (par5ItemStack.itemID == Items.snowball.itemID)
|
||||
{
|
||||
entity = new EntitySnowball(par1World, par2, par3, par4);
|
||||
}
|
||||
else if (par5ItemStack.itemID == Item.enderPearl.itemID)
|
||||
else if (par5ItemStack.itemID == Items.ender_pearl.itemID)
|
||||
{
|
||||
if (triggerer instanceof EntityLivingBase)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
+6
-5
@@ -8,6 +8,7 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.entity.projectile.EntityLargeFireball;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
@@ -24,10 +25,10 @@ public class SpecialStackHandlerRocketFireball extends SpecialStackHandler
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.arrayContainsEqualStack(stacks, new ItemStack(Item.firework)) && this.arrayContainsEqualStack(stacks, new ItemStack(Item.fireballCharge)))
|
||||
if (this.arrayContainsEqualStack(stacks, new ItemStack(Items.fireworks)) && this.arrayContainsEqualStack(stacks, new ItemStack(Items.fire_charge)))
|
||||
{
|
||||
int index0 = this.arrayIndexOfStack(stacks, new ItemStack(Item.firework));
|
||||
int index1 = this.arrayIndexOfStack(stacks, new ItemStack(Item.fireballCharge));
|
||||
int index0 = this.arrayIndexOfStack(stacks, new ItemStack(Items.fireworks));
|
||||
int index1 = this.arrayIndexOfStack(stacks, new ItemStack(Items.fire_charge));
|
||||
EnumFacing face = getFacing(par1World, par2, par3, par4);
|
||||
|
||||
while (stacks.get(index0).stackSize > 0 && stacks.get(index1).stackSize > 0)
|
||||
@@ -62,9 +63,9 @@ public class SpecialStackHandlerRocketFireball extends SpecialStackHandler
|
||||
}
|
||||
}
|
||||
|
||||
this.removeItemFromInventory(par1World, par2, par3, par4, new ItemStack(Item.firework, 1));
|
||||
this.removeItemFromInventory(par1World, par2, par3, par4, new ItemStack(Items.fireworks, 1));
|
||||
stacks.get(index0).stackSize--;
|
||||
this.removeItemFromInventory(par1World, par2, par3, par4, new ItemStack(Item.fireballCharge, 1));
|
||||
this.removeItemFromInventory(par1World, par2, par3, par4, new ItemStack(Items.fire_charge, 1));
|
||||
stacks.get(index1).stackSize--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.util.UUID;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeInstance;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.ai.attributes.IAttributeInstance;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -176,7 +176,7 @@ public class ArmorExtended implements IInventory
|
||||
//TConstruct.logger.info("healthChange: "+healthChange+" on side "+FMLCommonHandler.instance().getEffectiveSide());
|
||||
if (healthChange != 0)
|
||||
{
|
||||
AttributeInstance attributeinstance = player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.maxHealth);
|
||||
IAttributeInstance attributeinstance = player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.maxHealth);
|
||||
try
|
||||
{
|
||||
attributeinstance.removeModifier(attributeinstance.getModifier(globalID));
|
||||
@@ -202,7 +202,7 @@ public class ArmorExtended implements IInventory
|
||||
int healthChange = bonusHP - prevHealth;
|
||||
if (healthChange != 0)
|
||||
{
|
||||
AttributeInstance attributeinstance = player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.maxHealth);
|
||||
IAttributeInstance attributeinstance = player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.maxHealth);
|
||||
try
|
||||
{
|
||||
attributeinstance.removeModifier(attributeinstance.getModifier(globalID));
|
||||
|
||||
@@ -6,8 +6,9 @@ import java.util.Random;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EnumEntitySize;
|
||||
import net.minecraft.entity.Entity.EnumEntitySize;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -41,7 +42,7 @@ public class TPlayerHandler implements IPlayerTracker
|
||||
NBTTagCompound tags = entityplayer.getEntityData();
|
||||
if (!tags.hasKey("TConstruct"))
|
||||
{
|
||||
tags.setCompoundTag("TConstruct", new NBTTagCompound());
|
||||
tags.setTag("TConstruct", new NBTTagCompound());
|
||||
}
|
||||
TPlayerStats stats = new TPlayerStats();
|
||||
stats.player = new WeakReference<EntityPlayer>(entityplayer);
|
||||
@@ -79,7 +80,7 @@ public class TPlayerHandler implements IPlayerTracker
|
||||
ItemStack pattern = new ItemStack(TRepo.woodPattern, 1, 22);
|
||||
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setCompoundTag("display", new NBTTagCompound());
|
||||
compound.setTag("display", new NBTTagCompound());
|
||||
compound.getCompoundTag("display").setString("Name", "\u00A7f" + "Fudgy_Fetus' Full Guard Pattern");
|
||||
NBTTagList list = new NBTTagList();
|
||||
list.appendTag(new NBTTagString("Lore", "\u00A72\u00A7o" + "The creator and the creation"));
|
||||
@@ -92,10 +93,10 @@ public class TPlayerHandler implements IPlayerTracker
|
||||
|
||||
if (entityplayer.username.toLowerCase().equals("zerokyuuni"))
|
||||
{
|
||||
ItemStack pattern = new ItemStack(Item.stick);
|
||||
ItemStack pattern = new ItemStack(Items.stick);
|
||||
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setCompoundTag("display", new NBTTagCompound());
|
||||
compound.setTag("display", new NBTTagCompound());
|
||||
compound.getCompoundTag("display").setString("Name", "\u00A78" + "Cheaty Inventory");
|
||||
NBTTagList list = new NBTTagList();
|
||||
list.appendTag(new NBTTagString("Lore", "\u00A72\u00A7o" + "Nyaa~"));
|
||||
@@ -189,7 +190,7 @@ public class TPlayerHandler implements IPlayerTracker
|
||||
tTag.setBoolean("beginnerManual", stats.beginnerManual);
|
||||
tTag.setBoolean("materialManual", stats.materialManual);
|
||||
tTag.setBoolean("smelteryManual", stats.smelteryManual);
|
||||
tags.setCompoundTag("TConstruct", tTag);
|
||||
tags.setTag("TConstruct", tTag);
|
||||
|
||||
Side side = FMLCommonHandler.instance().getEffectiveSide();
|
||||
if (side == Side.CLIENT)
|
||||
|
||||
Reference in new issue
Block a user