1.3.2 Stable

This commit is contained in:
mDiyo 2013-05-03 21:12:48 -07:00
parent 66f34f9be0
commit d132f1096f
17 changed files with 162 additions and 91 deletions

View File

@ -162,7 +162,7 @@ Effective on webs.</text>
- Take a small hop backwards
Natural Abilities:
- Charge Boost, does 2x damage and knockback while sprinting.
- Charge Boost, does 1.5x damage and knockback while sprinting.
- Armor Pierce, ignores armor and blocking.
- Quick Strike, the enemy is stunned for less time.

View File

@ -35,7 +35,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry;
* @dependencies: IC2 API
*/
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.2.rc2", dependencies = "required-after:Forge@[7.7.1.675,)")
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.2", dependencies = "required-after:Forge@[7.7.1.675,)")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.util.network.TPacketHandler.class)
public class TConstruct
{

View File

@ -1,7 +1,6 @@
package mods.tinker.tconstruct.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import mods.tinker.tconstruct.client.block.BrickRender;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
@ -10,6 +9,8 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class MultiBrick extends TConstructBlock
{
@ -85,6 +86,19 @@ public class MultiBrick extends TConstructBlock
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
}
/*@Override
public int getRenderType ()
{
return BrickRender.model;
}*/
@Override
public boolean isBlockNormalCube(World world, int x, int y, int z)
{
return world.getBlockMetadata(x, y, z) != 8;
}
@Override
public boolean canProvidePower()
{
return true;

View File

@ -6,6 +6,7 @@ import java.util.Random;
import mods.tinker.tconstruct.client.block.OreberryRender;
import mods.tinker.tconstruct.common.TContent;
import mods.tinker.tconstruct.library.TConstructRegistry;
import mods.tinker.tconstruct.library.tools.AbilityHelper;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeavesBase;
import net.minecraft.block.material.Material;
@ -182,9 +183,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
if (meta >= 12)
{
world.setBlock(x, y, z, blockID, meta - 4, 3);
EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(TContent.oreBerries, 1, meta % 4 + itemMeat));
world.spawnEntityInWorld(entityitem);
entityitem.onCollideWithPlayer(player);
AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TContent.oreBerries, 1, meta % 4 + itemMeat));
}
}
}
@ -203,9 +202,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
return true;
world.setBlock(x, y, z, blockID, meta - 4, 3);
EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(TContent.oreBerries, 1, meta % 4 + itemMeat));
world.spawnEntityInWorld(entityitem);
entityitem.onCollideWithPlayer(player);
AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TContent.oreBerries, 1, meta % 4 + itemMeat));
return true;
}

View File

@ -9,6 +9,7 @@ import mods.tinker.tconstruct.blocks.logic.FaucetLogic;
import mods.tinker.tconstruct.client.block.SearedRender;
import mods.tinker.tconstruct.library.TConstructRegistry;
import mods.tinker.tconstruct.library.blocks.InventoryBlock;
import mods.tinker.tconstruct.library.tools.AbilityHelper;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.item.EntityItem;
@ -157,14 +158,15 @@ public class SearedBlock extends InventoryBlock
return true;
}
protected void addItemToInventory (EntityPlayer player, World world, int x, int y, int z, ItemStack stack)
public void addItemToInventory (EntityPlayer player, World world, int x, int y, int z, ItemStack stack)
{
if (!world.isRemote)
AbilityHelper.spawnItemAtPlayer(player, stack);
/*if (!world.isRemote)
{
EntityItem entityitem = new EntityItem(world, (double) x + 0.5D, (double) y + 0.9325D, (double) z + 0.5D, stack);
world.spawnEntityInWorld(entityitem);
entityitem.onCollideWithPlayer(player);
}
}*/
}
/* Rendering */

View File

