mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-27 23:45:48 +00:00
fix merge conflicts
This commit is contained in:
commit
bfd999f05a
7 files changed
+91
-63
No files matched your search
@@ -43,7 +43,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
* @dependencies: IC2 API, MFR API
|
||||
*/
|
||||
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.6.2_1.4.5d4", dependencies = "required-after:Forge@[7.7.1.687,)")
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.6.2_1.4.5", dependencies = "required-after:Forge@[7.7.1.687,)")
|
||||
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = tconstruct.util.network.TPacketHandler.class)
|
||||
public class TConstruct
|
||||
{
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
package tconstruct.blocks.logic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.inventory.SmelteryContainer;
|
||||
import tconstruct.library.blocks.InventoryLogic;
|
||||
import tconstruct.library.crafting.Smeltery;
|
||||
import tconstruct.library.util.CoordTuple;
|
||||
import tconstruct.library.util.IActiveLogic;
|
||||
import tconstruct.library.util.IFacingLogic;
|
||||
import tconstruct.library.util.IMasterLogic;
|
||||
import tconstruct.util.SmelteryDamageSource;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
@@ -38,6 +25,20 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.inventory.SmelteryContainer;
|
||||
import tconstruct.library.blocks.InventoryLogic;
|
||||
import tconstruct.library.crafting.Smeltery;
|
||||
import tconstruct.library.util.CoordTuple;
|
||||
import tconstruct.library.util.IActiveLogic;
|
||||
import tconstruct.library.util.IFacingLogic;
|
||||
import tconstruct.library.util.IMasterLogic;
|
||||
import tconstruct.util.PHConstruct;
|
||||
import tconstruct.util.SmelteryDamageSource;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/* Simple class for storing items in the block
|
||||
*/
|
||||
@@ -341,39 +342,48 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
}*/
|
||||
}
|
||||
}
|
||||
/*boolean itemAdded = false;
|
||||
if (o instanceof EntityItem)
|
||||
else if (PHConstruct.throwableSmeltery && o instanceof EntityItem)
|
||||
{
|
||||
EntityItem item = (EntityItem) o;
|
||||
item.age = 0;
|
||||
int position = 0;
|
||||
boolean canContinue = true;
|
||||
do
|
||||
{
|
||||
if (inventory[position] == null)
|
||||
{
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if (stack.stackSize > 0)
|
||||
{
|
||||
itemAdded = true;
|
||||
this.setInventorySlotContents(position, stack.copy());
|
||||
stack.stackSize--;
|
||||
this.onInventoryChanged();
|
||||
//worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
if (stack.stackSize < 1)
|
||||
{
|
||||
canContinue = false;
|
||||
item.attackEntityFrom(DamageSource.magic, 1000);
|
||||
}
|
||||
}
|
||||
position++;
|
||||
if (position == inventory.length)
|
||||
canContinue = false;
|
||||
} while (canContinue);
|
||||
handleItemEntity((EntityItem) o);
|
||||
}
|
||||
if (itemAdded)
|
||||
this.needsUpdate = true;*/
|
||||
}
|
||||
}
|
||||
|
||||
private void handleItemEntity(EntityItem item)
|
||||
{
|
||||
// Clients like to play merry hell with this and cause breakage (we update their inv on syncs)
|
||||
if (worldObj.isRemote) return;
|
||||
|
||||
item.age = 0;
|
||||
ItemStack istack = item.getEntityItem();
|
||||
if (istack.stackSize <= 0) return;
|
||||
|
||||
int maxSlot = this.getSizeInventory();
|
||||
boolean itemDestroyed = false;
|
||||
boolean itemAdded = false;
|
||||
|
||||
for (int i = 0; i < maxSlot; i++)
|
||||
{
|
||||
ItemStack stack = this.getStackInSlot(i);
|
||||
if (stack == null && istack.stackSize > 0)
|
||||
{
|
||||
this.setInventorySlotContents(i, new ItemStack(istack.getItem(), 1));
|
||||
istack.stackSize -= 1;
|
||||
itemAdded = true;
|
||||
if (istack.stackSize <= 0)
|
||||
{
|
||||
item.setDead();
|
||||
itemDestroyed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!itemDestroyed)
|
||||
item.setEntityItemStack(istack);
|
||||
if (itemAdded) {
|
||||
this.needsUpdate = true;
|
||||
PacketDispatcher.sendPacketToAllInDimension(getDescriptionPacket(), worldObj.provider.dimensionId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -626,6 +636,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
public void onInventoryChanged ()
|
||||
{
|
||||
updateTemperatures();
|
||||
updateEntity();
|
||||
super.onInventoryChanged();
|
||||
needsUpdate = true;
|
||||
//worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
@@ -1076,6 +1087,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readFromNBT(packet.data);
|
||||
onInventoryChanged();
|
||||
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
this.needsUpdate = true;
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.LiquidMetalFinite;
|
||||
import tconstruct.blocks.slime.SlimeFluid;
|
||||
import tconstruct.client.armor.WingModel;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.util.player.TPlayerStats;
|
||||
@@ -67,16 +68,13 @@ public class TClientEvents
|
||||
{
|
||||
for (int i = 0; i < TContent.fluids.length; i++)
|
||||
{
|
||||
if (TContent.fluidBlocks[i] instanceof LiquidMetalFinite)
|
||||
{
|
||||
LiquidMetalFinite block = (LiquidMetalFinite) TContent.fluidBlocks[i];
|
||||
TContent.fluids[i].setIcons(block.stillIcon, block.flowIcon);
|
||||
}
|
||||
Fluid lava = FluidRegistry.getFluid("lava");
|
||||
lava.setIcons(Block.lavaStill.getIcon(0, 0), Block.lavaStill.getIcon(2, 0));
|
||||
Fluid lavawater = FluidRegistry.getFluid("water");
|
||||
lava.setIcons(Block.waterStill.getIcon(0, 0), Block.waterStill.getIcon(2, 0));
|
||||
TContent.fluids[i].setIcons(TContent.fluidBlocks[i].getIcon(0, 0), TContent.fluidBlocks[i].getIcon(2, 0));
|
||||
}
|
||||
|
||||
Fluid lava = FluidRegistry.getFluid("lava");
|
||||
lava.setIcons(Block.lavaStill.getIcon(0, 0), Block.lavaStill.getIcon(2, 0));
|
||||
Fluid lavawater = FluidRegistry.getFluid("water");
|
||||
lava.setIcons(Block.waterStill.getIcon(0, 0), Block.waterStill.getIcon(2, 0));
|
||||
}
|
||||
|
||||
private static final ResourceLocation hearts = new ResourceLocation("tinker", "textures/gui/newhearts.png");
|
||||
|
||||
@@ -43,7 +43,7 @@ public class FryingPan extends Weapon
|
||||
{
|
||||
if (mob.canAttackWithItem() && !mob.hitByEntity(player) && mob.hurtResistantTime < 14)
|
||||
AbilityHelper.onLeftClickEntity(stack, player, mob, this);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -405,11 +405,6 @@ public class Hammer extends HarvestTool
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean willAllowShield() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOffhandHandDualWeapon() {
|
||||
return false;
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.tools;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import tconstruct.library.tools.HarvestTool;
|
||||
import tconstruct.util.PHConstruct;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -107,6 +108,6 @@ public class Hatchet extends HarvestTool
|
||||
|
||||
@Override
|
||||
public boolean isOffhandHandDualWeapon() {
|
||||
return false;
|
||||
return PHConstruct.isHatchetWeapon;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
package tconstruct.util;
|
||||
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
<<<<<<< HEAD
|
||||
import net.minecraftforge.common.*;
|
||||
=======
|
||||
>>>>>>> e3b92c88575c45d0b03c70a15a22327a4517537b
|
||||
|
||||
public class PHConstruct
|
||||
{
|
||||
@@ -45,7 +51,7 @@ public class PHConstruct
|
||||
beginnerBook = config.get("Difficulty Changes", "Spawn beginner book", true).getBoolean(true);
|
||||
alphaRegen = config.get("Alpha Behavior", "Regenerate HP from food", false).getBoolean(false);
|
||||
alphaHunger = config.get("Alpha Behavior", "Remove hunger", false).getBoolean(false);
|
||||
|
||||
|
||||
superfunWorld = config.get("Superfun", "All the world is Superfun", false).getBoolean(false);
|
||||
|
||||
enableTWood = config.get("Difficulty Changes", "Enable mod wooden tools", true).getBoolean(true);
|
||||
@@ -359,9 +365,17 @@ public class PHConstruct
|
||||
//dimension blacklist
|
||||
cfgDimBlackList = config.get("DimBlackList", "SlimeIslandDimBlacklist",new int[]{}).getIntList();
|
||||
slimeIslGenDim0Only = config.get("DimBlackList","GenerateSlimeIslandInDim0Only" , false).getBoolean(false);
|
||||
<<<<<<< HEAD
|
||||
slimeIslGenDim0 = config.get("DimBlackList", "slimeIslGenDim0", true).getBoolean(true);
|
||||
=======
|
||||
|
||||
//Experimental functionality
|
||||
throwableSmeltery = config.get("Experimental", "Items can be thrown into smelteries", true).getBoolean(true);
|
||||
|
||||
>>>>>>> e3b92c88575c45d0b03c70a15a22327a4517537b
|
||||
//Addon stuff
|
||||
isCleaverTwoHanded = config.get("Battlegear", "Can Cleavers have shields", true).getBoolean(true);
|
||||
isHatchetWeapon = config.get("Battlegear", "Are Hatches also weapons", true).getBoolean(true);
|
||||
|
||||
/* Save the configuration file */
|
||||
config.save();
|
||||
@@ -683,8 +697,15 @@ public class PHConstruct
|
||||
//dimensionblacklist
|
||||
public static boolean slimeIslGenDim0Only;
|
||||
public static int[] cfgDimBlackList;
|
||||
<<<<<<< HEAD
|
||||
public static boolean slimeIslGenDim0;
|
||||
=======
|
||||
|
||||
//Experimental functionality
|
||||
public static boolean throwableSmeltery;
|
||||
>>>>>>> e3b92c88575c45d0b03c70a15a22327a4517537b
|
||||
|
||||
//Addon stuff
|
||||
public static boolean isCleaverTwoHanded;
|
||||
public static boolean isHatchetWeapon;
|
||||
}
|
||||
Reference in new issue
Block a user