mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-23 21:49:45 +00:00
now at around 4700 errors
This commit is contained in:
1 parent
e187d8525b
commit
4228b26a07
28 files changed
+88
-89
No files matched your search
@@ -10,7 +10,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.logic.CraftingStationLogic;
|
||||
|
||||
@@ -3,20 +3,20 @@ package tconstruct.blocks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.BlockFluidFinite;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class GlueFluid extends BlockFluidFinite {
|
||||
|
||||
Icon stillIcon;
|
||||
Icon flowIcon;
|
||||
IIcon stillIcon;
|
||||
IIcon flowIcon;
|
||||
|
||||
public GlueFluid(int id, Fluid fluid, Material material)
|
||||
{
|
||||
@@ -25,7 +25,7 @@ public class GlueFluid extends BlockFluidFinite {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
stillIcon = iconRegister.registerIcon("tinker:liquid_glue");
|
||||
flowIcon = iconRegister.registerIcon("tinker:liquid_glue_flow");
|
||||
@@ -33,7 +33,7 @@ public class GlueFluid extends BlockFluidFinite {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon (int side, int meta)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
if (side == 0 || side == 1)
|
||||
return stillIcon;
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -14,10 +14,10 @@ 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.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
@@ -28,12 +28,12 @@ import mantle.blocks.iface.IServantLogic;
|
||||
|
||||
public class LavaTankBlock extends BlockContainer
|
||||
{
|
||||
public Icon[] icons;
|
||||
public IIcon[] icons;
|
||||
String texturePrefix = "";
|
||||
|
||||
public LavaTankBlock(int id)
|
||||
public LavaTankBlock()
|
||||
{
|
||||
super(id, Material.rock);
|
||||
super(Material.rock);
|
||||
setHardness(3F);
|
||||
setResistance(20F);
|
||||
setCreativeTab(TConstructRegistry.blockTab);
|
||||
@@ -41,9 +41,9 @@ public class LavaTankBlock extends BlockContainer
|
||||
setStepSound(Block.soundGlassFootstep);
|
||||
}
|
||||
|
||||
public LavaTankBlock(int id, String prefix)
|
||||
public LavaTankBlock(String prefix)
|
||||
{
|
||||
this(id);
|
||||
this();
|
||||
texturePrefix = prefix;
|
||||
}
|
||||
|
||||
@@ -58,10 +58,10 @@ public class LavaTankBlock extends BlockContainer
|
||||
return textureNames;
|
||||
}
|
||||
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
String[] textureNames = getTextureNames();
|
||||
this.icons = new Icon[textureNames.length];
|
||||
this.icons = new IIcon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ public class LavaTankBlock extends BlockContainer
|
||||
return TankRender.tankModelID;
|
||||
}
|
||||
|
||||
public Icon getIcon (int side, int meta)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
if (meta >= 3)
|
||||
meta = 0;
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.TConstruct;
|
||||
|
||||
@@ -12,7 +12,7 @@ public class StoneLadder extends BlockLadder
|
||||
// Override ladder material
|
||||
public final Material blockMaterial = Material.rock;
|
||||
|
||||
private Icon icon;
|
||||
private IIcon icon;
|
||||
|
||||
// Use the normally protected constructor
|
||||
public StoneLadder()
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
@@ -10,10 +10,10 @@ import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.Packet132TileEntityData;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidEvent;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -378,7 +378,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
liquid.writeToNBT(nbt);
|
||||
tags.setCompoundTag("Fluid", nbt);
|
||||
tags.setTag("Fluid", nbt);
|
||||
}
|
||||
tags.setBoolean("Initialized", init);
|
||||
tags.setInteger("Capacity", capacity);
|
||||
|
||||
@@ -4,10 +4,10 @@ import java.util.HashMap;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.Packet132TileEntityData;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidEvent;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@@ -10,10 +10,10 @@ import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.Packet132TileEntityData;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidEvent;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@@ -6,11 +6,11 @@ import mantle.blocks.iface.IFacingLogic;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.Packet132TileEntityData;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
@@ -163,7 +163,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
liquid.writeToNBT(nbt);
|
||||
tags.setCompoundTag("Fluid", nbt);
|
||||
tags.setTag("Fluid", nbt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package tconstruct.blocks.logic;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.Packet132TileEntityData;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ import mantle.blocks.abstracts.MultiServantLogic;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.Packet132TileEntityData;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import tconstruct.blocks.GlassPaneConnected;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@@ -38,7 +38,7 @@ public class PaneConnectedRender implements ISimpleBlockRenderingHandler
|
||||
boolean flag2 = pane.canPaneConnectTo(world, x, y, z, SOUTH);
|
||||
boolean flag3 = pane.canPaneConnectTo(world, x, y, z, NORTH);
|
||||
|
||||
Icon sideTexture = pane.getSideTextureIndex();
|
||||
IIcon sideTexture = pane.getSideTextureIndex();
|
||||
|
||||
if (!flag && !flag1 && !flag2 && !flag3)
|
||||
{
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
package tconstruct.client.event;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import java.util.*;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import mantle.lib.environment.EnvironmentChecks;
|
||||
|
||||
public class EventCloakRender
|
||||
@@ -30,7 +33,7 @@ public class EventCloakRender
|
||||
instance = this;
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void onPreRenderSpecials (RenderPlayerEvent.Specials.Pre event)
|
||||
{
|
||||
if (Loader.isModLoaded("shadersmod") || EnvironmentChecks.hasOptifine)
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
@@ -166,7 +167,7 @@ public class SmelteryGui extends NewContainerGui
|
||||
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||
if (logic.fuelGague > 0)
|
||||
{
|
||||
Icon lavaIcon = Block.lavaStill.getIcon(0, 0);
|
||||
IIcon lavaIcon = Blocks.lava.getIcon(0, 0);
|
||||
int fuel = logic.getScaledFuelGague(52);
|
||||
int count = 0;
|
||||
while (fuel > 0)
|
||||
@@ -182,7 +183,7 @@ public class SmelteryGui extends NewContainerGui
|
||||
int base = 0;
|
||||
for (FluidStack liquid : logic.moltenMetal)
|
||||
{
|
||||
Icon renderIndex = liquid.getFluid().getStillIcon();
|
||||
IIcon renderIndex = liquid.getFluid().getStillIcon();
|
||||
int basePos = 54;
|
||||
if (logic.getCapacity() > 0)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package tconstruct.client.tabs;
|
||||
|
||||
import tconstruct.client.TControls;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -8,7 +9,7 @@ public class InventoryTabArmorExtended extends AbstractTab
|
||||
{
|
||||
public InventoryTabArmorExtended()
|
||||
{
|
||||
super(0, 0, 0, new ItemStack(Item.plateDiamond));
|
||||
super(0, 0, 0, new ItemStack(Items.diamond_chestplate));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package tconstruct.client.tabs;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class InventoryTabVanilla extends AbstractTab
|
||||
{
|
||||
public InventoryTabVanilla()
|
||||
{
|
||||
super(0, 0, 0, new ItemStack(Block.workbench));
|
||||
super(0, 0, 0, new ItemStack(Blocks.crafting_table));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,9 +9,9 @@ import tconstruct.library.armor.*;
|
||||
public class ArmorStandard extends ArmorCore
|
||||
{
|
||||
|
||||
public ArmorStandard(int par1, int baseProtection, EnumArmorPart armorPart)
|
||||
public ArmorStandard(int baseProtection, EnumArmorPart armorPart)
|
||||
{
|
||||
super(par1, baseProtection, armorPart);
|
||||
super(baseProtection, armorPart);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,7 +6,6 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumArmorMaterial;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -25,7 +24,7 @@ public class TArmorBase extends ItemArmor
|
||||
|
||||
public TArmorBase(int armorSlot)
|
||||
{
|
||||
super(EnumArmorMaterial.CLOTH, 0, armorSlot);
|
||||
super(ArmorMaterial.CLOTH, 0, armorSlot);
|
||||
this.maxStackSize = 1;
|
||||
this.setMaxDamage(100);
|
||||
setNoRepair();
|
||||
|
||||
@@ -8,11 +8,11 @@ import tconstruct.common.TRepo;
|
||||
public enum FluidType
|
||||
{
|
||||
/** Vanilla Water Smelting **/
|
||||
Water(Block.snow.blockID, 0, 20, FluidRegistry.getFluid("water"), false),
|
||||
Water(Blocks.snow.blockID, 0, 20, FluidRegistry.getFluid("water"), false),
|
||||
/** Iron Smelting **/
|
||||
Iron(Block.blockIron.blockID, 0, 600, TRepo.moltenIronFluid, true),
|
||||
Iron(Blocks.iron_block.blockID, 0, 600, TRepo.moltenIronFluid, true),
|
||||
/** Gold Smelting **/
|
||||
Gold(Blocks.glold_block.blockID, 0, 400, TRepo.moltenGoldFluid, false),
|
||||
Gold(Blocks.gold_block.blockID, 0, 400, TRepo.moltenGoldFluid, false),
|
||||
/** Tin Smelting **/
|
||||
Tin(TRepo.metalBlock.blockID, 5, 400, TRepo.moltenTinFluid, false),
|
||||
/** Copper Smelting **/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package tconstruct.library.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.Event;
|
||||
|
||||
/* This event fires after all of the other construction. The resulting nbttag is added to the tool
|
||||
* Note: The tag is the base tag. toolTag.getCompoundTag("InfiTool") will have all of the tool's data.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package tconstruct.library.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import mantle.blocks.abstracts.InventoryLogic;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.Event;
|
||||
|
||||
public class SmelteryEvent extends Event {
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package tconstruct.library.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import tconstruct.library.tools.ToolMaterial;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.event.Event;
|
||||
|
||||
/* This event fires after all of the other construction. The resulting nbttag is added to the tool
|
||||
* Note: The tag is the base tag. toolTag.getCompoundTag("InfiTool") will have all of the tool's data.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package tconstruct.library.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.Event;
|
||||
|
||||
public class ToolCraftedEvent extends Event {
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ import mantle.crash.CallableUnsuppConfig;
|
||||
import net.minecraft.client.gui.GuiMainMenu;
|
||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.ICrashCallable;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -74,7 +74,7 @@ public class EnvironmentChecks
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void openMainMenu (GuiOpenEvent event)
|
||||
{
|
||||
if (event.gui instanceof GuiMainMenu)
|
||||
|
||||
@@ -5,6 +5,8 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
@@ -21,6 +23,7 @@ import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
import net.minecraft.entity.passive.EntityChicken;
|
||||
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.ItemFood;
|
||||
@@ -29,12 +32,8 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.world.GameRules;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.Event;
|
||||
import net.minecraftforge.event.Event.Result;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
@@ -69,7 +68,7 @@ public class TEventHandler
|
||||
Random random = new Random();
|
||||
|
||||
/* Crafting */
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void craftTool (ToolCraftEvent.NormalTool event)
|
||||
{
|
||||
NBTTagCompound toolTag = event.toolTag.getCompoundTag("InfiTool");
|
||||
@@ -172,7 +171,7 @@ public class TEventHandler
|
||||
return true;
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void craftPart (PartBuilderEvent.NormalPart event)
|
||||
{
|
||||
if (event.pattern.getItem() == TRepo.woodPattern && event.pattern.getItemDamage() == 23)
|
||||
@@ -209,7 +208,7 @@ public class TEventHandler
|
||||
{
|
||||
if (matchesLeaves(stack))
|
||||
{
|
||||
FletchingMaterial leaves = (FletchingMaterial) TConstructRegistry.getCustomMaterial(new ItemStack(Block.leaves), FletchingMaterial.class);
|
||||
FletchingMaterial leaves = (FletchingMaterial) TConstructRegistry.getCustomMaterial(new ItemStack(Blocks.leaves), FletchingMaterial.class);
|
||||
return leaves.craftingItem.copy();
|
||||
}
|
||||
|
||||
@@ -234,7 +233,7 @@ public class TEventHandler
|
||||
}
|
||||
|
||||
/* Damage */
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void onHurt (LivingHurtEvent event)
|
||||
{
|
||||
if (event.entityLiving instanceof EntityPlayer)
|
||||
@@ -250,7 +249,7 @@ public class TEventHandler
|
||||
}
|
||||
|
||||
/* Drops */
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void onLivingDrop (LivingDropsEvent event)
|
||||
{
|
||||
if (event.entityLiving == null)
|
||||
@@ -314,7 +313,7 @@ public class TEventHandler
|
||||
|
||||
for (int iter = 0; iter < amount; ++iter)
|
||||
{
|
||||
addDrops(event, new ItemStack(Item.feather, 1));
|
||||
addDrops(event, new ItemStack(Items.feather, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,7 +335,7 @@ public class TEventHandler
|
||||
beheading += 2;
|
||||
if (beheading > 0 && random.nextInt(100) < beheading * 10)
|
||||
{
|
||||
addDrops(event, new ItemStack(Item.skull.itemID, 1, enemy.getSkeletonType()));
|
||||
addDrops(event, new ItemStack(Items.skull, 1, enemy.getSkeletonType()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,7 +361,7 @@ public class TEventHandler
|
||||
beheading += 2;
|
||||
if (beheading > 0 && random.nextInt(100) < beheading * 10)
|
||||
{
|
||||
addDrops(event, new ItemStack(Item.skull.itemID, 1, 2));
|
||||
addDrops(event, new ItemStack(Items.skull, 1, 2));
|
||||
}
|
||||
}
|
||||
/*if (stack.getItem() == TRepo.breakerBlade && random.nextInt(100) < 10) //Swap out for real beheading
|
||||
@@ -387,7 +386,7 @@ public class TEventHandler
|
||||
beheading += 2;
|
||||
if (beheading > 0 && random.nextInt(100) < beheading * 5)
|
||||
{
|
||||
addDrops(event, new ItemStack(Item.skull.itemID, 1, 4));
|
||||
addDrops(event, new ItemStack(Items.skull, 1, 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -400,15 +399,15 @@ public class TEventHandler
|
||||
{
|
||||
for (EntityItem o : event.drops)
|
||||
{
|
||||
if (o.getEntityItem().itemID == Item.ghastTear.itemID)
|
||||
if (o.getEntityItem().itemID == Items.ghast_tear)
|
||||
{
|
||||
o.setEntityItemStack(new ItemStack(Item.ingotGold, 1));
|
||||
o.setEntityItemStack(new ItemStack(Items.gold_ingot, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
addDrops(event, new ItemStack(Item.ghastTear, 1));
|
||||
addDrops(event, new ItemStack(Items.ghast_tear, 1));
|
||||
}
|
||||
}
|
||||
//}
|
||||
@@ -419,7 +418,7 @@ public class TEventHandler
|
||||
|
||||
if (PHConstruct.dropPlayerHeads)
|
||||
{
|
||||
ItemStack dropStack = new ItemStack(Item.skull.itemID, 1, 3);
|
||||
ItemStack dropStack = new ItemStack(Items.skull, 1, 3);
|
||||
NBTTagCompound nametag = new NBTTagCompound();
|
||||
nametag.setString("SkullOwner", player.username);
|
||||
addDrops(event, dropStack);
|
||||
@@ -436,7 +435,7 @@ public class TEventHandler
|
||||
beheading += 2;
|
||||
if (beheading > 0 && random.nextInt(100) < beheading * 50)
|
||||
{
|
||||
ItemStack dropStack = new ItemStack(Item.skull.itemID, 1, 3);
|
||||
ItemStack dropStack = new ItemStack(Items.skull, 1, 3);
|
||||
NBTTagCompound nametag = new NBTTagCompound();
|
||||
nametag.setString("SkullOwner", player.username);
|
||||
addDrops(event, dropStack);
|
||||
@@ -457,7 +456,7 @@ public class TEventHandler
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void onLivingDeath (LivingDeathEvent event)
|
||||
{
|
||||
Entity cause = event.source.getSourceOfDamage();
|
||||
@@ -488,7 +487,7 @@ public class TEventHandler
|
||||
}
|
||||
}*/
|
||||
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void onLivingSpawn (LivingSpawnEvent.SpecialSpawn event)
|
||||
{
|
||||
EntityLivingBase living = event.entityLiving;
|
||||
@@ -518,7 +517,7 @@ public class TEventHandler
|
||||
|
||||
/* Bonemeal */
|
||||
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void bonemealEvent (BonemealEvent event)
|
||||
{
|
||||
if (!event.world.isRemote)
|
||||
@@ -532,7 +531,7 @@ public class TEventHandler
|
||||
}
|
||||
|
||||
/* Ore Dictionary */
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void registerOre (OreRegisterEvent evt)
|
||||
{
|
||||
|
||||
@@ -547,7 +546,7 @@ public class TEventHandler
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void bucketFill (FillBucketEvent evt)
|
||||
{
|
||||
if (evt.current.getItem() == Items.bucket && evt.target.typeOfHit == EnumMovingObjectType.TILE)
|
||||
@@ -624,7 +623,7 @@ public class TEventHandler
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void livingUpdate (LivingUpdateEvent event)
|
||||
{
|
||||
if(event.entityLiving instanceof EntityPlayer){
|
||||
@@ -644,7 +643,7 @@ public class TEventHandler
|
||||
}
|
||||
|
||||
//Player interact event - prevent breaking of tank air blocks in creative
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void playerInteract (PlayerInteractEvent event)
|
||||
{
|
||||
if (event.action == Action.LEFT_CLICK_BLOCK)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package tconstruct.util;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import tconstruct.library.event.SmelteryEvent;
|
||||
|
||||
import net.minecraftforge.common.FakePlayer;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import tconstruct.achievements.TAchievements;
|
||||
import tconstruct.blocks.logic.ToolForgeLogic;
|
||||
import tconstruct.library.event.ToolCraftedEvent;
|
||||
@@ -11,7 +10,7 @@ import tconstruct.library.tools.*;
|
||||
|
||||
public class TEventHandlerAchievement {
|
||||
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void onToolCrafted(ToolCraftedEvent event){
|
||||
if(event.player != null && !(event.player instanceof FakePlayer)){
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.tinkerer"), 1);
|
||||
@@ -26,7 +25,7 @@ public class TEventHandlerAchievement {
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
@SubscribeEvent
|
||||
public void onItemPlacedIntoCasting(SmelteryEvent.ItemInsertedIntoCasting event){
|
||||
if(event.player != null && event.item != null){
|
||||
if(event.item.getItem() instanceof ToolCore){
|
||||
|
||||
Reference in new issue
Block a user