@ -19,7 +19,7 @@ public class TControls extends TKeyHandler
{
//static KeyBinding grabKey = new KeyBinding("key.grab", 29);
//static KeyBinding stiltsKey = new KeyBinding("key.stilts", 46);
static KeyBinding armorKey = new KeyBinding("key.armor", 23);
public static KeyBinding armorKey = new KeyBinding("key.armor", 23);
static KeyBinding jumpKey;
static KeyBinding invKey;
static Minecraft mc;

View File

@ -10,61 +10,21 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import mods.tinker.tconstruct.TConstruct;
import mods.tinker.tconstruct.blocks.logic.CastingBasinLogic;
import mods.tinker.tconstruct.blocks.logic.CastingTableLogic;
import mods.tinker.tconstruct.blocks.logic.FrypanLogic;
import mods.tinker.tconstruct.blocks.logic.GolemCoreLogic;
import mods.tinker.tconstruct.blocks.logic.PartCrafterLogic;
import mods.tinker.tconstruct.blocks.logic.PatternChestLogic;
import mods.tinker.tconstruct.blocks.logic.PatternShaperLogic;
import mods.tinker.tconstruct.blocks.logic.SmelteryLogic;
import mods.tinker.tconstruct.blocks.logic.ToolStationLogic;
import mods.tinker.tconstruct.client.block.CastingBasinSpecialRender;
import mods.tinker.tconstruct.client.block.CastingTableSpecialRenderer;
import mods.tinker.tconstruct.client.block.FluidRender;
import mods.tinker.tconstruct.client.block.FrypanRender;
import mods.tinker.tconstruct.client.block.GolemCoreRender;
import mods.tinker.tconstruct.client.block.GolemCoreSpecialRender;
import mods.tinker.tconstruct.client.block.OreberryRender;
import mods.tinker.tconstruct.client.block.SearedRender;
import mods.tinker.tconstruct.client.block.SmallFontRenderer;
import mods.tinker.tconstruct.client.block.SmelteryRender;
import mods.tinker.tconstruct.client.block.TableRender;
import mods.tinker.tconstruct.client.block.TankRender;
import mods.tinker.tconstruct.client.entity.CartRender;
import mods.tinker.tconstruct.client.entity.CrystalRender;
import mods.tinker.tconstruct.client.entity.FancyItemRender;
import mods.tinker.tconstruct.client.entity.GolemRender;
import mods.tinker.tconstruct.client.entity.SkylaRender;
import mods.tinker.tconstruct.client.entity.SlimeRender;
import mods.tinker.tconstruct.client.entity.projectile.DaggerRender;
import mods.tinker.tconstruct.client.entity.projectile.LaunchedItemRender;
import mods.tinker.tconstruct.client.gui.ArmorExtendedGui;
import mods.tinker.tconstruct.client.gui.FrypanGui;
import mods.tinker.tconstruct.client.gui.GuiManual;
import mods.tinker.tconstruct.client.gui.PartCrafterGui;
import mods.tinker.tconstruct.client.gui.PatternChestGui;
import mods.tinker.tconstruct.client.gui.PatternShaperGui;
import mods.tinker.tconstruct.client.gui.SmelteryGui;
import mods.tinker.tconstruct.client.gui.ToolStationGui;
import mods.tinker.tconstruct.common.TContent;
import mods.tinker.tconstruct.common.TProxyCommon;
import mods.tinker.tconstruct.entity.BlueSlime;
import mods.tinker.tconstruct.entity.CartEntity;
import mods.tinker.tconstruct.entity.Crystal;
import mods.tinker.tconstruct.entity.FancyEntityItem;
import mods.tinker.tconstruct.entity.GolemBase;
import mods.tinker.tconstruct.entity.NitroCreeper;
import mods.tinker.tconstruct.entity.Skyla;
import mods.tinker.tconstruct.entity.projectile.DaggerEntity;
import mods.tinker.tconstruct.entity.projectile.LaunchedPotion;
import mods.tinker.tconstruct.items.tools.Dagger;
import mods.tinker.tconstruct.library.TConstructRegistry;
import mods.tinker.tconstruct.library.client.TConstructClientRegistry;
import mods.tinker.tconstruct.library.client.ToolGuiElement;
import mods.tinker.tconstruct.library.crafting.ToolBuilder;
import mods.tinker.tconstruct.library.tools.ToolCore;
import mods.tinker.tconstruct.util.player.ArmorExtended;
import mods.tinker.tconstruct.blocks.logic.*;
import mods.tinker.tconstruct.client.block.*;
import mods.tinker.tconstruct.client.entity.*;
import mods.tinker.tconstruct.client.entity.projectile.*;
import mods.tinker.tconstruct.client.gui.*;
import mods.tinker.tconstruct.common.*;
import mods.tinker.tconstruct.entity.*;
import mods.tinker.tconstruct.entity.projectile.*;
import mods.tinker.tconstruct.items.tools.*;
import mods.tinker.tconstruct.library.*;
import mods.tinker.tconstruct.library.client.*;
import mods.tinker.tconstruct.library.crafting.*;
import mods.tinker.tconstruct.library.tools.*;
import mods.tinker.tconstruct.util.player.*
;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
@ -160,7 +120,7 @@ public class TProxyClient extends TProxyCommon
public static void addTabsToInventory()
{
/*if (mc == null)
if (mc == null)
mc = Minecraft.getMinecraft();
GuiInventory gui = (GuiInventory) mc.currentScreen;
int cornerX = (gui.width - gui.xSize) / 2;
@ -171,7 +131,7 @@ public class TProxyClient extends TProxyCommon
repairButton.enabled = false;
gui.buttonList.add(repairButton);
repairButton = new InventoryTab(3, cornerX+28, cornerY - 28, new ItemStack(Item.plateDiamond), 1);
gui.buttonList.add(repairButton);*/
gui.buttonList.add(repairButton);
}
public void registerTickHandler ()
@ -193,6 +153,7 @@ public class TProxyClient extends TProxyCommon
RenderingRegistry.registerBlockHandler(new FluidRender());
RenderingRegistry.registerBlockHandler(new GolemCoreRender());
RenderingRegistry.registerBlockHandler(new OreberryRender());
//RenderingRegistry.registerBlockHandler(new BrickRender());
//RenderingRegistry.registerBlockHandler(new BallRepeaterRender());
//Tools

View File

@ -850,7 +850,7 @@ public class BlockSkinRenderHelper
return flag;
}
public static boolean renderFakeBlock (Icon texture, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
public static boolean renderFakeBlock (Icon texture, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
{
Block block = Block.stone;
int var5 = block.colorMultiplier(world, x, y, z);
@ -869,11 +869,11 @@ public class BlockSkinRenderHelper
}
return Minecraft.isAmbientOcclusionEnabled() ?
renderFakeBlockWithAmbientOcclusion(texture, metadata, x, y, z, var6, var7, var8, renderer, world)
: renderFakeBlockWithColorMultiplier(texture, metadata, x, y, z, var6, var7, var8, renderer, world);
renderFakeBlockWithAmbientOcclusion(texture, x, y, z, var6, var7, var8, renderer, world)
: renderFakeBlockWithColorMultiplier(texture, x, y, z, var6, var7, var8, renderer, world);
}
static boolean renderFakeBlockWithAmbientOcclusion(Icon texture, int metadata, int xMin, int yMin, int zMin,
static boolean renderFakeBlockWithAmbientOcclusion(Icon texture, int xMin, int yMin, int zMin,
float xMax, float yMax, float zMax, RenderBlocks render, IBlockAccess world)
{
Block block = Block.stone;
@ -1591,7 +1591,7 @@ public class BlockSkinRenderHelper
return flag;
}
static boolean renderFakeBlockWithColorMultiplier(Icon texture, int metadata, int xMin, int yMin, int zMin, float xMax, float yMax, float zMax, RenderBlocks render, IBlockAccess world)
static boolean renderFakeBlockWithColorMultiplier(Icon texture, int xMin, int yMin, int zMin, float xMax, float yMax, float zMax, RenderBlocks render, IBlockAccess world)
{
Block block = Block.stone;
render.enableAO = false;

View File

@ -0,0 +1,76 @@
package mods.tinker.tconstruct.client.block;
import org.lwjgl.opengl.GL11;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class BrickRender implements ISimpleBlockRenderingHandler
{
public static int model = RenderingRegistry.getNextAvailableRenderId();
@Override
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
{
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
renderInvBlock(renderer, block, metadata);
}
@Override
public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
{
int meta = world.getBlockMetadata(x, y, z);
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.5F, 0.5F, 0.5F, 1.0F, 1.0F, 1.0F);
BlockSkinRenderHelper.renderFakeBlock(block.getIcon(0, meta), x-1, y, z, renderer, world);
//renderer.renderStandardBlock(block, x-1, y, z);
return true;
}
@Override
public boolean shouldRender3DInInventory ()
{
return true;
}
@Override
public int getRenderId ()
{
return model;
}
static void renderInvBlock(RenderBlocks renderblocks, Block block, int meta)
{
Tessellator tessellator = Tessellator.instance;
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, -1F, 0.0F);
renderblocks.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 1.0F, 0.0F);
renderblocks.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 0.0F, -1F);
renderblocks.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 0.0F, 1.0F);
renderblocks.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(-1F, 0.0F, 0.0F);
renderblocks.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(1.0F, 0.0F, 0.0F);
renderblocks.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
tessellator.draw();
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
}
}

