mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-18 19:39:12 +00:00
Add some changes
This commit is contained in:
1 parent
da42896f1d
commit
89ee0077be
13 files changed
+131
-19
No files matched your search
@@ -97,11 +97,22 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent
|
||||
{
|
||||
return i != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize (int slot, int quantity)
|
||||
{
|
||||
if (slot == 0)
|
||||
{
|
||||
for (int i = 1; i < getSizeInventory(); i++)
|
||||
decrStackSize(i, 1);
|
||||
}
|
||||
return super.decrStackSize(slot, quantity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem (int i, ItemStack itemstack, int j)
|
||||
{
|
||||
return true;
|
||||
return i == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -656,14 +656,17 @@ public class TRecipes
|
||||
ItemStack exoChestStack = new ItemStack(TRepo.exoChest);
|
||||
ItemStack exoPantsStack = new ItemStack(TRepo.exoPants);
|
||||
ItemStack exoShoesStack = new ItemStack(TRepo.exoShoes);
|
||||
ToolBuilder.instance.addArmorTag(exoGoggleStack);
|
||||
ToolBuilder.instance.addArmorTag(exoChestStack);
|
||||
ToolBuilder.instance.addArmorTag(exoPantsStack);
|
||||
ToolBuilder.instance.addArmorTag(exoShoesStack);
|
||||
GameRegistry.addShapedRecipe(exoGoggleStack, helm, 'w', new ItemStack(TRepo.largePlate, 1, 14));
|
||||
GameRegistry.addShapedRecipe(exoChestStack, chest, 'w', new ItemStack(TRepo.largePlate, 1, 14));
|
||||
GameRegistry.addShapedRecipe(exoPantsStack, pants, 'w', new ItemStack(TRepo.largePlate, 1, 14));
|
||||
GameRegistry.addShapedRecipe(exoShoesStack, shoes, 'w', new ItemStack(TRepo.largePlate, 1, 14));
|
||||
if (!PHConstruct.exoCraftingEnabled)
|
||||
{
|
||||
ToolBuilder.instance.addArmorTag(exoGoggleStack);
|
||||
ToolBuilder.instance.addArmorTag(exoChestStack);
|
||||
ToolBuilder.instance.addArmorTag(exoPantsStack);
|
||||
ToolBuilder.instance.addArmorTag(exoShoesStack);
|
||||
GameRegistry.addShapedRecipe(exoGoggleStack, helm, 'w', new ItemStack(TRepo.largePlate, 1, 14));
|
||||
GameRegistry.addShapedRecipe(exoChestStack, chest, 'w', new ItemStack(TRepo.largePlate, 1, 14));
|
||||
GameRegistry.addShapedRecipe(exoPantsStack, pants, 'w', new ItemStack(TRepo.largePlate, 1, 14));
|
||||
GameRegistry.addShapedRecipe(exoShoesStack, shoes, 'w', new ItemStack(TRepo.largePlate, 1, 14));
|
||||
}
|
||||
|
||||
// Metal conversion Recipes
|
||||
GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 3), patBlock, '#', new ItemStack(TRepo.materials, 1, 9)); // Copper
|
||||
@@ -1198,6 +1201,39 @@ public class TRecipes
|
||||
RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_hoe));
|
||||
RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_sword));
|
||||
}
|
||||
|
||||
if (PHConstruct.labotimizeVanillaTools)
|
||||
{
|
||||
Items.wooden_pickaxe.setMaxDamage(1);
|
||||
Items.wooden_axe.setMaxDamage(1);
|
||||
Items.wooden_shovel.setMaxDamage(1);
|
||||
Items.wooden_hoe.setMaxDamage(1);
|
||||
Items.wooden_sword.setMaxDamage(1);
|
||||
|
||||
Items.stone_pickaxe.setMaxDamage(1);
|
||||
Items.stone_axe.setMaxDamage(1);
|
||||
Items.stone_shovel.setMaxDamage(1);
|
||||
Items.stone_hoe.setMaxDamage(1);
|
||||
Items.stone_sword.setMaxDamage(1);
|
||||
|
||||
Items.iron_pickaxe.setMaxDamage(1);
|
||||
Items.iron_axe.setMaxDamage(1);
|
||||
Items.iron_shovel.setMaxDamage(1);
|
||||
Items.iron_hoe.setMaxDamage(1);
|
||||
Items.iron_sword.setMaxDamage(1);
|
||||
|
||||
Items.diamond_pickaxe.setMaxDamage(1);
|
||||
Items.diamond_axe.setMaxDamage(1);
|
||||
Items.diamond_shovel.setMaxDamage(1);
|
||||
Items.diamond_hoe.setMaxDamage(1);
|
||||
Items.diamond_sword.setMaxDamage(1);
|
||||
|
||||
Items.golden_pickaxe.setMaxDamage(1);
|
||||
Items.golden_axe.setMaxDamage(1);
|
||||
Items.golden_shovel.setMaxDamage(1);
|
||||
Items.golden_hoe.setMaxDamage(1);
|
||||
Items.golden_sword.setMaxDamage(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,14 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.blocks.logic.TileEntityLandmine;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -60,6 +62,9 @@ public class ContainerLandmine extends Container
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer entityplayer)
|
||||
{
|
||||
Block block = te.getWorldObj().getBlock(te.xCoord, te.yCoord, te.zCoord);
|
||||
if (block != TRepo.landmine)
|
||||
return false;
|
||||
return te.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.inventory;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
@@ -12,6 +13,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.blocks.logic.CraftingStationLogic;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.armor.ArmorCore;
|
||||
import tconstruct.library.crafting.ToolBuilder;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
@@ -152,9 +154,13 @@ public class CraftingStationContainer extends Container
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer par1EntityPlayer)
|
||||
public boolean canInteractWith (EntityPlayer player)
|
||||
{
|
||||
return par1EntityPlayer.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
|
||||
|
||||
Block block = worldObj.getBlock(this.posX, this.posY, this.posZ);
|
||||
if (block != TRepo.craftingStationWood && block != TRepo.craftingSlabWood)
|
||||
return false;
|
||||
return player.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.inventory;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
@@ -7,6 +8,7 @@ import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.blocks.logic.FrypanLogic;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
public class FrypanContainer extends Container
|
||||
{
|
||||
@@ -85,6 +87,10 @@ public class FrypanContainer extends Container
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer entityplayer)
|
||||
{
|
||||
Block block = logic.getWorldObj().getBlock(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
if (block != TRepo.heldItemBlock)
|
||||
return false;
|
||||
|
||||
return logic.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package tconstruct.inventory;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.blocks.logic.PartBuilderLogic;
|
||||
import tconstruct.blocks.logic.PatternChestLogic;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.util.IPattern;
|
||||
|
||||
public class PartCrafterChestContainer extends ActiveContainer
|
||||
@@ -54,9 +56,12 @@ public class PartCrafterChestContainer extends ActiveContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer var1)
|
||||
public boolean canInteractWith (EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
Block block = logic.getWorldObj().getBlock(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
if (block != TRepo.toolStationWood && block != TRepo.craftingSlabWood)
|
||||
return false;
|
||||
return logic.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package tconstruct.inventory;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.blocks.logic.PartBuilderLogic;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.util.IPattern;
|
||||
|
||||
public class PartCrafterContainer extends ActiveContainer
|
||||
@@ -43,9 +45,12 @@ public class PartCrafterContainer extends ActiveContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer var1)
|
||||
public boolean canInteractWith (EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
Block block = logic.getWorldObj().getBlock(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
if (block != TRepo.toolStationWood && block != TRepo.craftingSlabWood)
|
||||
return false;
|
||||
return logic.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package tconstruct.inventory;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.blocks.logic.PatternChestLogic;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.util.IPattern;
|
||||
|
||||
public class PatternChestContainer extends Container
|
||||
@@ -44,6 +46,9 @@ public class PatternChestContainer extends Container
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer entityplayer)
|
||||
{
|
||||
Block block = logic.getWorldObj().getBlock(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
if (block != TRepo.toolStationWood && block != TRepo.craftingSlabWood)
|
||||
return false;
|
||||
return logic.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package tconstruct.inventory;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.blocks.logic.StencilTableLogic;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
public class PatternShaperContainer extends Container
|
||||
{
|
||||
@@ -41,7 +43,7 @@ public class PatternShaperContainer extends Container
|
||||
|
||||
/*public void onCraftMatrixChanged(IInventory iinventory)
|
||||
{
|
||||
craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj));
|
||||
craftResult.setInventorySloTRepos(0, CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj));
|
||||
}*/
|
||||
|
||||
/*@Override
|
||||
@@ -62,7 +64,10 @@ public class PatternShaperContainer extends Container
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
Block block = logic.getWorldObj().getBlock(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
if (block != TRepo.toolStationWood && block != TRepo.craftingSlabWood)
|
||||
return false;
|
||||
return logic.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package tconstruct.inventory;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.blocks.logic.SmelteryLogic;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
public class SmelteryContainer extends ActiveContainer
|
||||
{
|
||||
@@ -114,6 +116,9 @@ public class SmelteryContainer extends ActiveContainer
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer entityplayer)
|
||||
{
|
||||
Block block = logic.getWorldObj().getBlock(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
if (block != TRepo.smeltery && block != TRepo.smelteryNether)
|
||||
return false;
|
||||
return logic.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package tconstruct.inventory;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import tconstruct.blocks.logic.ToolForgeLogic;
|
||||
import tconstruct.blocks.logic.ToolStationLogic;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
|
||||
public class ToolForgeContainer extends ToolStationContainer
|
||||
@@ -87,4 +90,13 @@ public class ToolForgeContainer extends ToolStationContainer
|
||||
logic.getWorldObj().playAuxSFX(1021, (int) logic.xCoord, (int) logic.yCoord, (int) logic.zCoord, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer entityplayer)
|
||||
{
|
||||
Block block = logic.getWorldObj().getBlock(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
if (block != TRepo.toolForge && block != TRepo.craftingSlabWood)
|
||||
return false;
|
||||
return logic.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,14 @@ package tconstruct.inventory;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import tconstruct.blocks.logic.ToolStationLogic;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
|
||||
public class ToolStationContainer extends ActiveContainer
|
||||
@@ -80,9 +82,12 @@ public class ToolStationContainer extends ActiveContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith (EntityPlayer var1)
|
||||
public boolean canInteractWith (EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
Block block = logic.getWorldObj().getBlock(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
if (block != TRepo.toolStationWood && block != TRepo.craftingSlabWood)
|
||||
return false;
|
||||
return logic.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,6 +52,9 @@ public class PHConstruct
|
||||
ingotsAlumiteAlloy = config.get("Smeltery Output Modification", "Alumite ingot return", 3, "Number of ingots returned from smelting Alumite in the smeltery").getDouble(3);
|
||||
ingotsManyullynAlloy = config.get("Smeltery Output Modification", "Manyullyn ingot return", 1, "Number of ingots returned from smelting Manyullyn in the smeltery").getDouble(1);
|
||||
ingotsPigironAlloy = config.get("Smeltery Output Modification", "Pig Iron ingot return", 1, "Number of ingots returned from smelting Pig Iron in the smeltery").getDouble(1);
|
||||
|
||||
exoCraftingEnabled = config.get("Equipables", "Exo-Armor-Craftable", false).getBoolean(false);
|
||||
capesEnabled = config.get("Superfun", "Enable-TCon-Capes", true).getBoolean(true);
|
||||
|
||||
boolean ic2 = true;
|
||||
boolean xycraft = true;
|
||||
@@ -182,6 +185,9 @@ public class PHConstruct
|
||||
gregtech = gtConfig.get("smelting", "tile.anvil.slightlyDamaged", false).getBoolean(false);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean exoCraftingEnabled;
|
||||
public static boolean capesEnabled;
|
||||
|
||||
// Ore values
|
||||
public static boolean generateCopper;
|
||||
|
||||
Reference in new issue
Block a user