mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 22:44:23 +00:00
manual merge of master branch changes up to commit 1387bc6
This commit is contained in:
1 parent
2d99d5dba2
commit
14d357ccf6
23 files changed
+317
-172
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class BloodBlock extends TConstructFluid
|
||||
{
|
||||
|
||||
public BloodBlock(int id, Fluid fluid, Material material, String texture)
|
||||
{
|
||||
super(id, fluid, material, texture);
|
||||
}
|
||||
|
||||
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 200, 0));
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 20*10, 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GlueBlock extends TConstructBlock {
|
||||
|
||||
public GlueBlock(int id)
|
||||
{
|
||||
super(id, Material.ground, 4.0f, new String[]{"glue"});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
entity.motionX *= 0.1;
|
||||
entity.motionZ *= 0.1;
|
||||
|
||||
if (entity instanceof EntityLivingBase) {
|
||||
EntityLivingBase lvb = (EntityLivingBase)entity;
|
||||
// Well you'd feel ill too standing on glue...
|
||||
if (lvb.isPotionActive(Potion.hunger)) {
|
||||
lvb.getActivePotionEffect(Potion.hunger).duration = 20;
|
||||
} else {
|
||||
lvb.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 20, 4));
|
||||
}
|
||||
|
||||
// Glue is sticky stuff
|
||||
if (lvb.isPotionActive(Potion.moveSlowdown)) {
|
||||
lvb.getActivePotionEffect(Potion.moveSlowdown).duration = 30;
|
||||
} else {
|
||||
lvb.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30, 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
{
|
||||
return Block.slowSand.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.monster.EntityIronGolem;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@@ -313,11 +314,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
if (o instanceof EntityVillager)
|
||||
{
|
||||
EntityVillager villager = (EntityVillager) o;
|
||||
if (villager.attackEntityFrom(new SmelteryDamageSource(), 1))
|
||||
if (villager.attackEntityFrom(new SmelteryDamageSource(), 5))
|
||||
{
|
||||
if (currentLiquid + 8 < maxLiquid)
|
||||
if (currentLiquid + 40 < maxLiquid)
|
||||
{
|
||||
int amount = villager.isChild() ? 1 : 8;
|
||||
int amount = villager.isChild() ? 5 : 40;
|
||||
this.fill(new FluidStack(TContent.moltenEmeraldFluid, amount), true);
|
||||
}
|
||||
}
|
||||
@@ -325,22 +326,33 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
else if (o instanceof EntityEnderman)
|
||||
{
|
||||
EntityEnderman villager = (EntityEnderman) o;
|
||||
if (villager.attackEntityFrom(new SmelteryDamageSource(), 1))
|
||||
if (villager.attackEntityFrom(new SmelteryDamageSource(), 5))
|
||||
{
|
||||
if (currentLiquid + 25 < maxLiquid)
|
||||
if (currentLiquid + 125 < maxLiquid)
|
||||
{
|
||||
this.fill(new FluidStack(TContent.moltenEnderFluid, 25), true);
|
||||
this.fill(new FluidStack(TContent.moltenEnderFluid, 125), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (o instanceof EntityIronGolem)
|
||||
{
|
||||
EntityIronGolem golem = (EntityIronGolem) o;
|
||||
if (golem.attackEntityFrom(new SmelteryDamageSource(), 5))
|
||||
{
|
||||
if (currentLiquid + 40 < maxLiquid)
|
||||
{
|
||||
this.fill(new FluidStack(TContent.moltenIronFluid, 40), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (o instanceof EntityLivingBase)
|
||||
{
|
||||
EntityLivingBase living = (EntityLivingBase) o;
|
||||
if (living.attackEntityFrom(new SmelteryDamageSource(), 1))
|
||||
if (living.attackEntityFrom(new SmelteryDamageSource(), 5))
|
||||
{
|
||||
if (currentLiquid + 8 < maxLiquid)
|
||||
if (currentLiquid + 40 < maxLiquid)
|
||||
{
|
||||
int amount = (living.isChild() || living instanceof EntityPlayer) ? 1 : 8;
|
||||
int amount = (living.isChild() || living instanceof EntityPlayer) ? 5 : 40;
|
||||
this.fill(new FluidStack(TContent.bloodFluid, amount), true);
|
||||
}
|
||||
}
|
||||
@@ -952,7 +964,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
}
|
||||
else
|
||||
{
|
||||
if (doDrain)
|
||||
if (doDrain && maxDrain > 0)
|
||||
{
|
||||
liquid.amount -= maxDrain;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
@@ -977,7 +989,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
resource.amount = maxLiquid - currentLiquid;
|
||||
int amount = resource.amount;
|
||||
|
||||
if (doFill)
|
||||
if (amount > 0 && doFill)
|
||||
{
|
||||
if (addMoltenMetal(resource, false))
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SlimeGel extends TConstructBlock
|
||||
entity.motionY *= -1.2F;
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 1, 4));
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 1, 2));
|
||||
}
|
||||
}
|
||||
entity.fallDistance = 0;
|
||||
|
||||
@@ -69,7 +69,6 @@ public class TClientEvents
|
||||
{
|
||||
stillIcons[0] = register.registerIcon("tinker:liquid_pigiron");
|
||||
flowIcons[0] = register.registerIcon("tinker:liquid_pigiron");
|
||||
System.out.println("Icons: "+stillIcons[0]+" "+flowIcons[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,125 +96,129 @@ public class TClientEvents
|
||||
@ForgeSubscribe
|
||||
public void renderHealthbar (RenderGameOverlayEvent.Pre event)
|
||||
{
|
||||
if (event.type == ElementType.HEALTH && !Loader.isModLoaded("tukmc_Vz")) // Loader check to avoid conflicting with a GUI mod (thanks Vazkii!)
|
||||
if (!Loader.isModLoaded("tukmc_Vz"))// Loader check to avoid conflicting with a GUI mod (thanks Vazkii!)
|
||||
{
|
||||
event.setCanceled(true);
|
||||
updateCounter++;
|
||||
|
||||
ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
|
||||
int scaledWidth = scaledresolution.getScaledWidth();
|
||||
int scaledHeight = scaledresolution.getScaledHeight();
|
||||
int xBasePos = scaledWidth / 2 - 91;
|
||||
int yBasePos = scaledHeight - 39;
|
||||
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(mc.thePlayer.username);
|
||||
|
||||
boolean highlight = mc.thePlayer.hurtResistantTime / 3 % 2 == 1;
|
||||
|
||||
if (mc.thePlayer.hurtResistantTime < 10)
|
||||
if (event.type == ElementType.HEALTH)
|
||||
{
|
||||
highlight = false;
|
||||
}
|
||||
updateCounter++;
|
||||
|
||||
AttributeInstance attrMaxHealth = this.mc.thePlayer.getEntityAttribute(SharedMonsterAttributes.maxHealth);
|
||||
int health = MathHelper.ceiling_float_int(mc.thePlayer.getHealth());
|
||||
int healthLast = MathHelper.ceiling_float_int(mc.thePlayer.prevHealth);
|
||||
float healthMax = (float) attrMaxHealth.getAttributeValue();
|
||||
if (healthMax > 20)
|
||||
healthMax = 20;
|
||||
float absorb = this.mc.thePlayer.getAbsorptionAmount();
|
||||
ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
|
||||
int scaledWidth = scaledresolution.getScaledWidth();
|
||||
int scaledHeight = scaledresolution.getScaledHeight();
|
||||
int xBasePos = scaledWidth / 2 - 91;
|
||||
int yBasePos = scaledHeight - 39;
|
||||
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(mc.thePlayer.username);
|
||||
|
||||
int healthRows = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F / 10.0F);
|
||||
int rowHeight = Math.max(10 - (healthRows - 2), 3);
|
||||
boolean highlight = mc.thePlayer.hurtResistantTime / 3 % 2 == 1;
|
||||
|
||||
this.rand.setSeed((long) (updateCounter * 312871));
|
||||
|
||||
int left = scaledWidth / 2 - 91;
|
||||
int top = scaledHeight - left_height;
|
||||
|
||||
int regen = -1;
|
||||
if (mc.thePlayer.isPotionActive(Potion.regeneration))
|
||||
{
|
||||
regen = updateCounter % 25;
|
||||
}
|
||||
|
||||
final int TOP = 9 * (mc.theWorld.getWorldInfo().isHardcoreModeEnabled() ? 5 : 0);
|
||||
final int BACKGROUND = (highlight ? 25 : 16);
|
||||
int MARGIN = 16;
|
||||
if (mc.thePlayer.isPotionActive(Potion.poison))
|
||||
MARGIN += 36;
|
||||
else if (mc.thePlayer.isPotionActive(Potion.wither))
|
||||
MARGIN += 72;
|
||||
float absorbRemaining = absorb;
|
||||
|
||||
for (int i = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F) - 1; i >= 0; --i)
|
||||
{
|
||||
int b0 = (highlight ? 1 : 0);
|
||||
int row = MathHelper.ceiling_float_int((float) (i + 1) / 10.0F) - 1;
|
||||
int x = left + i % 10 * 8;
|
||||
int y = top - row * rowHeight;
|
||||
|
||||
if (health <= 4)
|
||||
y += rand.nextInt(2);
|
||||
if (i == regen)
|
||||
y -= 2;
|
||||
|
||||
drawTexturedModalRect(x, y, BACKGROUND, TOP, 9, 9);
|
||||
|
||||
if (highlight)
|
||||
if (mc.thePlayer.hurtResistantTime < 10)
|
||||
{
|
||||
if (i * 2 + 1 < healthLast)
|
||||
drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); //6
|
||||
else if (i * 2 + 1 == healthLast)
|
||||
drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); //7
|
||||
highlight = false;
|
||||
}
|
||||
|
||||
if (absorbRemaining > 0.0F)
|
||||
AttributeInstance attrMaxHealth = this.mc.thePlayer.getEntityAttribute(SharedMonsterAttributes.maxHealth);
|
||||
int health = MathHelper.ceiling_float_int(mc.thePlayer.getHealth());
|
||||
int healthLast = MathHelper.ceiling_float_int(mc.thePlayer.prevHealth);
|
||||
float healthMax = (float) attrMaxHealth.getAttributeValue();
|
||||
if (healthMax > 20)
|
||||
healthMax = 20;
|
||||
float absorb = this.mc.thePlayer.getAbsorptionAmount();
|
||||
|
||||
int healthRows = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F / 10.0F);
|
||||
int rowHeight = Math.max(10 - (healthRows - 2), 3);
|
||||
|
||||
this.rand.setSeed((long) (updateCounter * 312871));
|
||||
|
||||
int left = scaledWidth / 2 - 91;
|
||||
int top = scaledHeight - left_height;
|
||||
|
||||
int regen = -1;
|
||||
if (mc.thePlayer.isPotionActive(Potion.regeneration))
|
||||
{
|
||||
if (absorbRemaining == absorb && absorb % 2.0F == 1.0F)
|
||||
drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); //17
|
||||
regen = updateCounter % 25;
|
||||
}
|
||||
|
||||
final int TOP = 9 * (mc.theWorld.getWorldInfo().isHardcoreModeEnabled() ? 5 : 0);
|
||||
final int BACKGROUND = (highlight ? 25 : 16);
|
||||
int MARGIN = 16;
|
||||
if (mc.thePlayer.isPotionActive(Potion.poison))
|
||||
MARGIN += 36;
|
||||
else if (mc.thePlayer.isPotionActive(Potion.wither))
|
||||
MARGIN += 72;
|
||||
float absorbRemaining = absorb;
|
||||
|
||||
for (int i = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F) - 1; i >= 0; --i)
|
||||
{
|
||||
int b0 = (highlight ? 1 : 0);
|
||||
int row = MathHelper.ceiling_float_int((float) (i + 1) / 10.0F) - 1;
|
||||
int x = left + i % 10 * 8;
|
||||
int y = top - row * rowHeight;
|
||||
|
||||
if (health <= 4)
|
||||
y += rand.nextInt(2);
|
||||
if (i == regen)
|
||||
y -= 2;
|
||||
|
||||
drawTexturedModalRect(x, y, BACKGROUND, TOP, 9, 9);
|
||||
|
||||
if (highlight)
|
||||
{
|
||||
if (i * 2 + 1 < healthLast)
|
||||
drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); //6
|
||||
else if (i * 2 + 1 == healthLast)
|
||||
drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); //7
|
||||
}
|
||||
|
||||
if (absorbRemaining > 0.0F)
|
||||
{
|
||||
if (absorbRemaining == absorb && absorb % 2.0F == 1.0F)
|
||||
drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); //17
|
||||
else
|
||||
drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); //16
|
||||
absorbRemaining -= 2.0F;
|
||||
}
|
||||
else
|
||||
drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); //16
|
||||
absorbRemaining -= 2.0F;
|
||||
{
|
||||
if (i * 2 + 1 < health)
|
||||
drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); //4
|
||||
else if (i * 2 + 1 == health)
|
||||
drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); //5
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
PotionEffect potion = mc.thePlayer.getActivePotionEffect(Potion.wither);
|
||||
if (potion != null)
|
||||
return;
|
||||
potion = mc.thePlayer.getActivePotionEffect(Potion.poison);
|
||||
if (potion != null)
|
||||
return;
|
||||
|
||||
//Extra hearts
|
||||
this.mc.getTextureManager().bindTexture(hearts);
|
||||
|
||||
int hp = MathHelper.ceiling_float_int(this.mc.thePlayer.getHealth());
|
||||
for (int iter = 0; iter < hp / 20; iter++)
|
||||
{
|
||||
if (i * 2 + 1 < health)
|
||||
drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); //4
|
||||
else if (i * 2 + 1 == health)
|
||||
drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); //5
|
||||
int renderHearts = (hp - 20 * (iter + 1)) / 2;
|
||||
if (renderHearts > 10)
|
||||
renderHearts = 10;
|
||||
for (int i = 0; i < renderHearts; i++)
|
||||
{
|
||||
this.drawTexturedModalRect(xBasePos + 8 * i, yBasePos, 0 + 18 * iter, 0, 8, 8);
|
||||
}
|
||||
if (hp % 2 == 1 && renderHearts < 10)
|
||||
{
|
||||
this.drawTexturedModalRect(xBasePos + 8 * renderHearts, yBasePos, 9 + 18 * iter, 0, 8, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PotionEffect potion = mc.thePlayer.getActivePotionEffect(Potion.wither);
|
||||
if (potion != null)
|
||||
return;
|
||||
potion = mc.thePlayer.getActivePotionEffect(Potion.poison);
|
||||
if (potion != null)
|
||||
return;
|
||||
|
||||
//Extra hearts
|
||||
this.mc.getTextureManager().bindTexture(hearts);
|
||||
|
||||
int hp = MathHelper.ceiling_float_int(this.mc.thePlayer.getHealth());
|
||||
for (int iter = 0; iter < hp / 20; iter++)
|
||||
{
|
||||
int renderHearts = (hp - 20 * (iter + 1)) / 2;
|
||||
if (renderHearts > 10)
|
||||
renderHearts = 10;
|
||||
for (int i = 0; i < renderHearts; i++)
|
||||
{
|
||||
this.drawTexturedModalRect(xBasePos + 8 * i, yBasePos, 0 + 18 * iter, 0, 8, 8);
|
||||
}
|
||||
if (hp % 2 == 1 && renderHearts < 10)
|
||||
{
|
||||
this.drawTexturedModalRect(xBasePos + 8 * renderHearts, yBasePos, 9 + 18 * iter, 0, 8, 8);
|
||||
}
|
||||
}
|
||||
|
||||
this.mc.getTextureManager().bindTexture(icons);
|
||||
GuiIngameForge.left_height += 10;
|
||||
if (absorb > 0)
|
||||
this.mc.getTextureManager().bindTexture(icons);
|
||||
GuiIngameForge.left_height += 10;
|
||||
if (absorb > 0)
|
||||
GuiIngameForge.left_height += 10;
|
||||
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ public class SmelteryGui extends NewContainerGui
|
||||
list.add("\u00A7f" + name);
|
||||
if (name.equals("Liquified Emerald"))
|
||||
{
|
||||
list.add("Emeralds: " + liquid.amount / 320f);
|
||||
list.add("Emeralds: " + liquid.amount / 640f);
|
||||
}
|
||||
else if (name.equals("Molten Glass"))
|
||||
{
|
||||
|
||||
@@ -158,6 +158,7 @@ public class TContent implements IFuelHandler
|
||||
public static Block meatBlock;
|
||||
public static Block woolSlab1;
|
||||
public static Block woolSlab2;
|
||||
public static Block glueBlock;
|
||||
|
||||
//Traps
|
||||
public static Block landmine;
|
||||
@@ -378,6 +379,10 @@ public class TContent implements IFuelHandler
|
||||
LanguageRegistry.addName(meatBlock, "Hambone");
|
||||
GameRegistry.addRecipe(new ItemStack(meatBlock), "mmm", "mbm", "mmm", 'b', new ItemStack(Item.bone), 'm', new ItemStack(Item.porkRaw));
|
||||
|
||||
glueBlock = new GlueBlock(PHConstruct.glueBlock).setUnlocalizedName("GlueBlock").setCreativeTab(TConstructRegistry.blockTab);
|
||||
GameRegistry.registerBlock(glueBlock, "GlueBlock");
|
||||
OreDictionary.registerOre("blockRubber", new ItemStack(glueBlock));
|
||||
|
||||
woolSlab1 = new SlabBase(PHConstruct.woolSlab1, Material.cloth, Block.cloth, 0, 8).setUnlocalizedName("cloth");
|
||||
woolSlab1.setStepSound(Block.soundClothFootstep).setCreativeTab(CreativeTabs.tabDecorations);
|
||||
GameRegistry.registerBlock(woolSlab1, WoolSlab1Item.class, "WoolSlab1");
|
||||
@@ -613,7 +618,7 @@ public class TContent implements IFuelHandler
|
||||
bloodFluid = new Fluid("blood");
|
||||
if (!FluidRegistry.registerFluid(bloodFluid))
|
||||
bloodFluid = FluidRegistry.getFluid("blood");
|
||||
blood = new TConstructFluid(PHConstruct.blood, bloodFluid, Material.water, "liquid_cow").setUnlocalizedName("liquid.blood");
|
||||
blood = new BloodBlock(PHConstruct.blood, bloodFluid, Material.water, "liquid_cow").setUnlocalizedName("liquid.blood");
|
||||
GameRegistry.registerBlock(blood, "liquid.blood");
|
||||
fluids[16] = bloodFluid;
|
||||
fluidBlocks[16] = blood;
|
||||
@@ -807,15 +812,21 @@ public class TContent implements IFuelHandler
|
||||
void registerItems ()
|
||||
{
|
||||
titleIcon = new TitleIcon(PHConstruct.uselessItem).setUnlocalizedName("tconstruct.titleicon");
|
||||
GameRegistry.registerItem(titleIcon, "titleIcon");
|
||||
String[] blanks = new String[] { "blank_pattern", "blank_cast", "blank_cast" };
|
||||
blankPattern = new CraftingItem(PHConstruct.blankPattern, blanks, blanks, "materials/").setUnlocalizedName("tconstruct.Pattern");
|
||||
GameRegistry.registerItem(blankPattern, "blankPattern");
|
||||
|
||||
materials = new MaterialItem(PHConstruct.materials).setUnlocalizedName("tconstruct.Materials");
|
||||
toolRod = new ToolPart(PHConstruct.toolRod, "_rod", "ToolRod").setUnlocalizedName("tconstruct.ToolRod");
|
||||
toolShard = new ToolShard(PHConstruct.toolShard, "_chunk").setUnlocalizedName("tconstruct.ToolShard");
|
||||
woodPattern = new Pattern(PHConstruct.woodPattern, "WoodPattern", "pattern_", "materials/").setUnlocalizedName("tconstruct.Pattern");
|
||||
metalPattern = new MetalPattern(PHConstruct.metalPattern, "MetalPattern", "cast_", "materials/").setUnlocalizedName("tconstruct.MetalPattern");
|
||||
armorPattern = new ArmorPattern(PHConstruct.armorPattern, "ArmorPattern", "armorcast_", "materials/").setUnlocalizedName("tconstruct.ArmorPattern");
|
||||
woodPattern = new Pattern(PHConstruct.woodPattern, "pattern_", "materials/").setUnlocalizedName("tconstruct.Pattern");
|
||||
metalPattern = new MetalPattern(PHConstruct.metalPattern, "cast_", "materials/").setUnlocalizedName("tconstruct.MetalPattern");
|
||||
armorPattern = new ArmorPattern(PHConstruct.armorPattern, "armorcast_", "materials/").setUnlocalizedName("tconstruct.ArmorPattern");
|
||||
GameRegistry.registerItem(materials, "materials");
|
||||
GameRegistry.registerItem(woodPattern, "woodPattern");
|
||||
GameRegistry.registerItem(metalPattern, "metalPattern");
|
||||
GameRegistry.registerItem(armorPattern, "armorPattern");
|
||||
|
||||
TConstructRegistry.addItemToDirectory("blankPattern", blankPattern);
|
||||
TConstructRegistry.addItemToDirectory("woodPattern", woodPattern);
|
||||
@@ -840,7 +851,9 @@ public class TContent implements IFuelHandler
|
||||
}
|
||||
|
||||
manualBook = new Manual(PHConstruct.manual);
|
||||
GameRegistry.registerItem(manualBook, "manualBook");
|
||||
buckets = new FilledBucket(PHConstruct.buckets);
|
||||
GameRegistry.registerItem(buckets, "buckets");
|
||||
|
||||
pickaxe = new Pickaxe(PHConstruct.pickaxe);
|
||||
shovel = new Shovel(PHConstruct.shovel);
|
||||
@@ -866,16 +879,18 @@ public class TContent implements IFuelHandler
|
||||
shortbow = new Shortbow(PHConstruct.shortbow);
|
||||
arrow = new Arrow(PHConstruct.arrow);
|
||||
|
||||
Item[] tools = { pickaxe, shovel, hatchet, broadsword, longsword, rapier, cutlass, frypan, battlesign, mattock, chisel, lumberaxe, cleaver, scythe, excavator, hammer, battleaxe };
|
||||
String[] toolStrings = { "pickaxe", "shovel", "hatchet", "broadsword", "longsword", "rapier", "cutlass", "frypan", "battlesign", "mattock", "chisel", "lumberaxe", "cleaver", "scythe",
|
||||
"excavator", "hammer", "battleaxe" };
|
||||
Item[] tools = { pickaxe, shovel, hatchet, broadsword, longsword, rapier, dagger, cutlass, frypan, battlesign, mattock, chisel, lumberaxe, cleaver, scythe, excavator, hammer, battleaxe, shortbow, arrow };
|
||||
String[] toolStrings = { "pickaxe", "shovel", "hatchet", "broadsword", "longsword", "rapier", "dagger", "cutlass", "frypan", "battlesign", "mattock", "chisel", "lumberaxe", "cleaver", "scythe",
|
||||
"excavator", "hammer", "battleaxe", "shortbow", "arrow" };
|
||||
|
||||
for (int i = 0; i < tools.length; i++)
|
||||
{
|
||||
GameRegistry.registerItem(tools[i], toolStrings[i]); // 1.7 compat
|
||||
TConstructRegistry.addItemToDirectory(toolStrings[i], tools[i]);
|
||||
}
|
||||
|
||||
potionLauncher = new PotionLauncher(PHConstruct.potionLauncher).setUnlocalizedName("tconstruct.PotionLauncher");
|
||||
GameRegistry.registerItem(potionLauncher, "potionLauncher");
|
||||
|
||||
pickaxeHead = new ToolPart(PHConstruct.pickaxeHead, "_pickaxe_head", "PickHead").setUnlocalizedName("tconstruct.PickaxeHead");
|
||||
shovelHead = new ToolPart(PHConstruct.shovelHead, "_shovel_head", "ShovelHead").setUnlocalizedName("tconstruct.ShovelHead");
|
||||
@@ -914,14 +929,19 @@ public class TContent implements IFuelHandler
|
||||
|
||||
for (int i = 0; i < toolParts.length; i++)
|
||||
{
|
||||
GameRegistry.registerItem(toolParts[i], toolPartStrings[i]); // 1.7 compat
|
||||
TConstructRegistry.addItemToDirectory(toolPartStrings[i], toolParts[i]);
|
||||
}
|
||||
|
||||
diamondApple = new DiamondApple(PHConstruct.diamondApple).setUnlocalizedName("tconstruct.apple.diamond");
|
||||
strangeFood = new StrangeFood(PHConstruct.slimefood).setUnlocalizedName("tconstruct.strangefood");
|
||||
oreBerries = new OreBerries(PHConstruct.oreChunks).setUnlocalizedName("oreberry");
|
||||
GameRegistry.registerItem(diamondApple, "diamondApple");
|
||||
GameRegistry.registerItem(strangeFood, "strangeFood");
|
||||
GameRegistry.registerItem(oreBerries, "oreBerries");
|
||||
|
||||
jerky = new Jerky(PHConstruct.jerky, Loader.isModLoaded("HungerOverhaul")).setUnlocalizedName("tconstruct.jerky");
|
||||
GameRegistry.registerItem(jerky, "jerky");
|
||||
|
||||
//Wearables
|
||||
//heavyHelmet = new TArmorBase(PHConstruct.heavyHelmet, 0).setUnlocalizedName("tconstruct.HeavyHelmet");
|
||||
@@ -930,6 +950,12 @@ public class TContent implements IFuelHandler
|
||||
//glove = new Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove");
|
||||
knapsack = new Knapsack(PHConstruct.knapsack).setUnlocalizedName("tconstruct.storage");
|
||||
goldHead = new GoldenHead(PHConstruct.goldHead, 4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead");
|
||||
//GameRegistry.registerItem(heavyHelmet, "heavyHelmet");
|
||||
GameRegistry.registerItem(heartCanister, "heartCanister");
|
||||
//GameRegistry.registerItem(heavyBoots, "heavyBoots");
|
||||
//GameRegistry.registerItem(glove, "glove");
|
||||
GameRegistry.registerItem(knapsack, "knapsack");
|
||||
GameRegistry.registerItem(goldHead, "goldHead");
|
||||
|
||||
LiquidCasting basinCasting = TConstruct.getBasinCasting();
|
||||
materialWood = EnumHelper.addArmorMaterial("WOOD", 2, new int[] { 1, 2, 2, 1 }, 3);
|
||||
@@ -937,6 +963,10 @@ public class TContent implements IFuelHandler
|
||||
chestplateWood = new ArmorBasic(PHConstruct.woodChestplate, materialWood, 1, "wood").setUnlocalizedName("tconstruct.chestplateWood");
|
||||
leggingsWood = new ArmorBasic(PHConstruct.woodPants, materialWood, 2, "wood").setUnlocalizedName("tconstruct.leggingsWood");
|
||||
bootsWood = new ArmorBasic(PHConstruct.woodBoots, materialWood, 3, "wood").setUnlocalizedName("tconstruct.bootsWood");
|
||||
GameRegistry.registerItem(helmetWood, "helmetWood");
|
||||
GameRegistry.registerItem(chestplateWood, "chestplateWood");
|
||||
GameRegistry.registerItem(leggingsWood, "leggingsWood");
|
||||
GameRegistry.registerItem(bootsWood, "bootsWood");
|
||||
|
||||
// essenceCrystal = new EssenceCrystal(PHConstruct.essenceCrystal).setUnlocalizedName("tconstruct.crystal.essence");
|
||||
|
||||
@@ -996,7 +1026,7 @@ public class TContent implements IFuelHandler
|
||||
TConstructRegistry.addToolMaterial(15, "Alumite", 4, 550, 800, 3, 1.3F, 2, 0f, "\u00A7d", "");
|
||||
TConstructRegistry.addToolMaterial(16, "Steel", 4, 750, 800, 3, 1.3F, 2, 0f, "", "");
|
||||
TConstructRegistry.addToolMaterial(17, "BlueSlime", "Slime ", 0, 1200, 150, 0, 2.0F, 0, 0f, "\u00A7b", "");
|
||||
TConstructRegistry.addToolMaterial(18, "PigIron", "Pig Iron ", 3, 150, 600, 2, 1.1F, 1, 0f, "\u00A7c", "Tasty");
|
||||
TConstructRegistry.addToolMaterial(18, "PigIron", "Pig Iron ", 3, 250, 600, 2, 1.3F, 1, 0f, "\u00A7c", "Tasty");
|
||||
|
||||
TConstructRegistry.addBowMaterial(0, 384, 20, 1.0f); //Wood
|
||||
TConstructRegistry.addBowMaterial(1, 10, 80, 0.2f); //Stone
|
||||
@@ -1343,7 +1373,6 @@ public class TContent implements IFuelHandler
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Block.cloth, 1, sc), new ItemStack(woolSlab1, 1, sc), new ItemStack(woolSlab1, 1, sc));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Block.cloth, 1, sc + 8), new ItemStack(woolSlab2, 1, sc), new ItemStack(woolSlab2, 1, sc));
|
||||
}
|
||||
GameRegistry.addRecipe(new ItemStack(woolSlab1, 6, 0), "www", 'w', new ItemStack(Block.cloth, 1, Short.MAX_VALUE));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.cloth, 1, 0), "slabCloth", "slabCloth"));
|
||||
//Trap Recipes
|
||||
GameRegistry.addRecipe(new ItemStack(punji, 5, 0), "b b", " b ", "b b", 'b', new ItemStack(Item.reed));
|
||||
@@ -1415,7 +1444,7 @@ public class TContent implements IFuelHandler
|
||||
{
|
||||
/* Tools */
|
||||
patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, hatchetHead, swordBlade, wideGuard, handGuard, crossbar, binding, frypanHead, signHead, knifeBlade, chiselHead, toughRod,
|
||||
toughBinding, largePlate, broadAxeHead, scytheBlade, excavatorHead, largeSwordBlade, hammerHead, fullGuard, null, null, arrowhead };
|
||||
toughBinding, largePlate, broadAxeHead, scytheBlade, excavatorHead, largeSwordBlade, hammerHead, fullGuard, null, null, arrowhead, null };
|
||||
|
||||
int[] nonMetals = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 17 };
|
||||
|
||||
@@ -1543,13 +1572,19 @@ public class TContent implements IFuelHandler
|
||||
{
|
||||
/* Smeltery */
|
||||
ItemStack ingotcast = new ItemStack(metalPattern, 1, 0);
|
||||
ItemStack gemcast = new ItemStack(metalPattern, 1, 26);
|
||||
LiquidCasting tableCasting = TConstructRegistry.instance.getTableCasting();
|
||||
//Blank
|
||||
tableCasting.addCastingRecipe(new ItemStack(blankPattern, 1, 1), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue), 80);
|
||||
tableCasting.addCastingRecipe(new ItemStack(blankPattern, 1, 2), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 2), 80);
|
||||
tableCasting.addCastingRecipe(gemcast, new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(Item.emerald), 80);
|
||||
tableCasting.addCastingRecipe(gemcast, new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(Item.emerald), 80);
|
||||
|
||||
//Ingots
|
||||
tableCasting.addCastingRecipe(new ItemStack(materials, 1, 2), new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue), ingotcast, 80); //stone
|
||||
|
||||
//Gems
|
||||
tableCasting.addCastingRecipe(new ItemStack(Item.emerald), new FluidStack(moltenEmeraldFluid, 640), gemcast, 80);
|
||||
|
||||
//Buckets
|
||||
ItemStack bucket = new ItemStack(Item.bucketEmpty);
|
||||
@@ -1638,7 +1673,7 @@ public class TContent implements IFuelHandler
|
||||
basinCasting.addCastingRecipe(new ItemStack(clearGlass, 1, 0), new FluidStack(moltenGlassFluid, FluidContainerRegistry.BUCKET_VOLUME), null, true, 100); //glass
|
||||
basinCasting.addCastingRecipe(new ItemStack(smeltery, 1, 4), new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue), null, true, 100); //seared stone
|
||||
basinCasting.addCastingRecipe(new ItemStack(smeltery, 1, 5), new FluidStack(moltenStoneFluid, TConstruct.chunkLiquidValue), new ItemStack(Block.cobblestone), true, 100);
|
||||
|
||||
basinCasting.addCastingRecipe(new ItemStack(Block.blockEmerald), new FluidStack(moltenEmeraldFluid, 640*9), null, true, 100); //emerald
|
||||
basinCasting.addCastingRecipe(new ItemStack(speedBlock, 1, 0), new FluidStack(moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Block.gravel), true, 100); //brownstone
|
||||
basinCasting.addCastingRecipe(new ItemStack(Block.whiteStone), new FluidStack(moltenEnderFluid, TConstruct.chunkLiquidValue), new ItemStack(Block.obsidian), true, 100); //endstone
|
||||
basinCasting.addCastingRecipe(new ItemStack(metalBlock.blockID, 1, 10), new FluidStack(moltenEnderFluid, 1000), null, true, 100); //ender
|
||||
@@ -1669,7 +1704,7 @@ public class TContent implements IFuelHandler
|
||||
Smeltery.addAlloyMixing(new FluidStack(moltenManyullynFluid, TConstruct.ingotLiquidValue * PHConstruct.ingotsManyullynAlloy), new FluidStack(moltenCobaltFluid, TConstruct.ingotLiquidValue),
|
||||
new FluidStack(moltenArditeFluid, TConstruct.ingotLiquidValue)); //Manyullyn
|
||||
Smeltery.addAlloyMixing(new FluidStack(pigIronFluid, TConstruct.ingotLiquidValue * PHConstruct.ingotsPigironAlloy), new FluidStack(moltenIronFluid, TConstruct.ingotLiquidValue),
|
||||
new FluidStack(bloodFluid, 400)); //Pigiron
|
||||
new FluidStack(moltenEmeraldFluid, 640), new FluidStack(bloodFluid, 80)); //Pigiron
|
||||
|
||||
// Stone parts
|
||||
for (int sc = 0; sc < patternOutputs.length; sc++)
|
||||
@@ -1710,6 +1745,7 @@ public class TContent implements IFuelHandler
|
||||
Smeltery.addMelting(FluidType.Iron, new ItemStack(Item.doorIron), 0, TConstruct.ingotLiquidValue * 6);
|
||||
Smeltery.addMelting(FluidType.Iron, new ItemStack(Item.cauldron), 0, TConstruct.ingotLiquidValue * 7);
|
||||
Smeltery.addMelting(FluidType.Iron, new ItemStack(Item.shears), 0, TConstruct.ingotLiquidValue * 2);
|
||||
Smeltery.addMelting(FluidType.Emerald, new ItemStack(Item.emerald), -50, 800);
|
||||
|
||||
//Blocks melt as themselves!
|
||||
//Ore
|
||||
@@ -1730,6 +1766,7 @@ public class TContent implements IFuelHandler
|
||||
Smeltery.addMelting(Block.thinGlass, 0, 625, new FluidStack(moltenGlassFluid, 250));
|
||||
Smeltery.addMelting(Block.stone, 0, 800, new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue / 18));
|
||||
Smeltery.addMelting(Block.cobblestone, 0, 800, new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue / 18));
|
||||
Smeltery.addMelting(Block.blockEmerald, 0, 800, new FluidStack(moltenEmeraldFluid, 640*9));
|
||||
|
||||
Smeltery.addMelting(clearGlass, 0, 500, new FluidStack(moltenGlassFluid, 1000));
|
||||
Smeltery.addMelting(glassPane, 0, 350, new FluidStack(moltenGlassFluid, 250));
|
||||
@@ -1976,6 +2013,8 @@ public class TContent implements IFuelHandler
|
||||
|
||||
ensureOreIsRegistered("crafterWood", new ItemStack(Block.workbench, 1));
|
||||
|
||||
OreDictionary.registerOre("torchStone", new ItemStack(stoneTorch));
|
||||
|
||||
String[] matNames = { "wood", "stone", "iron", "flint", "cactus", "bone", "obsidian", "netherrack", "slime", "paper", "cobalt", "ardite", "manyullyn", "copper", "bronze", "alumite", "steel",
|
||||
"blueslime" };
|
||||
for (int i = 0; i < matNames.length; i++)
|
||||
@@ -2423,17 +2462,17 @@ public class TContent implements IFuelHandler
|
||||
{
|
||||
HashMap<String, Achievement> achievements = TAchievements.achievements;
|
||||
|
||||
achievements.put("tconstruct.beginner", new Achievement(2001, "tconstruct.beginner", 0, 0, manualBook, null).setIndependent().registerAchievement());
|
||||
achievements.put("tconstruct.pattern", new Achievement(2002, "tconstruct.pattern", 2, 1, blankPattern, achievements.get("tconstruct.beginner")).registerAchievement());
|
||||
achievements.put("tconstruct.tinkerer", new Achievement(2003, "tconstruct.tinkerer", 2, 2, new ItemStack(titleIcon, 1, 4096), achievements.get("tconstruct.pattern")).registerAchievement());
|
||||
achievements.put("tconstruct.beginner", new Achievement(2741, "tconstruct.beginner", 0, 0, manualBook, null).setIndependent().registerAchievement());
|
||||
achievements.put("tconstruct.pattern", new Achievement(2742, "tconstruct.pattern", 2, 1, blankPattern, achievements.get("tconstruct.beginner")).registerAchievement());
|
||||
achievements.put("tconstruct.tinkerer", new Achievement(2743, "tconstruct.tinkerer", 2, 2, new ItemStack(titleIcon, 1, 4096), achievements.get("tconstruct.pattern")).registerAchievement());
|
||||
achievements.put("tconstruct.preparedFight",
|
||||
new Achievement(2004, "tconstruct.preparedFight", 1, 3, new ItemStack(titleIcon, 1, 4097), achievements.get("tconstruct.tinkerer")).registerAchievement());
|
||||
achievements.put("tconstruct.proTinkerer", new Achievement(2005, "tconstruct.proTinkerer", 4, 4, new ItemStack(titleIcon, 1, 4098), achievements.get("tconstruct.tinkerer")).setSpecial()
|
||||
new Achievement(2744, "tconstruct.preparedFight", 1, 3, new ItemStack(titleIcon, 1, 4097), achievements.get("tconstruct.tinkerer")).registerAchievement());
|
||||
achievements.put("tconstruct.proTinkerer", new Achievement(2745, "tconstruct.proTinkerer", 4, 4, new ItemStack(titleIcon, 1, 4098), achievements.get("tconstruct.tinkerer")).setSpecial()
|
||||
.registerAchievement());
|
||||
achievements.put("tconstruct.smelteryMaker", new Achievement(2006, "tconstruct.smelteryMaker", -2, -1, smeltery, achievements.get("tconstruct.beginner")).registerAchievement());
|
||||
achievements.put("tconstruct.smelteryMaker", new Achievement(2746, "tconstruct.smelteryMaker", -2, -1, smeltery, achievements.get("tconstruct.beginner")).registerAchievement());
|
||||
achievements.put("tconstruct.enemySlayer",
|
||||
new Achievement(2007, "tconstruct.enemySlayer", 0, 5, new ItemStack(titleIcon, 1, 4099), achievements.get("tconstruct.preparedFight")).registerAchievement());
|
||||
achievements.put("tconstruct.dualConvenience", new Achievement(2008, "tconstruct.dualConvenience", 0, 7, new ItemStack(titleIcon, 1, 4100), achievements.get("tconstruct.enemySlayer"))
|
||||
new Achievement(2747, "tconstruct.enemySlayer", 0, 5, new ItemStack(titleIcon, 1, 4099), achievements.get("tconstruct.preparedFight")).registerAchievement());
|
||||
achievements.put("tconstruct.dualConvenience", new Achievement(2748, "tconstruct.dualConvenience", 0, 7, new ItemStack(titleIcon, 1, 4100), achievements.get("tconstruct.enemySlayer"))
|
||||
.setSpecial().registerAchievement());
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ public class ArmorPattern extends CraftingItem implements ItemBlocklike
|
||||
|
||||
private Icon baseIcon;
|
||||
|
||||
public ArmorPattern(int id, String partType, String patternType, String folder)
|
||||
public ArmorPattern(int id, String patternType, String folder)
|
||||
{
|
||||
super(id, patternName, getPatternNames(patternType), folder);
|
||||
this.setHasSubtypes(true);
|
||||
@@ -50,10 +50,10 @@ public class ArmorPattern extends CraftingItem implements ItemBlocklike
|
||||
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
/*for (int i = 0; i < patternName.length; i++)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, i));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,9 +8,9 @@ import net.minecraft.item.ItemStack;
|
||||
public class MetalPattern extends Pattern
|
||||
{
|
||||
|
||||
public MetalPattern(int id, String partType, String patternType, String folder)
|
||||
public MetalPattern(int id, String patternType, String folder)
|
||||
{
|
||||
super(id, partType, patternType, folder);
|
||||
super(id, patternName, getPatternNames(patternType), folder);
|
||||
}
|
||||
|
||||
protected static String[] getPatternNames (String partType)
|
||||
@@ -19,11 +19,13 @@ public class MetalPattern extends Pattern
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
if (!(patternName[i].equals("")))
|
||||
names[i] = partType + patternName[i];
|
||||
else
|
||||
names[i] = "";
|
||||
return names;
|
||||
}
|
||||
|
||||
private static final String[] patternName = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign",
|
||||
"knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "", "", "arrowhead" };
|
||||
"knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "", "", "arrowhead", "gem" };
|
||||
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
|
||||
@@ -11,9 +11,14 @@ import tconstruct.library.util.IPattern;
|
||||
|
||||
public class Pattern extends CraftingItem implements IPattern
|
||||
{
|
||||
public Pattern(int id, String partType, String patternType, String folder)
|
||||
public Pattern(int id, String patternType, String folder)
|
||||
{
|
||||
super(id, patternName, getPatternNames(patternType), folder);
|
||||
this(id, patternName, getPatternNames(patternType), folder);
|
||||
}
|
||||
|
||||
public Pattern(int id, String[] names, String[] patternTypes, String folder)
|
||||
{
|
||||
super(id, names, patternTypes, folder);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setContainerItem(this);
|
||||
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.world.World;
|
||||
import tconstruct.client.TProxyClient;
|
||||
import tconstruct.entity.BlueSlime;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -26,10 +27,10 @@ public class TitleIcon extends Item
|
||||
int[] primaryColor = { 0x66BBE8, 0x66BBE8 };
|
||||
int[] secondaryColor = { 0x1567BF, 0xFFEC6E };
|
||||
String[] mobNames = { "TConstruct.EdibleSlime", "TConstruct.KingSlime" };
|
||||
|
||||
String[] achievementIconNames = new String[] {"tinkerer", "preparedFight", "proTinkerer", "enemySlayer", "dualConvenience"};
|
||||
|
||||
String[] achievementIconNames = new String[] { "tinkerer", "preparedFight", "proTinkerer", "enemySlayer", "dualConvenience" };
|
||||
Icon[] achievementIcons = new Icon[achievementIconNames.length];
|
||||
|
||||
|
||||
public TitleIcon(int par1)
|
||||
{
|
||||
super(par1);
|
||||
@@ -42,8 +43,9 @@ public class TitleIcon extends Item
|
||||
ToolCore.blankSprite = iconRegister.registerIcon("tinker:blanksprite");
|
||||
TProxyClient.metalBall = iconRegister.registerIcon("tinker:metalball");
|
||||
itemIcon = iconRegister.registerIcon("tinker:tparts");
|
||||
for(int i = 0; i < achievementIcons.length; i++){
|
||||
achievementIcons[i] = iconRegister.registerIcon("tinker:achievementIcons/" + (i < achievementIconNames.length ? achievementIconNames[i] : ""));
|
||||
for (int i = 0; i < achievementIcons.length; i++)
|
||||
{
|
||||
achievementIcons[i] = iconRegister.registerIcon("tinker:achievementIcons/" + (i < achievementIconNames.length ? achievementIconNames[i] : ""));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,23 +60,26 @@ public class TitleIcon extends Item
|
||||
{
|
||||
if (par1 == 255)
|
||||
return itemIcon;
|
||||
if (par1 >= 4096){
|
||||
return getIconFromDamage(par1);
|
||||
if (par1 >= 4096)
|
||||
{
|
||||
return getIconFromDamage(par1);
|
||||
}
|
||||
return Item.monsterPlacer.getIconFromDamageForRenderPass(par1, par2);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage (int par1)
|
||||
{
|
||||
if(par1 >= 4096){
|
||||
int index = par1 - 4096;
|
||||
if(index < achievementIcons.length){
|
||||
return achievementIcons[index];
|
||||
}
|
||||
}
|
||||
//Not returning null to prevent crashes
|
||||
return itemIcon;
|
||||
if (par1 >= 4096)
|
||||
{
|
||||
int index = par1 - 4096;
|
||||
if (index < achievementIcons.length)
|
||||
{
|
||||
return achievementIcons[index];
|
||||
}
|
||||
}
|
||||
//Not returning null to prevent crashes
|
||||
return itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,7 +110,7 @@ public class TitleIcon extends Item
|
||||
if (damage == 255)
|
||||
return 0xffffff;
|
||||
if (damage >= 4096)
|
||||
return 0xffffff;
|
||||
return 0xffffff;
|
||||
return pass == 0 ? primaryColor[damage] : secondaryColor[damage];
|
||||
}
|
||||
|
||||
@@ -186,7 +191,8 @@ public class TitleIcon extends Item
|
||||
if (!world.isRemote)
|
||||
{
|
||||
entity.setPosition(x, y, z);
|
||||
entity.setAngles(player.cameraYaw, player.cameraYaw);
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||
entity.setAngles(player.cameraYaw, player.cameraYaw);
|
||||
((EntityLiving) entity).onSpawnWithEgg((EntityLivingData) null);
|
||||
world.spawnEntityInWorld(entity);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class FluidRenderProperties
|
||||
|
||||
public static enum Applications
|
||||
{
|
||||
TABLE(0.9375F, 1F, 0.0625F, 0.9375F, 0.0625F, 0.9375F), BASIN(0.25F, 0.95F, 0.0625F, 0.9375F, 0.0625F, 0.9375F);
|
||||
TABLE(0.9375F, 1F, 0.0625F, 0.9375F, 0.062F, 0.9375F), BASIN(0.25F, 0.95F, 0.0625F, 0.9375F, 0.0625F, 0.9375F);
|
||||
|
||||
public float minHeight, maxHeight, minX, maxX, minZ, maxZ;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ public class EnvironmentChecks
|
||||
|
||||
/**
|
||||
* Checks for conflicting stuff in environment; adds callable to any crash logs if so.
|
||||
* Note: This code adds additional data to crashlogs. It does not trigger any crashes.
|
||||
*/
|
||||
public static void verifyEnvironmentSanity ()
|
||||
{
|
||||
@@ -31,6 +32,8 @@ public class EnvironmentChecks
|
||||
TConstruct.logger.severe("[Environment Checks] For this reason, the TCon dev team urge you to seek your tedium fix from someone else, as Greg disobeys");
|
||||
TConstruct.logger.severe("[Environment Checks] the basic tenets of good modders conduct. We log this message rather than sabotage. We'd hope he'd do the same.");
|
||||
TConstruct.logger.severe("[Environment Checks] In the meantime, we recommend not playing anything but IC2 alongside Gregtech. ~ Sunstrike");
|
||||
TConstruct.logger.severe("[Environment Checks] GT Appendum I: And now he's going after Forge Mod Loader too...");
|
||||
TConstruct.logger.severe("[Environment Checks] http://forum.industrial-craft.net/index.php?page=Thread&postID=138551#post138551 ~ SlimeKnights");
|
||||
modIds.add("gregtech_addon");
|
||||
}
|
||||
|
||||
@@ -40,12 +43,6 @@ public class EnvironmentChecks
|
||||
modIds.add("optifine");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("DragonAPI"))
|
||||
{
|
||||
TConstruct.logger.severe("[Environment Checks] DragonAPI detected. Currently this just logs a warning, however if Reika continues his plan to implement DRM-like");
|
||||
TConstruct.logger.severe("[Environment Checks] code in his mod then it may become marked as fully unsupported. This is just a warning at this stage.");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Class cl = Class.forName("org.bukkit.Bukkit");
|
||||
|
||||
@@ -162,7 +162,7 @@ public class PHConstruct
|
||||
woodCrafterSlab = config.getBlock("Crafting Slab", 3243).getInt(3243);
|
||||
woolSlab1 = config.getBlock("Wool Slab 1", 3244).getInt(3244);
|
||||
woolSlab2 = config.getBlock("Wool Slab 2", 3245).getInt(3245);
|
||||
//3246
|
||||
glueBlock = config.getBlock("Glue Block", 3256).getInt(3256);
|
||||
castingChannel = config.getBlock("Casting Channel", 3249).getInt(3249);
|
||||
|
||||
slimePoolBlue = config.getBlock("Liquid Blue Slime", 3235).getInt(3235);
|
||||
@@ -374,6 +374,7 @@ public class PHConstruct
|
||||
//Experimental functionality
|
||||
throwableSmeltery = config.get("Experimental", "Items can be thrown into smelteries", true).getBoolean(true);
|
||||
newSmeltery = config.get("Experimental", "Use new adaptive Smeltery code", false, "Warning: Very buggy").getBoolean(false);
|
||||
meltableHorses = config.get("Experimental", "Allow horses to be melted down for glue", true).getBoolean(true);
|
||||
|
||||
//Addon stuff
|
||||
isCleaverTwoHanded = config.get("Battlegear", "Can Cleavers have shields", true).getBoolean(true);
|
||||
@@ -496,6 +497,7 @@ public class PHConstruct
|
||||
public static int meatBlock;
|
||||
public static int woolSlab1;
|
||||
public static int woolSlab2;
|
||||
public static int glueBlock;
|
||||
|
||||
//Patterns and misc
|
||||
public static int blankPattern;
|
||||
@@ -724,6 +726,7 @@ public class PHConstruct
|
||||
//Experimental functionality
|
||||
public static boolean throwableSmeltery;
|
||||
public static boolean newSmeltery;
|
||||
public static boolean meltableHorses;
|
||||
|
||||
//Addon stuff
|
||||
public static boolean isCleaverTwoHanded;
|
||||
|
||||
Reference in new issue
Block a user