View File

@ -185,7 +185,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
if (liquidItem != null)
{
//ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(logic.liquid.itemMeta), logic.liquid.itemMeta, x, y, z, renderer, world);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(logic.liquid.itemMeta), x, y, z, renderer, world);
}
}
}
@ -272,9 +272,9 @@ public class SearedRender implements ISimpleBlockRenderingHandler
Item liquidItem = Item.itemsList[blockToRender.itemID];
//ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
int meta = blockToRender.getItemDamage();
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(meta), meta, x, y, z, renderer, world);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(meta), x, y, z, renderer, world);
renderer.setRenderBounds(xMin, yMin, zMin, xMax, 0.625, zMax);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(meta), meta, x, y, z, renderer, world);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(meta), x, y, z, renderer, world);
}
//renderer.renderStandardBlock(block, x, y, z);
}
@ -365,7 +365,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
if (liquidItem != null)
{
//ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(logic.liquid.itemMeta), logic.liquid.itemMeta, x, y, z, renderer, world);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(logic.liquid.itemMeta), x, y, z, renderer, world);
}
}
}

View File

@ -75,7 +75,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
Item liquidItem = Item.itemsList[blockToRender.itemID];
//ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
int metadata = blockToRender.getItemDamage();
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), metadata, posX, posY + i / 9, posZ, renderer, world);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), posX, posY + i / 9, posZ, renderer, world);
}
}
}
@ -112,7 +112,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
Item liquidItem = Item.itemsList[liquid.itemID];
//ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
for (int i = 0; i < 9; i++)
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(liquid.itemMeta), liquid.itemMeta, posX, posY + yBase, posZ, renderer, world);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(liquid.itemMeta), posX, posY + yBase, posZ, renderer, world);
}
if (countSize == room)
@ -149,7 +149,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
{
Item liquidItem = Item.itemsList[blockToRender.itemID];
int metadata = blockToRender.getItemDamage();
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), metadata, posX + i % 3, posY, posZ + i / 3, renderer, world);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), posX + i % 3, posY, posZ + i / 3, renderer, world);
}
}
}

