mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
more 1.7 work, attempts at figuring out log4j2
This commit is contained in:
1 parent
fb04e8eb08
commit
d911af378f
33 files changed
+96
-81
No files matched your search
@@ -11,8 +11,11 @@ import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.core.config.BaseConfiguration;
|
||||
import org.apache.logging.log4j.core.config.LoggerConfig;
|
||||
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -60,15 +63,19 @@ public class TConstruct
|
||||
|
||||
public TConstruct()
|
||||
{
|
||||
LoggerConfig fml = new LoggerConfig("FML", Level.ALL, true);
|
||||
LoggerConfig tcon = new LoggerConfig("TConstruct", Level.ALL, true);
|
||||
tcon.setParent(fml);
|
||||
|
||||
//logger.setParent(FMLCommonHandler.instance().getFMLLogger());
|
||||
if (Loader.isModLoaded("Natura"))
|
||||
{
|
||||
System.out.println("[TConstruct] Natura, what are we going to do tomorrow night?");
|
||||
System.out.println("[Natura] TConstruct, we're going to take over the world!");
|
||||
logger.info("Natura, what are we going to do tomorrow night?");
|
||||
LogManager.getLogger("Natura").info("TConstruct, we're going to take over the world!");
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("[TConstruct] Preparing to take over the world");
|
||||
logger.info("Preparing to take over the world");
|
||||
}
|
||||
|
||||
EnvironmentChecks.verifyEnvironmentSanity();
|
||||
@@ -105,7 +112,7 @@ public class TConstruct
|
||||
MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEventHandler());
|
||||
GameRegistry.registerFuelHandler(content);
|
||||
GameRegistry.registerCraftingHandler(new TCraftingHandler());
|
||||
NetworkRegistry.instance().registerGuiHandler(instance, proxy);
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
|
||||
|
||||
if (PHConstruct.addToVillages)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ public class GlassBlock extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBlockHardness (World world, int x, int y, int z)
|
||||
public float func_149712_f (World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
switch (meta)
|
||||
@@ -42,7 +42,7 @@ public class GlassBlock extends TConstructBlock
|
||||
case 2:
|
||||
return 50.0F;
|
||||
default:
|
||||
return blockHardness;
|
||||
return field_149782_v;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class GlassBlock extends TConstructBlock
|
||||
case 2:
|
||||
return 2000F;
|
||||
default:
|
||||
return getExplosionResistance(entity);
|
||||
return func_149638_a(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class StoneTorch extends MantleBlock
|
||||
{
|
||||
public StoneTorch(int id)
|
||||
{
|
||||
super(Material.circuits);
|
||||
super(Material.field_151594_q);
|
||||
this.setCreativeTab(CreativeTabs.tabDecorations);
|
||||
setLightValue(0.9375F);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.block.BlockBaseRailLogic;
|
||||
import net.minecraft.block.BlockRailBase;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -40,9 +41,9 @@ public class WoodRail extends BlockRailBase
|
||||
this.theIcon = par1IconRegister.registerIcon("tinker:woodrail_turn");
|
||||
}
|
||||
|
||||
protected void func_94358_a (World par1World, int par2, int par3, int par4, int par5, int par6, int par7)
|
||||
protected void func_94358_a (World par1World, int par2, int par3, int par4, int par5, int par6, Block par7)
|
||||
{
|
||||
if (par7 > 0 && Block.blocksList[par7].canProvidePower() && (new BlockBaseRailLogic(this, par1World, par2, par3, par4)).getNumberOfAdjacentTracks() == 3)
|
||||
if (par7 != Blocks.air && par7.canProvidePower() && (new BlockBaseRailLogic(this, par1World, par2, par3, par4)).getNumberOfAdjacentTracks() == 3)
|
||||
{
|
||||
this.refreshTrackShape(par1World, par2, par3, par4, false);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class SmelteryScan extends TankLayerScan
|
||||
@Override
|
||||
protected boolean checkServant (int x, int y, int z)
|
||||
{
|
||||
Block block = world.func_147439_a(x, y, z)];
|
||||
Block block = world.func_147439_a(x, y, z);
|
||||
if (block == null || world.func_147439_a( x, y, z) == Blocks.air || !isValidBlock(x, y, z))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity ()
|
||||
public void func_145845_h ()
|
||||
{
|
||||
if (this.field_145850_b.isRemote)
|
||||
return;
|
||||
@@ -556,7 +556,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
liquid.writeToNBT(nbt);
|
||||
tags.setCompoundTag("Fluid", nbt);
|
||||
tags.setTag("Fluid", nbt);
|
||||
}
|
||||
tags.setInteger("LastProvider", this.convertFDToInt(this.lastProvider));
|
||||
tags.setInteger("recentlyFilledDelay", this.recentlyFilledDelay);
|
||||
|
||||
@@ -300,7 +300,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
|
||||
/* Updating */
|
||||
@Override
|
||||
public void updateEntity ()
|
||||
public void func_145845_h ()
|
||||
{
|
||||
if (castingDelay > 0)
|
||||
{
|
||||
|
||||
@@ -169,7 +169,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity ()
|
||||
public void func_145845_h ()
|
||||
{
|
||||
if (renderOffset > 0)
|
||||
{
|
||||
|
||||
@@ -255,7 +255,7 @@ public class TileEntityLandmine extends TileEntity implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity ()
|
||||
public void func_145845_h ()
|
||||
{
|
||||
if (shouldUpdateLogic)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ public class BlockSkinRenderHelper
|
||||
{
|
||||
public static boolean renderMetadataBlock (Block block, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
|
||||
{
|
||||
//TODO CHECK THESE!!!!
|
||||
int var5 = block.colorMultiplier(world, x, y, z);
|
||||
float var6 = (float) (var5 >> 16 & 255) / 255.0F;
|
||||
float var7 = (float) (var5 >> 8 & 255) / 255.0F;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class BreakingFX extends EntityFX
|
||||
super(par1World, par2, par4, par6, 0.0D, 0.0D, 0.0D);
|
||||
this.setParticleIcon(par8Item.getIconFromDamage(par9));
|
||||
this.particleRed = this.particleGreen = this.particleBlue = 1.0F;
|
||||
this.particleGravity = Blocks.snow.blockParticleGravity;
|
||||
this.particleGravity = Blocks.snow.field_149763_I;
|
||||
this.particleScale /= 2.0F;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
*/
|
||||
|
||||
public class RenderLiquid
|
||||
{
|
||||
{//TODO CHECK THIS!!!!
|
||||
public static boolean renderMetadataBlock (Block block, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
|
||||
{
|
||||
int var5 = block.colorMultiplier(world, x, y, z);
|
||||
@@ -32,7 +32,7 @@ public class RenderLiquid
|
||||
var8 = var11;
|
||||
}
|
||||
|
||||
return (Minecraft.isAmbientOcclusionEnabled()) && (Block.lightValue[block.blockID] == 0) ? renderMetadataBlockWithAmbientOcclusion(block, metadata, x, y, z, var6, var7, var8, renderer, world)
|
||||
return (Minecraft.isAmbientOcclusionEnabled()) && (block.lightValue == 0) ? renderMetadataBlockWithAmbientOcclusion(block, metadata, x, y, z, var6, var7, var8, renderer, world)
|
||||
: renderMetadataBlockWithColorMultiplier(block, metadata, x, y, z, var6, var7, var8, renderer, world);
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.barricadeSpruce = new BarricadeBlock(Blocks.log, 1).func_149663_c("trap.barricade.spruce");
|
||||
TRepo.barricadeBirch = new BarricadeBlock(Blocks.log, 2).func_149663_c("trap.barricade.birch");
|
||||
TRepo.barricadeJungle = new BarricadeBlock(Blocks.log, 3).func_149663_c("trap.barricade.jungle");
|
||||
TRepo.slimeExplosive = new SlimeExplosive().setHardness(0.0F).setStepSound(Block.soundGrassFootstep).func_149663_c("explosive.slime");
|
||||
TRepo.slimeExplosive = new SlimeExplosive().setHardness(0.0F).setStepSound(Block.field_149779_h).func_149663_c("explosive.slime");
|
||||
|
||||
TRepo.dryingRack = new DryingRack().func_149663_c("Armor.DryingRack");
|
||||
|
||||
@@ -383,8 +383,8 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenNickel, TRepo.moltenLead, TRepo.moltenSilver, TRepo.moltenShiny, TRepo.moltenInvar, TRepo.moltenElectrum, TRepo.moltenEnder, TRepo.slimePool, TRepo.glueFluidBlock };
|
||||
//Slime Islands
|
||||
TRepo.slimeGel = new SlimeGel(PHConstruct.slimeGel).setStepSound(TRepo.slimeStep).setLightOpacity(0).func_149663_c("slime.gel");
|
||||
TRepo.slimeGrass = new SlimeGrass(PHConstruct.slimeGrass).setStepSound(Block.soundGrassFootstep).setLightOpacity(0).func_149663_c("slime.grass");
|
||||
TRepo.slimeTallGrass = new SlimeTallGrass(PHConstruct.slimeTallGrass).setStepSound(Block.soundGrassFootstep).func_149663_c("slime.grass.tall");
|
||||
TRepo.slimeGrass = new SlimeGrass(PHConstruct.slimeGrass).setStepSound(Block.field_149779_h).setLightOpacity(0).func_149663_c("slime.grass");
|
||||
TRepo.slimeTallGrass = new SlimeTallGrass(PHConstruct.slimeTallGrass).setStepSound(Block.field_149779_h).func_149663_c("slime.grass.tall");
|
||||
TRepo.slimeLeaves = (SlimeLeaves) new SlimeLeaves(PHConstruct.slimeLeaves).setStepSound(TRepo.slimeStep).setLightOpacity(0).func_149663_c("slime.leaves");
|
||||
TRepo.slimeSapling = (SlimeSapling) new SlimeSapling(PHConstruct.slimeSapling).setStepSound(TRepo.slimeStep).func_149663_c("slime.sapling");
|
||||
TRepo.slimeChannel = new ConveyorBase(PHConstruct.slimeChannel, Material.water, "greencurrent").setHardness(0.3f).setStepSound(TRepo.slimeStep).func_149663_c("slime.channel");
|
||||
@@ -715,28 +715,28 @@ public class TContent implements IFuelHandler
|
||||
pb.registerMaterialSet("Wood", new ItemStack(Items.stick, 2), new ItemStack(Items.stick), 0);
|
||||
if (PHConstruct.enableTStone)
|
||||
{
|
||||
pb.registerFullMaterial(Block.stone, 2, "Stone", new ItemStack(TRepo.toolShard, 1, 1), new ItemStack(TRepo.toolRod, 1, 1), 1);
|
||||
pb.registerMaterial(Block.cobblestone, 2, "Stone");
|
||||
pb.registerFullMaterial(Blocks.stone, 2, "Stone", new ItemStack(TRepo.toolShard, 1, 1), new ItemStack(TRepo.toolRod, 1, 1), 1);
|
||||
pb.registerMaterial(Blocks.cobblestone, 2, "Stone");
|
||||
}
|
||||
else
|
||||
pb.registerMaterialSet("Stone", new ItemStack(TRepo.toolShard, 1, 1), new ItemStack(TRepo.toolRod, 1, 1), 0);
|
||||
pb.registerFullMaterial(Item.ingotIron, 2, "Iron", new ItemStack(TRepo.toolShard, 1, 2), new ItemStack(TRepo.toolRod, 1, 2), 2);
|
||||
pb.registerFullMaterial(Items.iron_ingot, 2, "Iron", new ItemStack(TRepo.toolShard, 1, 2), new ItemStack(TRepo.toolRod, 1, 2), 2);
|
||||
if (PHConstruct.enableTFlint)
|
||||
pb.registerFullMaterial(Item.flint, 2, "Flint", new ItemStack(TRepo.toolShard, 1, 3), new ItemStack(TRepo.toolRod, 1, 3), 3);
|
||||
pb.registerFullMaterial(Items.flint, 2, "Flint", new ItemStack(TRepo.toolShard, 1, 3), new ItemStack(TRepo.toolRod, 1, 3), 3);
|
||||
else
|
||||
pb.registerMaterialSet("Flint", new ItemStack(TRepo.toolShard, 1, 3), new ItemStack(TRepo.toolRod, 1, 3), 3);
|
||||
if (PHConstruct.enableTCactus)
|
||||
pb.registerFullMaterial(Block.cactus, 2, "Cactus", new ItemStack(TRepo.toolShard, 1, 4), new ItemStack(TRepo.toolRod, 1, 4), 4);
|
||||
pb.registerFullMaterial(Blocks.cactus, 2, "Cactus", new ItemStack(TRepo.toolShard, 1, 4), new ItemStack(TRepo.toolRod, 1, 4), 4);
|
||||
else
|
||||
pb.registerMaterialSet("Cactus", new ItemStack(TRepo.toolShard, 1, 4), new ItemStack(TRepo.toolRod, 1, 4), 4);
|
||||
if (PHConstruct.enableTBone)
|
||||
pb.registerFullMaterial(Item.bone, 2, "Bone", new ItemStack(Item.dyePowder, 1, 15), new ItemStack(Item.bone), 5);
|
||||
pb.registerFullMaterial(Items.bone, 2, "Bone", new ItemStack(Items.dyePowder, 1, 15), new ItemStack(Item.bone), 5);
|
||||
else
|
||||
pb.registerMaterialSet("Bone", new ItemStack(Item.dyePowder, 1, 15), new ItemStack(Item.bone), 5);
|
||||
pb.registerFullMaterial(Block.obsidian, 2, "Obsidian", new ItemStack(TRepo.toolShard, 1, 6), new ItemStack(TRepo.toolRod, 1, 6), 6);
|
||||
pb.registerMaterialSet("Bone", new ItemStack(Item.dyePowder, 1, 15), new ItemStack(Items.bone), 5);
|
||||
pb.registerFullMaterial(Blocks.obsidian, 2, "Obsidian", new ItemStack(TRepo.toolShard, 1, 6), new ItemStack(TRepo.toolRod, 1, 6), 6);
|
||||
pb.registerMaterial(new ItemStack(TRepo.materials, 1, 18), 2, "Obsidian");
|
||||
if (PHConstruct.enableTNetherrack)
|
||||
pb.registerFullMaterial(Block.netherrack, 2, "Netherrack", new ItemStack(TRepo.toolShard, 1, 7), new ItemStack(TRepo.toolRod, 1, 7), 7);
|
||||
pb.registerFullMaterial(Blocks.netherrack, 2, "Netherrack", new ItemStack(TRepo.toolShard, 1, 7), new ItemStack(TRepo.toolRod, 1, 7), 7);
|
||||
else
|
||||
pb.registerMaterialSet("Netherrack", new ItemStack(TRepo.toolShard, 1, 7), new ItemStack(TRepo.toolRod, 1, 7), 7);
|
||||
if (PHConstruct.enableTSlime)
|
||||
|
||||
@@ -1285,7 +1285,7 @@ public class TRecipes
|
||||
}
|
||||
else
|
||||
{
|
||||
TConstruct.logger.warning("Thaumcraft not detected.");
|
||||
TConstruct.logger.warn("Thaumcraft not detected.");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Natura"))
|
||||
@@ -1402,7 +1402,7 @@ public class TRecipes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TConstruct.logger.warning("Could not find " + name + "from " + classPackage);
|
||||
TConstruct.logger.warn("Could not find " + name + "from " + classPackage);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package tconstruct.entity;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1428,14 +1430,14 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSpawnData (ByteArrayDataOutput data)
|
||||
public void writeSpawnData (ByteBuf data)
|
||||
{
|
||||
data.writeInt(pullcartType);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSpawnData (ByteArrayDataInput data)
|
||||
public void readSpawnData (ByteBuf data)
|
||||
{
|
||||
pullcartType = data.readInt();
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.entity;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
@@ -24,18 +25,6 @@ public class FakeBlockEntity extends Entity implements IEntityAdditionalSpawnDat
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSpawnData (ByteArrayDataOutput data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSpawnData (ByteArrayDataInput data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT (NBTTagCompound var1)
|
||||
{
|
||||
@@ -48,4 +37,16 @@ public class FakeBlockEntity extends Entity implements IEntityAdditionalSpawnDat
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSpawnData (ByteBuf buffer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSpawnData (ByteBuf additionalData)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package tconstruct.entity.projectile;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -594,7 +596,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSpawnData (ByteArrayDataOutput data)
|
||||
public void writeSpawnData (ByteBuf data)
|
||||
{
|
||||
if (!returnStack.hasTagCompound())
|
||||
this.kill();
|
||||
@@ -639,7 +641,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSpawnData (ByteArrayDataInput data)
|
||||
public void readSpawnData (ByteBuf data)
|
||||
{
|
||||
returnStack = new ItemStack(data.readShort(), 1, 0);
|
||||
rotationYaw = data.readFloat();
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package tconstruct.entity.projectile;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -334,7 +335,7 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
|
||||
|
||||
public void writeEntityToNBT (NBTTagCompound tags)
|
||||
{
|
||||
tags.setCompoundTag("Throwable", this.returnStack.writeToNBT(new NBTTagCompound()));
|
||||
tags.setTag("Throwable", this.returnStack.writeToNBT(new NBTTagCompound()));
|
||||
tags.setShort("xTile", (short) xTile);
|
||||
tags.setShort("yTile", (short) yTile);
|
||||
tags.setShort("zTile", (short) zTile);
|
||||
@@ -417,7 +418,7 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
|
||||
public boolean doNotRetrieve;
|
||||
|
||||
@Override
|
||||
public void writeSpawnData (ByteArrayDataOutput data)
|
||||
public void writeSpawnData (ByteBuf data)
|
||||
{
|
||||
NBTTagCompound tags = returnStack.getTagCompound().getCompoundTag("InfiTool");
|
||||
data.writeShort(returnStack.itemID);
|
||||
@@ -459,7 +460,7 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSpawnData (ByteArrayDataInput data)
|
||||
public void readSpawnData (ByteBuf data)
|
||||
{
|
||||
returnStack = new ItemStack(data.readShort(), 1, 0);
|
||||
rotationYaw = data.readFloat();
|
||||
@@ -483,7 +484,7 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
|
||||
case 1:
|
||||
toolTag.setInteger("Effect1", data.readInt());
|
||||
}
|
||||
compound.setCompoundTag("InfiTool", toolTag);
|
||||
compound.setTag("InfiTool", toolTag);
|
||||
returnStack.setTagCompound(compound);
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ public class FilledBucket extends ItemBucket
|
||||
|
||||
world.setBlock(clickX, clickY, clickZ, TRepo.fluidBlocks[type], metadata, 3); //TODO: Merge liquids
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||
TConstruct.logger.warning("AIOBE occured when placing bucket into world; " + ex);
|
||||
TConstruct.logger.warn("AIOBE occured when placing bucket into world; " + ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public class FilledBucket extends ItemBucket
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems (Block b, CreativeTabs tab, List list)
|
||||
public void getSubItems (Item b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int i = 0; i < icons.length; i++)
|
||||
list.add(new ItemStack(b, 1, i));
|
||||
|
||||
@@ -17,7 +17,7 @@ import tconstruct.library.util.IPattern;
|
||||
|
||||
public class Pattern extends CraftingItem implements IPattern
|
||||
{
|
||||
public Pattern(int id, String patternType, String folder)
|
||||
public Pattern(String patternType, String folder)
|
||||
{
|
||||
this(patternName, getPatternNames(patternType), folder);
|
||||
}
|
||||
|
||||
@@ -105,8 +105,8 @@ public class Arrow extends ToolCore
|
||||
ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, 3), new ItemStack(getHandleItem(), 1, 0), accessoryStack, extraStack, "");
|
||||
if (tool == null)
|
||||
{
|
||||
TConstruct.logger.warning("Creative builder failed tool for Vanilla style" + this.getToolName());
|
||||
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
|
||||
TConstruct.logger.warn("Creative builder failed tool for Vanilla style" + this.getToolName());
|
||||
TConstruct.logger.warn("Make sure you do not have item ID conflicts");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -127,8 +127,8 @@ public class Arrow extends ToolCore
|
||||
{
|
||||
if (!TRepo.supressMissingToolLogs)
|
||||
{
|
||||
TConstruct.logger.warning("Creative builder failed tool for Vanilla style" + this.getToolName());
|
||||
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
|
||||
TConstruct.logger.warn("Creative builder failed tool for Vanilla style" + this.getToolName());
|
||||
TConstruct.logger.warn("Make sure you do not have item ID conflicts");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -150,8 +150,8 @@ public class Arrow extends ToolCore
|
||||
ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, id), new ItemStack(getHandleItem(), 1, id), accessoryStack, extraStack, name + getToolName());
|
||||
if (tool == null)
|
||||
{
|
||||
TConstruct.logger.warning("Creative builder failed tool for " + name + this.getToolName());
|
||||
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
|
||||
TConstruct.logger.warn("Creative builder failed tool for " + name + this.getToolName());
|
||||
TConstruct.logger.warn("Make sure you do not have item ID conflicts");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Battleaxe extends HarvestTool
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, b, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.circuits, Material.cactus, Material.pumpkin };
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.cactus, Material.pumpkin };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -773,8 +773,8 @@ public abstract class BowBase extends ToolCore
|
||||
{
|
||||
if (!TRepo.supressMissingToolLogs)
|
||||
{
|
||||
TConstruct.logger.warning("Creative builder failed tool for " + name + this.getToolName());
|
||||
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
|
||||
TConstruct.logger.warn("Creative builder failed tool for " + name + this.getToolName());
|
||||
TConstruct.logger.warn("Make sure you do not have item ID conflicts");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Excavator extends HarvestTool
|
||||
return "shovel";
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow, Material.clay };
|
||||
static Material[] materials = { Material.grass, Material.ground, Material.sand, Material.snow, Material.crafedSnow, Material.clay };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -67,7 +67,7 @@ public class Hammer extends HarvestTool
|
||||
return materials;
|
||||
}
|
||||
|
||||
static Material[] materials = new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston, Material.anvil };
|
||||
static Material[] materials = new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston, Material. field_151574_g };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Hatchet extends HarvestTool
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.field_151575_d, Material.leaves, Material.field_151582_l, Material.circuits, Material.cactus, Material.pumpkin };
|
||||
static Material[] materials = { Material.field_151575_d, Material.leaves, Material.field_151582_l, Material.field_151594_q, Material.cactus, Material.pumpkin };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -62,7 +62,7 @@ public class LumberAxe extends HarvestTool
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.circuits, Material.cactus, Material.pumpkin };
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.cactus, Material.pumpkin };
|
||||
|
||||
/* Lumber axe specific */
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Mattock extends DualHarvestTool
|
||||
return "shovel";
|
||||
}
|
||||
|
||||
static Material[] axeMaterials = { Material.field_151575_d, Material.cactus, Material.pumpkin, Material.plants, Material.vine };
|
||||
static Material[] axeMaterials = { Material.field_151575_d, Material.cactus, Material.pumpkin, Material.plants, Material.field_151582_l };
|
||||
static Material[] shovelMaterials = { Material.grass, Material.ground, Material.clay };
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,7 +25,7 @@ public class Pickaxe extends HarvestTool
|
||||
return materials;
|
||||
}
|
||||
|
||||
static Material[] materials = new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston, Material.anvil, Material.circuits };
|
||||
static Material[] materials = new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston, Material.field_151574_g, Material.field_151594_q };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -62,13 +62,13 @@ public class TActiveOmniMod extends ActiveToolMod
|
||||
Block block = entity.worldObj.getBlock(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
//TODO do we need the next to lines????????
|
||||
if (block == null || bID < 1 || bID > 4095)
|
||||
if (block == null)
|
||||
return false;
|
||||
|
||||
if (tags.getBoolean("Lava") && block.quantityDropped(meta, 0, random) != 0)
|
||||
{
|
||||
ItemStack smeltStack = new ItemStack(block.idDropped(meta, random, 0), block.quantityDropped(meta, 0, random), block.damageDropped(meta));
|
||||
if (smeltStack.itemID < 0 || smeltStack.itemID >= 32000 || smeltStack.getItem() == null)
|
||||
ItemStack smeltStack = new ItemStack(block.IDropped(meta, random, 0), block.quantityDropped(meta, 0, random), block.damageDropped(meta));
|
||||
if (smeltStack.getItem() == null)
|
||||
return false;
|
||||
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(smeltStack);
|
||||
if (result != null)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package tconstruct.util;
|
||||
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.ChatMessageComponent;
|
||||
|
||||
public class DamageSourceFireworkExplode extends DamageSource
|
||||
{
|
||||
@@ -14,7 +13,7 @@ public class DamageSourceFireworkExplode extends DamageSource
|
||||
this.setDamageBypassesArmor();
|
||||
}
|
||||
|
||||
public ChatMessageComponent getDeathMessage (EntityLivingBase par1EntityLivingBase)
|
||||
public IChatComponent getDeathMessage (EntityLivingBase par1EntityLivingBase)
|
||||
{
|
||||
return super.getDeathMessage(par1EntityLivingBase);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.util;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.ChatMessageComponent;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class DamageSourceLandmine extends DamageSource
|
||||
@@ -14,7 +15,7 @@ public class DamageSourceLandmine extends DamageSource
|
||||
this.setDamageBypassesArmor();
|
||||
}
|
||||
|
||||
public ChatMessageComponent getDeathMessage (EntityLivingBase par1EntityLivingBase)
|
||||
public IChatComponent getDeathMessage (EntityLivingBase par1EntityLivingBase)
|
||||
{
|
||||
return super.getDeathMessage(par1EntityLivingBase);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class TPacketHandler implements IPacketHandler
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TConstruct.logger.warning("Failed at reading client packet for TConstruct.");
|
||||
TConstruct.logger.warn("Failed at reading client packet for TConstruct.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public class TPacketHandler implements IPacketHandler
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
TConstruct.logger.warning("Failed at reading server packet for TConstruct.");
|
||||
TConstruct.logger.warn("Failed at reading server packet for TConstruct.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user