This commit is contained in:
Arthur Uzulin committed 2013-10-13 13:23:13 +11:00
commit 32ccf02784
49 files changed
+169 -105

No files matched your search

+1
View File
@@ -238,6 +238,7 @@ StorageMetals.Steel.name=Block of Steel
StorageMetals.Ender.name=Block of Solid Ender
tile.decoration.stonetorch.name=Torch
tile.decoration.stoneladder.name=Ladder
tile.CraftingStation.name=Crafting Station
block.glass.pure.name=Clear Glass
File renamed without changes.

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 494 B

+1 -1
View File
@@ -34,7 +34,7 @@ public final class Items {
return null;
}
} catch (Exception e) {
System.out.println("IC2 API: Call getItem failed for "+name);
System.out.println("IC2 API: Call getItem failed for " + name);
return null;
}
+13 -7
View File
@@ -23,6 +23,8 @@ import tconstruct.util.player.TPlayerHandler;
import tconstruct.worldgen.*;
import tconstruct.worldgen.village.*;
import java.util.logging.Logger;
/** TConstruct, the tool mod.
* Craft your tools with style, then modify until the original is gone!
* @author: mDiyo
@@ -37,6 +39,9 @@ public class TConstruct
public static final int ingotLiquidValue = 144;
public static final int liquidUpdateAmount = 6;
// Shared mod logger
public static final Logger logger = Logger.getLogger("TConstruct");
/* Instance of this mod, used for grabbing prototype fields */
@Instance("TConstruct")
public static TConstruct instance;
@@ -46,27 +51,28 @@ public class TConstruct
public TConstruct()
{
logger.setParent(FMLCommonHandler.instance().getFMLLogger());
if (Loader.isModLoaded("Natura"))
{
System.out.println("[TConstruct] Natura, what are we going to do tomorrow night?");
TConstruct.logger.info("[TConstruct] Natura, what are we going to do tomorrow night?");
if (Loader.isModLoaded("ChaoticBastion"))
{
System.out.println("[Natura] TConstruct, we're going to...");
System.out.println("[ChaoticBastion] All your base are belong to us!");
TConstruct.logger.info("[Natura] TConstruct, we're going to...");
TConstruct.logger.info("[ChaoticBastion] All your base are belong to us!");
}
else
System.out.println("[Natura] TConstruct, we're going to take over the world!");
TConstruct.logger.info("[Natura] TConstruct, we're going to take over the world!");
}
else
{
if (Loader.isModLoaded("ChaoticBastion"))
{
System.out.println("[TConstruct] Preparing to...");
System.out.println("[ChaoticBastion] I'MA FIRING MY LAZOR!");
TConstruct.logger.info("[TConstruct] Preparing to...");
TConstruct.logger.info("[ChaoticBastion] I'MA FIRING MY LAZOR!");
}
else
System.out.println("[TConstruct] Preparing to take over the world");
TConstruct.logger.info("[TConstruct] Preparing to take over the world");
}
}
+36
View File
@@ -0,0 +1,36 @@
package tconstruct.blocks;
import net.minecraft.block.BlockLadder;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.Icon;
public class StoneLadder extends BlockLadder {
// Override ladder material
public final Material blockMaterial = Material.rock;
private Icon icon;
// Use the normally protected constructor
public StoneLadder(int id)
{
super(id);
this.setUnlocalizedName("decoration.stoneladder");
this.setCreativeTab(CreativeTabs.tabDecorations);
}
@Override
public void registerIcons(IconRegister register)
{
icon = register.registerIcon("tinker:ladder_stone");
}
@Override
public Icon getIcon(int meta, int side)
{
return icon;
}
}
@@ -88,7 +88,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
ret = TConstruct.basinCasting.getCastingAmount(this.liquid, inv);
}
System.out.println("Ret: " + ret);
TConstruct.logger.info("Ret: " + ret);
return ret;
}
@@ -304,7 +304,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
{
if (castingDelay > 0)
{
//System.out.println("Casting");
//TConstruct.logger.info("Casting");
castingDelay--;
if (castingDelay == 0)
castLiquid();
@@ -121,7 +121,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
HashMap tankMap = this.getOutputs();
if (tankMap.size() <= 0)
{
//System.out.println("Nope, no connections to go to");
//TConstruct.logger.info("Nope, no connections to go to");
return;
}
boolean yFilled = false;
@@ -211,7 +211,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
HashMap tankMap = this.getOutputs();
if (tankMap.size() <= 0)
{
//System.out.println("Nope, no connections to go to");
//TConstruct.logger.info("Nope, no connections to go to");
return;
}
boolean yFilled = false;
@@ -88,7 +88,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
ret = TConstruct.tableCasting.getCastingAmount(this.liquid, inv);
}
System.out.println("Ret: " + ret);
TConstruct.logger.info("Ret: " + ret);
return ret;
}
@@ -304,7 +304,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
{
if (castingDelay > 0)
{
//System.out.println("Casting");
//TConstruct.logger.info("Casting");
castingDelay--;
if (castingDelay == 0)
castLiquid();
@@ -1,5 +1,6 @@
package tconstruct.blocks.logic;
import tconstruct.TConstruct;
import tconstruct.library.tools.AbilityHelper;
import tconstruct.library.util.IActiveLogic;
import tconstruct.library.util.IFacingLogic;
@@ -70,7 +71,7 @@ public class FirestarterLogic extends TileEntity implements IFacingLogic, IActiv
Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)];
if (active)
{
System.out.println("Setting fire");
TConstruct.logger.info("Setting fire");
if (block == null || block.isAirBlock(worldObj, xPos, yPos, zPos))
{
worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "fire.ignite", 1.0F, AbilityHelper.random.nextFloat() * 0.4F + 0.8F);
@@ -79,7 +80,7 @@ public class FirestarterLogic extends TileEntity implements IFacingLogic, IActiv
}
else
{
//System.out.println("Stopping fire "+putOut);
//TConstruct.logger.info("Stopping fire "+putOut);
if (block == Block.fire)
{
//worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "random.fizz", 1.0F, AbilityHelper.random.nextFloat() * 0.4F + 0.8F);
@@ -9,6 +9,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.src.ModLoader;
import net.minecraft.tileentity.TileEntity;
import tconstruct.TConstruct;
public class GolemPedestalLogic extends TileEntity implements IInventory
{
@@ -190,7 +191,7 @@ public class GolemPedestalLogic extends TileEntity implements IInventory
public boolean subtractSoul (int i)
{
System.out.println("SUBTRACT WHY");
TConstruct.logger.info("SUBTRACT WHY");
if (supply == null || supply.itemID >= 512 || cost[supply.itemID] == 0)
{
worldObj.playSoundAtEntity(ModLoader.getMinecraftInstance().thePlayer, "mob.blaze.death", 1.0F, 0.5F);
@@ -200,7 +201,7 @@ public class GolemPedestalLogic extends TileEntity implements IInventory
int j = cost[supply.itemID];
int k = souls[supply.itemID];
int l = (supply.stackSize / j) * k;
System.out.println((new StringBuilder()).append("Subtracting amt").append(i).append(" s").append(k).append(" c").append(j).append(" ss").append(supply.stackSize).append(" id")
TConstruct.logger.info((new StringBuilder()).append("Subtracting amt").append(i).append(" s").append(k).append(" c").append(j).append(" ss").append(supply.stackSize).append(" id")
.append(supply.itemID).append(" sa").append(l).append(" calc").append(Math.ceil((double) i / (double) k)).toString());
if (l < i)
{
@@ -1,5 +1,6 @@
package tconstruct.blocks.logic;
import tconstruct.TConstruct;
import tconstruct.library.crafting.AlloyMix;
import tconstruct.library.util.IFacingLogic;
import tconstruct.library.util.IMasterLogic;
@@ -28,7 +29,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
@Override
public boolean setPotentialMaster (IMasterLogic master, World world, int x, int y, int z)
{
System.out.println("Master: "+master);
TConstruct.logger.info("Master: "+master);
return (master instanceof AdaptiveSmelteryLogic || master instanceof SmelteryDrainLogic) && !hasMaster;
}
@@ -46,11 +47,11 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
@Override
public FluidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
{
System.out.println("Attempting drain "+hasValidMaster());
TConstruct.logger.info("Attempting drain " + hasValidMaster());
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
System.out.println("Found master");
TConstruct.logger.info("Found master");
return smeltery.drain(from, maxDrain, doDrain);
}
return null;
@@ -455,7 +455,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
return false;
currentLiquid += liquid.amount;
//System.out.println("Current liquid: "+currentLiquid);
//TConstruct.logger.info("Current liquid: "+currentLiquid);
boolean added = false;
for (int i = 0; i < moltenMetal.size(); i++)
{
@@ -585,11 +585,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
TileEntity newTankContainer = worldObj.getBlockTileEntity(possibleTank.x, possibleTank.y, possibleTank.z);
if (newTankContainer instanceof IFluidHandler)
{
//System.out.println("Tank: "+possibleTank.toString());
//TConstruct.logger.info("Tank: "+possibleTank.toString());
FluidStack newliquid = ((IFluidHandler) newTankContainer).drain(ForgeDirection.UNKNOWN, 150, false);
if (newliquid != null && newliquid.getFluid().getBlockID() == Block.lavaStill.blockID && newliquid.amount > 0)
{
//System.out.println("Tank: "+possibleTank.toString());
//TConstruct.logger.info("Tank: "+possibleTank.toString());
foundTank = true;
activeLavaTank = possibleTank;
iter = lavaTanks.size();
@@ -616,7 +616,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (iter >= lavaTanks.size())
foundTank = true;
}
//System.out.println("Searching for tank, size: "+lavaTanks.size());
//TConstruct.logger.info("Searching for tank, size: "+lavaTanks.size());
}
}
}
+2 -2
View File
@@ -44,11 +44,11 @@ public class TClientEvents
soundmanager.addSound("tinker:frypan_hit.ogg");
soundmanager.addSound("tinker:little_saw.ogg");
soundmanager.addSound("tinker:launcher_clank.ogg");
System.out.println("[TConstruct] Successfully loaded sounds.");
TConstruct.logger.info("Successfully loaded sounds.");
}
catch (Exception e)
{
System.err.println("[TConstruct] Failed to register one or more sounds");
TConstruct.logger.warning("Failed to register one or more sounds");
}
}
}
@@ -46,7 +46,7 @@ public class TClientTickHandler implements ITickHandler
//this.mc.renderEngine.bindTexture("/mods/tinker/textures/gui/newhearts.png");
int hp = MathHelper.ceiling_float_int(this.mc.thePlayer.getHealth());//(int) player.getEntityAttribute(SharedMonsterAttributes.field_111267_a).func_111125_b();//player.getHealth();
//System.out.println("hp: "+hp);
//TConstruct.logger.info("hp: "+hp);
for (int iter = 0; iter < hp / 20; iter++)
{
int renderHearts = (hp - 20*(iter+1)) / 2;
+1 -1
View File
@@ -37,7 +37,7 @@ public class TControls extends TKeyHandler
public TControls()
{
super(new KeyBinding[] { armorKey, refreshCapes }, new boolean[] { false, false }, getVanillaKeyBindings(), new boolean[] { false, false });
//System.out.println("Controls registered");
//TConstruct.logger.info("Controls registered");
}
private static KeyBinding[] getVanillaKeyBindings ()
+2 -1
View File
@@ -10,6 +10,7 @@ import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import tconstruct.TConstruct;
import tconstruct.library.tools.ToolCore;
public class ToolCoreRenderer implements IItemRenderer
@@ -27,7 +28,7 @@ public class ToolCoreRenderer implements IItemRenderer
case INVENTORY:
return true;
default:
System.out.println("[TCon] Unhandled render case!");
TConstruct.logger.warning("[TCon] Unhandled render case!");
case FIRST_PERSON_MAP:
return false;
}
@@ -158,7 +158,7 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
float liquidAmount = tile.liquid.amount / 288f * 0.125f;
renderer.setRenderBounds(0.375D, startY, 0.375D, 0.625D, 0.5 + liquidAmount, 0.625D); //Center
renderLiquidPart(world, x, y, z, block, renderer, tile);
//System.out.println(tile.recentlyFilledDelay);
//TConstruct.logger.info(tile.recentlyFilledDelay);
if (tile.hasTankConnected(ForgeDirection.NORTH))
{
@@ -18,7 +18,7 @@ public class CastingTableSpecialRenderer extends TileEntitySpecialRenderer
@Override
public void renderTileEntityAt (TileEntity logic, double var2, double var4, double var6, float var8)
{
//System.out.println("Render!!!");
//TConstruct.logger.info("Render!!!");
this.render((CastingTableLogic) logic, var2, var4, var6, var8);
}
@@ -23,7 +23,7 @@ public class DryingRackSpecialRender extends TileEntitySpecialRenderer
@Override
public void renderTileEntityAt (TileEntity logic, double var2, double var4, double var6, float var8)
{
//System.out.println("Render!!!");
//TConstruct.logger.info("Render!!!");
this.render((DryingRackLogic) logic, var2, var4, var6, var8);
}
@@ -56,7 +56,7 @@ public class RenderLandmine implements ISimpleBlockRenderingHandler
ForgeDirection dir = Helper.convertMetaToForgeOrientation(i1);
//System.out.println(i1 + " for " + dir);
//TConstruct.logger.info(i1 + " for " + dir);
switch (dir)
{
@@ -18,7 +18,7 @@ public class CraftingStationGui extends GuiContainer
/*public void onGuiClosed ()
{
System.out.println("Gui Closed");
TConstruct.logger.info("Gui Closed");
super.onGuiClosed();
}*/
+7 -3
View File
@@ -140,6 +140,7 @@ public class TContent implements IFuelHandler
//Decoration
public static Block stoneTorch;
public static Block stoneLadder;
public static Block multiBrick;
public static Block multiBrickFancy;
@@ -707,6 +708,8 @@ public class TContent implements IFuelHandler
//Decoration
stoneTorch = new StoneTorch(PHConstruct.stoneTorch).setUnlocalizedName("decoration.stonetorch");
GameRegistry.registerBlock(stoneTorch, "decoration.stonetorch");
stoneLadder = new StoneLadder(PHConstruct.stoneLadder).setUnlocalizedName("decoration.stoneladder");
GameRegistry.registerBlock(stoneLadder, "decoration.stoneladder");
multiBrick = new MultiBrick(PHConstruct.multiBrick).setUnlocalizedName("Decoration.Brick");
GameRegistry.registerBlock(multiBrick, MultiBrickItem.class, "decoration.multibrick");
@@ -1645,6 +1648,7 @@ public class TContent implements IFuelHandler
GameRegistry.addRecipe(new ItemStack(Block.pumpkinLantern, 1, 0), "p", "s", 'p', new ItemStack(Block.pumpkin), 'w', new ItemStack(stoneTorch));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(stoneTorch, 4), "p", "w", 'p', new ItemStack(Item.coal, 1, Short.MAX_VALUE), 'w', "stoneRod"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(stoneLadder, 3), "w w", "www", "w w", 'w', "stoneRod"));
GameRegistry.addRecipe(new ItemStack(toolRod, 4, 1), "c", "c", 'c', new ItemStack(Block.stone));
GameRegistry.addRecipe(new ItemStack(toolRod, 2, 1), "c", "c", 'c', new ItemStack(Block.cobblestone));
@@ -2064,7 +2068,7 @@ public class TContent implements IFuelHandler
Object obj = getStaticItem("itemResource", "thaumcraft.common.config.ConfigItems");
if (obj != null)
{
System.out.println("[TConstruct] Thaumcraft detected. Adding thaumium tools.");
TConstruct.logger.info("Thaumcraft detected. Adding thaumium tools.");
thaumcraftAvailable = true;
TConstructClientRegistry.addMaterialRenderMapping(31, "tinker", "thaumium", true);
TConstructRegistry.addToolMaterial(31, "Thaumium", 3, 400, 700, 2, 1.3F, 0, 0f, "\u00A75", "Thaumic");
@@ -2081,7 +2085,7 @@ public class TContent implements IFuelHandler
}
else
{
System.out.println("[TConstruct] Thaumcraft not detected.");
TConstruct.logger.warning("Thaumcraft not detected.");
}
if (Loader.isModLoaded("Natura"))
@@ -2191,7 +2195,7 @@ public class TContent implements IFuelHandler
}
catch (Exception e)
{
System.out.println("[TConstruct] Could not find " + name);
TConstruct.logger.warning("Could not find " + name);
return null;
}
}
+2 -1
View File
@@ -4,6 +4,7 @@ import java.util.EnumSet;
import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
import tconstruct.TConstruct;
public class TimeTicker implements ITickHandler
{
@@ -15,7 +16,7 @@ public class TimeTicker implements ITickHandler
@Override
public void tickStart (EnumSet<TickType> type, Object... tickData)
{
System.out.println("Tick");
TConstruct.logger.info("Tick");
time++;
tickParts = (int) (time % 20);
seconds = (int) (time / 20);
+1 -1
View File
@@ -469,7 +469,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
void moveTowardsEntity (Entity entity)
{
//System.out.println("Moving towards entity");
//TConstruct.logger.info("Moving towards entity");
/*double distX = this.posX - entity.posX;
double distZ = this.posZ - entity.posZ;
//posY = posY + 0.1;
@@ -22,7 +22,7 @@ public class DaggerEntity extends RotatingBase
public DaggerEntity(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
super(world, entityplayer, 0.75F, 0.8F);
//System.out.println("Stack: "+itemstack);
//TConstruct.logger.info("Stack: "+itemstack);
returnStackSlot = entityplayer.inventory.currentItem;
returnStack = itemstack;
}
@@ -55,7 +55,7 @@ public class AdaptiveSmelteryContainer extends ActiveContainer
if (invRow != slotRow)
{
slotRow = invRow;
//System.out.println(invRow);
//TConstruct.logger.info(invRow);
int basePos = invRow * 3;
for (int iter = 0; iter < activeInventorySlots.size(); iter++)
{
@@ -135,7 +135,7 @@ public class AdaptiveSmelteryContainer extends ActiveContainer
@Override
protected boolean mergeItemStack (ItemStack inputStack, int startSlot, int endSlot, boolean flag)
{
//System.out.println("Merge");
//TConstruct.logger.info("Merge");
boolean merged = false;
int slotPos = startSlot;
@@ -149,7 +149,7 @@ public class AdaptiveSmelteryContainer extends ActiveContainer
/*if (inputStack.isStackable() && startSlot >= logic.getSizeInventory())
{
System.out.println("Rawr!");
TConstruct.logger.info("Rawr!");
while (inputStack.stackSize > 0 && (!flag && slotPos < endSlot || flag && slotPos >= startSlot))
{
slot = (Slot) this.inventorySlots.get(slotPos);
@@ -49,7 +49,7 @@ public class SmelteryContainer extends ActiveContainer
if (invRow != slotRow)
{
slotRow = invRow;
//System.out.println(invRow);
//TConstruct.logger.info(invRow);
int basePos = invRow * 3;
for (int iter = 0; iter < activeInventorySlots.size(); iter++)
{
@@ -166,7 +166,7 @@ public class SmelteryContainer extends ActiveContainer
@Override
protected boolean mergeItemStack (ItemStack inputStack, int startSlot, int endSlot, boolean flag)
{
//System.out.println("Merge");
//TConstruct.logger.info("Merge");
boolean merged = false;
int slotPos = startSlot;
@@ -180,7 +180,7 @@ public class SmelteryContainer extends ActiveContainer
/*if (inputStack.isStackable() && startSlot >= logic.getSizeInventory())
{
System.out.println("Rawr!");
TConstruct.logger.info("Rawr!");
while (inputStack.stackSize > 0 && (!flag && slotPos < endSlot || flag && slotPos >= startSlot))
{
slot = (Slot) this.inventorySlots.get(slotPos);
@@ -231,7 +231,7 @@ public class ToolStationContainer extends ActiveContainer
}
/*boolean emptySlots = ( ((Slot) inventorySlots.get(2)).getStack() == null && ((Slot) inventorySlots.get(3)).getStack() == null );
System.out.println("Empty slots");
TConstruct.logger.info("Empty slots");
if (!failedToMerge && emptySlots)
player.worldObj.playAuxSFX(1021, (int)player.posX, (int)player.posY, (int)player.posZ, 0);*/
+7 -6
View File
@@ -2,6 +2,7 @@ package tconstruct.items.tools;
import java.util.List;
import tconstruct.TConstruct;
import tconstruct.common.TContent;
import tconstruct.library.crafting.ToolBuilder;
import tconstruct.library.tools.ToolCore;
@@ -104,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)
{
System.out.println("Creative builder failed tool for Vanilla style" + this.getToolName());
System.out.println("Make sure you do not have item ID conflicts");
TConstruct.logger.warning("Creative builder failed tool for Vanilla style" + this.getToolName());
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
}
else
{
@@ -124,8 +125,8 @@ public class Arrow extends ToolCore
if (tool == null)
{
System.out.println("Creative builder failed tool for Vanilla style" + this.getToolName());
System.out.println("Make sure you do not have item ID conflicts");
TConstruct.logger.warning("Creative builder failed tool for Vanilla style" + this.getToolName());
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
}
else
{
@@ -146,8 +147,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)
{
System.out.println("Creative builder failed tool for " + name + this.getToolName());
System.out.println("Make sure you do not have item ID conflicts");
TConstruct.logger.warning("Creative builder failed tool for " + name + this.getToolName());
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
}
else
{
+3 -2
View File
@@ -5,6 +5,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import tconstruct.TConstruct;
import tconstruct.common.TContent;
import tconstruct.entity.projectile.ArrowEntity;
import tconstruct.library.crafting.ToolBuilder;
@@ -770,8 +771,8 @@ public abstract class BowBase extends ToolCore
ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, id), new ItemStack(getHandleItem(), 1, 0), accessoryStack, extraStack, name + getToolName());
if (tool == null)
{
System.out.println("Creative builder failed tool for " + name + this.getToolName());
System.out.println("Make sure you do not have item ID conflicts");
TConstruct.logger.warning("Creative builder failed tool for " + name + this.getToolName());
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
}
else
{
+3 -2
View File
@@ -8,6 +8,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import tconstruct.TConstruct;
import tconstruct.common.TContent;
import tconstruct.library.crafting.ToolBuilder;
import tconstruct.library.tools.AbilityHelper;
@@ -119,8 +120,8 @@ public class Mattock extends DualHarvestTool
ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, id), new ItemStack(getHandleItem(), 1, id), accessoryStack, extraStack, name + getToolName());
if (tool == null)
{
System.out.println("Creative builder failed tool for " + name + this.getToolName());
System.out.println("Make sure you do not have item ID conflicts");
TConstruct.logger.warning("Creative builder failed tool for " + name + this.getToolName());
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
}
else
{
+11 -8
View File
@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.logging.Logger;
import tconstruct.library.crafting.Detailing;
import tconstruct.library.crafting.LiquidCasting;
@@ -31,6 +32,8 @@ public class TConstructRegistry
{
public static TConstructRegistry instance = new TConstructRegistry();
public static Logger logger = Logger.getLogger("TCon-API");
/* Creative tabs */
public static TabTools toolTab;
public static TabTools materialTab;
@@ -67,7 +70,7 @@ public class TConstructRegistry
{
Item add = itemDirectory.get(name);
if (add != null)
System.out.println("[TCon API] " + name + " is already present in the Item directory");
logger.warning(name + " is already present in the Item directory");
itemDirectory.put(name, itemstack);
}
@@ -82,7 +85,7 @@ public class TConstructRegistry
{
Item ret = itemDirectory.get(name);
if (ret == null)
System.out.println("[TCon API] Could not find " + name + " in the Item directory");
logger.warning("Could not find " + name + " in the Item directory");
return ret;
}
@@ -113,7 +116,7 @@ public class TConstructRegistry
{
ItemStack add = itemstackDirectory.get(name);
if (add != null)
System.out.println("[TCon API] " + name + " is already present in the ItemStack directory");
logger.warning(name + " is already present in the ItemStack directory");
itemstackDirectory.put(name, itemstack);
}
@@ -128,7 +131,7 @@ public class TConstructRegistry
{
ItemStack ret = itemstackDirectory.get(name);
if (ret == null)
System.out.println("[TCon API] Could not find " + name + " in the ItemStack directory");
logger.warning("Could not find " + name + " in the ItemStack directory");
return ret;
}
@@ -197,7 +200,7 @@ public class TConstructRegistry
{
ToolBuilder tb = ToolBuilder.instance;
if (parts.length < 1 || parts.length > 4 || parts.length == 3)
System.out.println("[TCon API] Wrong amount of items to craft into a tool");
logger.warning("Wrong amount of items to craft into a tool");
tb.addToolRecipe(output, parts);
}
@@ -446,7 +449,7 @@ public class TConstructRegistry
}
catch (Exception e)
{
System.out.println("[TCon API] Could not find casting table recipes.");
logger.warning("Could not find casting table recipes.");
return null;
}
}
@@ -467,7 +470,7 @@ public class TConstructRegistry
}
catch (Exception e)
{
System.out.println("[TCon API] Could not find casting basin recipes.");
logger.warning("Could not find casting basin recipes.");
return null;
}
}
@@ -488,7 +491,7 @@ public class TConstructRegistry
}
catch (Exception e)
{
System.out.println("[TCon API] Could not find chisel detailing recipes.");
logger.warning("Could not find chisel detailing recipes.");
return null;
}
}
@@ -10,6 +10,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagIntArray;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import tconstruct.TConstruct;
import tconstruct.common.TContent;
import tconstruct.library.util.CoordTuple;
import tconstruct.library.util.CoordTupleSort;
@@ -108,7 +109,7 @@ public class TankLayerScan extends LogicComponent
break;
}
if (!world.isRemote && debug)
System.out.println("Bricks in recursion: " + blockCoords.size());
TConstruct.logger.info("Bricks in recursion: " + blockCoords.size());
blockCoords.clear();
bricks = 0;
@@ -116,8 +117,8 @@ public class TankLayerScan extends LogicComponent
boolean sealed = floodTest(master.xCoord + xPos, master.yCoord, master.zCoord + zPos);
if (!world.isRemote && debug)
{
System.out.println("Air in ring: " + airBlocks);
System.out.println("Bricks in ring: " + bricks);
TConstruct.logger.info("Air in ring: " + airBlocks);
TConstruct.logger.info("Bricks in ring: " + bricks);
}
if (sealed)
@@ -135,8 +136,8 @@ public class TankLayerScan extends LogicComponent
if (!world.isRemote && debug)
{
System.out.println("Air in structure: " + airCoords.size());
System.out.println("Bricks in structure: " + blockCoords.size());
TConstruct.logger.info("Air in structure: " + airCoords.size());
TConstruct.logger.info("Bricks in structure: " + blockCoords.size());
}
}
}
@@ -40,7 +40,7 @@ public class ShapelessToolRecipe extends ShapelessRecipes
{
ItemStack itemstack1 = (ItemStack) iterator.next();
//System.out.println("Rawr! "+itemstack1.getItemDamage());
//TConstruct.logger.info("Rawr! "+itemstack1.getItemDamage());
if (itemstack.itemID == itemstack1.itemID && (itemstack1.getItemDamage() == Short.MAX_VALUE || itemstack.getItemDamage() == itemstack1.getItemDamage()))
{
if (itemstack.getItem() instanceof ToolCore)
@@ -196,7 +196,7 @@ public class ToolBuilder
}
}
//System.out.println("Valid: "+item);
//TConstruct.logger.info("Valid: "+item);
if (item == null)
return null;
+3 -2
View File
@@ -24,6 +24,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import tconstruct.TConstruct;
import tconstruct.library.ActiveToolMod;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.crafting.ToolBuilder;
@@ -537,8 +538,8 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, id), new ItemStack(getHandleItem(), 1, id), accessoryStack, extraStack, name + getToolName());
if (tool == null)
{
System.out.println("Creative builder failed tool for " + name + this.getToolName());
System.out.println("Make sure you do not have item ID conflicts");
TConstruct.logger.warning("Creative builder failed tool for " + name + this.getToolName());
TConstruct.logger.warning("Make sure you do not have item ID conflicts");
}
else
{
+1 -1
View File
@@ -31,7 +31,7 @@ public class ModBoolean extends ToolMod
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
tags.setBoolean(key, true);
//System.out.println("Key: "+key+" "+tags.getBoolean(key));
//TConstruct.logger.info("Key: "+key+" "+tags.getBoolean(key));
int modifiers = tags.getInteger("Modifiers");
modifiers -= 1;
+1 -1
View File
@@ -60,7 +60,7 @@ public class ModRepair extends ToolMod
materialValue = PatternBuilder.instance.getPartValue(input[1]);
int increase = (int) (50 + (dur * 0.4f * materialValue));
//System.out.println("Increase: "+increase);
//TConstruct.logger.info("Increase: "+increase);
int modifiers = tags.getInteger("Modifiers");
float mods = 1.0f;
+1 -1
View File
@@ -438,7 +438,7 @@ public class TEventHandler
{
if (event.entity instanceof EntityXPOrb)
{
System.out.println("Entity: " + event.entity);
TConstruct.logger.info("Entity: " + event.entity);
}
}*/
+2 -1
View File
@@ -3,6 +3,7 @@ package tconstruct.util.config;
import java.io.File;
import java.io.IOException;
import net.minecraftforge.common.Configuration;
import tconstruct.TConstruct;
public class BOPConfig
{
@@ -25,7 +26,7 @@ public class BOPConfig
config.load();
promisedLandDimensionID = config.get("dimension settings", "Promised Land Dimension ID", -200).getInt();
System.out.println("[TConstruct]PL Dim ID: " + promisedLandDimensionID);
TConstruct.logger.info("PL Dim ID: " + promisedLandDimensionID);
}
else
{
@@ -42,7 +42,7 @@ public class DimensionBlacklist
{
if (blacklist.get(len) == dim)
return false;
//System.out.println("[TConstruct]diminblist +" + blacklist.get(len));
//TConstruct.logger.info("diminblist +" + blacklist.get(len));
}
return true;
@@ -53,7 +53,7 @@ public class DimensionBlacklist
for (int len = 0; len < nopool.size(); len++)
{
if (nopool.get(len) == dim)
//System.out.println("[TConstruct]DimNoPool "+ nopool.get(len));
//TConstruct.logger.info("DimNoPool "+ nopool.get(len));
return true;
}
return false;
+5 -2
View File
@@ -5,6 +5,7 @@ import java.io.IOException;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.Property;
import tconstruct.TConstruct;
import tconstruct.library.tools.AbilityHelper;
public class PHConstruct
@@ -29,8 +30,8 @@ public class PHConstruct
}
catch (IOException e)
{
System.out.println("Could not create configuration file for TConstruct. Reason:");
System.out.println(e);
TConstruct.logger.severe("Could not create configuration file for TConstruct. Reason:");
TConstruct.logger.severe(e.getLocalizedMessage());
}
/* [Forge] Configuration class, used as config method */
@@ -88,6 +89,7 @@ public class PHConstruct
multiBrick = config.getBlock("Multi Brick", 1481).getInt(1481);
stoneTorch = config.getBlock("Stone Torch", 1484).getInt(1484);
stoneLadder = config.getBlock("Stone Ladder", 1479).getInt(1479);
oreBerry = config.getBlock("Ore Berry One", 1485).getInt(1485);
oreBerrySecond = config.getBlock("Ore Berry Two", 1486).getInt(1486);
@@ -473,6 +475,7 @@ public class PHConstruct
//Decoration
public static int stoneTorch;
public static int stoneLadder;
public static int multiBrick;
public static int multiBrickFancy;
public static int redstoneBallRepeater;
@@ -3,6 +3,7 @@ package tconstruct.util.config;
import java.io.File;
import java.io.IOException;
import net.minecraftforge.common.Configuration;
import tconstruct.TConstruct;
public class TwilightForestConfig
{
@@ -16,7 +17,7 @@ public class TwilightForestConfig
config.load();
twilightForestDimensionID = config.get("dimension", "dimensionID", -100).getInt();
System.out.println("[TConstruct]TF Dim ID: " + twilightForestDimensionID);
TConstruct.logger.info("TF Dim ID: " + twilightForestDimensionID);
}
else
{
@@ -55,9 +55,8 @@ public class TPacketHandler implements IPacketHandler
}
catch (Exception e)
{
System.out.println("Failed at reading client packet for TConstruct.");
TConstruct.logger.warning("Failed at reading client packet for TConstruct.");
e.printStackTrace();
return;
}
}
@@ -187,9 +186,8 @@ public class TPacketHandler implements IPacketHandler
}
catch (IOException e)
{
System.out.println("Failed at reading server packet for TConstruct.");
TConstruct.logger.warning("Failed at reading server packet for TConstruct.");
e.printStackTrace();
return;
}
}
@@ -50,7 +50,7 @@ public class ArmorExtended implements IInventory
{
if (inventory[slot] != null)
{
//System.out.println("Took something from slot " + slot);
//TConstruct.logger.info("Took something from slot " + slot);
if (inventory[slot].stackSize <= quantity)
{
ItemStack stack = inventory[slot];
@@ -83,7 +83,7 @@ public class ArmorExtended implements IInventory
public void setInventorySlotContents (int slot, ItemStack itemstack)
{
inventory[slot] = itemstack;
//System.out.println("Changed slot " + slot + " on side " + FMLCommonHandler.instance().getEffectiveSide());
//TConstruct.logger.info("Changed slot " + slot + " on side " + FMLCommonHandler.instance().getEffectiveSide());
if (itemstack != null && itemstack.stackSize > getInventoryStackLimit())
{
itemstack.stackSize = getInventoryStackLimit();
@@ -159,7 +159,7 @@ public class ArmorExtended implements IInventory
{
ItemStack stack = inventory[6];
int meta = stack.getItemDamage();
//System.out.println("Calculating HP on side " + FMLCommonHandler.instance().getEffectiveSide());
//TConstruct.logger.info("Calculating HP on side " + FMLCommonHandler.instance().getEffectiveSide());
if (meta == 2)
{
int prevHealth = stats.bonusHealth;
@@ -173,7 +173,7 @@ public class ArmorExtended implements IInventory
stats.bonusHealth = bonusHP;
int healthChange = bonusHP - prevHealth;
//System.out.println("healthChange: "+healthChange+" on side "+FMLCommonHandler.instance().getEffectiveSide());
//TConstruct.logger.info("healthChange: "+healthChange+" on side "+FMLCommonHandler.instance().getEffectiveSide());
if (healthChange != 0)
{
AttributeInstance attributeinstance = player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.maxHealth);
@@ -4,7 +4,7 @@ public class ArmorExtendedClient extends ArmorExtended
{
/*public void recalculateSkills(EntityPlayer player, TPlayerStats stats)
{
System.out.println("Client skills");
TConstruct.logger.info("Client skills");
if (inventory[1] != null && inventory[1].getItem() == TContent.glove)
{
if (TProxyClient.skillList.size() < 1)
@@ -33,7 +33,7 @@ public class TPlayerHandler implements IPlayerTracker
@Override
public void onPlayerLogin (EntityPlayer entityplayer)
{
//System.out.println("Player: "+entityplayer);
//TConstruct.logger.info("Player: "+entityplayer);
//Lookup player
NBTTagCompound tags = entityplayer.getEntityData();
if (!tags.hasKey("TConstruct"))
@@ -189,7 +189,7 @@ public class TPlayerHandler implements IPlayerTracker
stats.prevOnGround = player.onGround;
//if ()
//System.out.println("Fall: "+player.fallDistance);
//TConstruct.logger.info("Fall: "+player.fallDistance);
}
}
}*/
@@ -211,7 +211,7 @@ public class TPlayerHandler implements IPlayerTracker
public TPlayerStats getPlayerStats (String username)
{
TPlayerStats stats = playerStats.get(username);
//System.out.println("Stats: "+stats);
//TConstruct.logger.info("Stats: "+stats);
if (stats == null)
{
stats = new TPlayerStats();
@@ -243,7 +243,7 @@ public class TPlayerHandler implements IPlayerTracker
public static void setEntitySize (float width, float height, Entity entity)
{
//System.out.println("Size: " + height);
//TConstruct.logger.info("Size: " + height);
if (width != entity.width || height != entity.height)
{
entity.width = width;
@@ -117,7 +117,7 @@ public class TBaseWorldGenerator implements IWorldGenerator
if (yPos != -1)
{
/*CoordTuple coord = new CoordTuple(xPos, yPos, zPos);
System.out.println("Iron: "+coord.toString());*/
TConstruct.logger.info("Iron: "+coord.toString());*/
ironBush.generate(world, random, xPos, yPos, zPos);
}
}
@@ -133,7 +133,7 @@ public class TBaseWorldGenerator implements IWorldGenerator
if (yPos != -1)
{
/*CoordTuple coord = new CoordTuple(xPos, yPos, zPos);
System.out.println("Gold: "+coord.toString());*/
TConstruct.logger.info("Gold: "+coord.toString());*/
goldBush.generate(world, random, xPos, yPos, zPos);
}
}
@@ -149,7 +149,7 @@ public class TBaseWorldGenerator implements IWorldGenerator
if (yPos != -1)
{
/*CoordTuple coord = new CoordTuple(xPos, yPos, zPos);
System.out.println("Copper: "+coord.toString());*/
TConstruct.logger.info("Copper: "+coord.toString());*/
copperBush.generate(world, random, xPos, yPos, zPos);
}
}
@@ -165,7 +165,7 @@ public class TBaseWorldGenerator implements IWorldGenerator
if (yPos != -1)
{
/*CoordTuple coord = new CoordTuple(xPos, yPos, zPos);
System.out.println("Tin: "+coord.toString());*/
TConstruct.logger.info("Tin: "+coord.toString());*/
tinBush.generate(world, random, xPos, yPos, zPos);
}
}
@@ -181,7 +181,7 @@ public class TBaseWorldGenerator implements IWorldGenerator
if (yPos != -1)
{
/*CoordTuple coord = new CoordTuple(xPos, yPos, zPos);
System.out.println("Aluminum: "+coord.toString());*/
TConstruct.logger.info("Aluminum: "+coord.toString());*/
aluminumBush.generate(world, random, xPos, yPos, zPos);
}
}
@@ -197,7 +197,7 @@ public class TBaseWorldGenerator implements IWorldGenerator
if (yPos != -1)
{
/*CoordTuple coord = new CoordTuple(xPos, yPos, zPos);
System.out.println("Silver: "+coord.toString());*/
TConstruct.logger.info("Silver: "+coord.toString());*/
silverBush.generate(world, random, xPos, yPos, zPos);
}
}
@@ -3,6 +3,7 @@ package tconstruct.worldgen.village;
import java.util.List;
import java.util.Random;
import tconstruct.TConstruct;
import tconstruct.common.TContent;
import net.minecraft.block.Block;
@@ -91,7 +92,7 @@ public class ComponentSmeltery extends ComponentVillage
int remapDirection (int direction)
{
System.out.println("Direction: " + direction);
TConstruct.logger.info("Direction: " + direction);
switch (direction)
{
case 0:
@@ -103,7 +104,7 @@ public class ComponentSmeltery extends ComponentVillage
case 3:
return 0;
}
System.out.println("This shouldn't happen");
TConstruct.logger.severe("This shouldn't happen (remapDirection in tconstruct.worldgen.village.ComponentSmeltery)");
return -1;
}