View File

@ -52,7 +52,7 @@ public class TankRender implements ISimpleBlockRenderingHandler
//Item
{
Item liquidItem = Item.itemsList[liquid.itemID];
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(liquid.itemMeta), liquid.itemMeta, x, y, z, renderer, world);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(liquid.itemMeta), x, y, z, renderer, world);
}
}

View File

@ -1,5 +1,6 @@
package mods.tinker.tconstruct.client.gui;
import mods.tinker.tconstruct.client.TControls;
import mods.tinker.tconstruct.inventory.ArmorExtendedContainer;
import mods.tinker.tconstruct.util.player.ArmorExtended;
import mods.tinker.tconstruct.util.player.TPlayerStats;
@ -121,4 +122,14 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
GL11.glDisable(GL11.GL_TEXTURE_2D);
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
/*protected void keyTyped(char par1, int par2)
{
if (par2 == TControls.armorKey.keyCode)
{
this.mc.thePlayer.closeScreen();
}
super.keyTyped(par1, par2);
}*/
}

View File

@ -644,7 +644,7 @@ public class TContent implements IFuelHandler
chiseling.addDetailing(Item.dyePowder, 4, multiBrick, 6, chisel);
chiseling.addDetailing(Item.diamond, 0, multiBrick, 7, chisel);
chiseling.addDetailing(Item.redstone, 0, multiBrick, 8, chisel);
chiseling.addDetailing(Block.obsidian, 0, multiBrick, 9, chisel);
chiseling.addDetailing(Item.bone, 0, multiBrick, 9, chisel);
chiseling.addDetailing(Item.slimeBall, 0, multiBrick, 10, chisel);
chiseling.addDetailing(strangeFood, 0, multiBrick, 11, chisel);

View File

@ -56,7 +56,7 @@ public class Rapier extends Weapon
public float chargeAttack ()
{
return 2f;
return 1.5f;
}
public boolean pierceArmor ()

View File

@ -486,6 +486,8 @@ public class AbilityHelper
}
public static void spawnItemAtPlayer (EntityPlayer player, ItemStack stack)
{
if (!player.inventory.addItemStackToInventory(stack))
{
if (!player.worldObj.isRemote)
{
@ -494,6 +496,11 @@ public class AbilityHelper
entityitem.onCollideWithPlayer(player);
}
}
else
{
player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F, ((random.nextFloat() - random.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
}
/* Ranged weapons */

View File

@ -487,7 +487,10 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
if (tags.getBoolean("Lava") && block.quantityDropped(meta, 0, random) != 0)
{
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(block.idDropped(bID, random, 0), 1, block.damageDropped(meta)));
ItemStack smeltStack = new ItemStack(block.idDropped(block.blockID, random, 0), 1, block.damageDropped(meta));
if (smeltStack.itemID < 0 || smeltStack.itemID >= 32000 || smeltStack.getItem() == null)
return false;
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(smeltStack);
if (result != null)
{
world.setBlockToAir(x, y, z);