mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-24 05:54:34 +00:00
Add my changes, Client runs, I broke Smeltery ATM, Needs to be fixed :)
This commit is contained in:
1 parent
57b6f72c2b
commit
c1a92807cd
22 files changed
+185
-81
No files matched your search
@@ -7,16 +7,14 @@ import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.*;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
import org.apache.logging.log4j.*;
|
||||
import org.apache.logging.log4j.core.config.LoggerConfig;
|
||||
|
||||
import tconstruct.achievements.TAchievements;
|
||||
import tconstruct.client.event.EventCloakRender;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.common.*;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.*;
|
||||
@@ -100,9 +98,12 @@ public class TConstruct
|
||||
basinCasting = new LiquidCasting();
|
||||
chiselDetailing = new Detailing();
|
||||
|
||||
recipes = new TRecipes();
|
||||
content = new TContent();
|
||||
|
||||
recipes = new TRecipes();
|
||||
|
||||
events = new TEventHandler();
|
||||
MinecraftForge.EVENT_BUS.register(events);
|
||||
MinecraftForge.EVENT_BUS.register(new TEventHandlerAchievement());
|
||||
recipes.oreRegistry();
|
||||
|
||||
@@ -128,11 +129,8 @@ public class TConstruct
|
||||
VillagerRegistry.instance().registerVillageCreationHandler(new VillageSmelteryHandler());
|
||||
try
|
||||
{
|
||||
// if (new CallableMinecraftVersion(null).minecraftVersion().equals("1.6.4"))
|
||||
// {
|
||||
MapGenStructureIO.func_143031_a(ComponentToolWorkshop.class, "TConstruct:ToolWorkshopStructure");
|
||||
MapGenStructureIO.func_143031_a(ComponentSmeltery.class, "TConstruct:SmelteryStructure");
|
||||
// }
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
@@ -142,7 +140,12 @@ public class TConstruct
|
||||
|
||||
playerTracker = new TPlayerHandler();
|
||||
//GameRegistry.registerPlayerTracker(playerTracker);
|
||||
MinecraftForge.EVENT_BUS.register(playerTracker);
|
||||
FMLCommonHandler.instance().bus().register(playerTracker);
|
||||
|
||||
if (event.getSide() == Side.CLIENT)
|
||||
{
|
||||
FMLCommonHandler.instance().bus().register(new TControls());
|
||||
}
|
||||
|
||||
PluginController.getController().preInit();
|
||||
}
|
||||
@@ -153,7 +156,7 @@ public class TConstruct
|
||||
packetPipeline.initalise();
|
||||
if (event.getSide() == Side.CLIENT)
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(new EventCloakRender());
|
||||
//MinecraftForge.EVENT_BUS.register(new EventCloakRender());
|
||||
}
|
||||
|
||||
DimensionBlacklist.getBadBimensions();
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.item.EntityFallingBlock;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFalling extends Block
|
||||
{
|
||||
public static boolean field_149832_M;
|
||||
|
||||
public BlockFalling()
|
||||
{
|
||||
super(Material.field_151596_z);
|
||||
this.func_149647_a(CreativeTabs.tabBlock);
|
||||
}
|
||||
|
||||
public BlockFalling(Material p_i45405_1_)
|
||||
{
|
||||
super(p_i45405_1_);
|
||||
}
|
||||
|
||||
public void func_149726_b(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)
|
||||
{
|
||||
p_149726_1_.func_147464_a(p_149726_2_, p_149726_3_, p_149726_4_, this, this.func_149738_a(p_149726_1_));
|
||||
}
|
||||
|
||||
public void func_149695_a(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
{
|
||||
p_149695_1_.func_147464_a(p_149695_2_, p_149695_3_, p_149695_4_, this, this.func_149738_a(p_149695_1_));
|
||||
}
|
||||
|
||||
public void func_149674_a(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
|
||||
{
|
||||
if (!p_149674_1_.isRemote)
|
||||
{
|
||||
this.func_149830_m(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
}
|
||||
}
|
||||
|
||||
private void func_149830_m(World p_149830_1_, int p_149830_2_, int p_149830_3_, int p_149830_4_)
|
||||
{
|
||||
if (func_149831_e(p_149830_1_, p_149830_2_, p_149830_3_ - 1, p_149830_4_) && p_149830_3_ >= 0)
|
||||
{
|
||||
byte b0 = 32;
|
||||
|
||||
if (!field_149832_M && p_149830_1_.checkChunksExist(p_149830_2_ - b0, p_149830_3_ - b0, p_149830_4_ - b0, p_149830_2_ + b0, p_149830_3_ + b0, p_149830_4_ + b0))
|
||||
{
|
||||
if (!p_149830_1_.isRemote)
|
||||
{
|
||||
//EntityFallingBlock entityfallingblock = new EntityFallingBlock(p_149830_1_, (double)((float)p_149830_2_ + 0.5F), (double)((float)p_149830_3_ + 0.5F), (double)((float)p_149830_4_ + 0.5F), this, p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_, p_149830_4_));
|
||||
//this.func_149829_a(entityfallingblock);
|
||||
//p_149830_1_.spawnEntityInWorld(entityfallingblock);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
p_149830_1_.func_147468_f(p_149830_2_, p_149830_3_, p_149830_4_);
|
||||
|
||||
while (func_149831_e(p_149830_1_, p_149830_2_, p_149830_3_ - 1, p_149830_4_) && p_149830_3_ > 0)
|
||||
{
|
||||
--p_149830_3_;
|
||||
}
|
||||
|
||||
if (p_149830_3_ > 0)
|
||||
{
|
||||
p_149830_1_.func_147449_b(p_149830_2_, p_149830_3_, p_149830_4_, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void func_149829_a(EntityFallingBlock p_149829_1_) {}
|
||||
|
||||
public int func_149738_a(World p_149738_1_)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public static boolean func_149831_e(World p_149831_0_, int p_149831_1_, int p_149831_2_, int p_149831_3_)
|
||||
{
|
||||
Block block = p_149831_0_.func_147439_a(p_149831_1_, p_149831_2_, p_149831_3_);
|
||||
|
||||
if (block.isAir(p_149831_0_, p_149831_1_, p_149831_2_, p_149831_3_))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (block == Blocks.fire)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO: King, take a look here when doing liquids!
|
||||
//Material material = block.field_149764_J;
|
||||
//return material == Material.field_151586_h ? true : material == Material.field_151587_i;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void func_149828_a(World p_149828_1_, int p_149828_2_, int p_149828_3_, int p_149828_4_, int p_149828_5_) {}
|
||||
}
|
||||
@@ -80,18 +80,6 @@ public class CraftingStationBlock extends InventoryBlock
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity (World world, int metadata)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
case 0:
|
||||
return new CraftingStationLogic();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer)
|
||||
{
|
||||
@@ -105,23 +93,16 @@ public class CraftingStationBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_149666_a (Item b, CreativeTabs tab, List list)
|
||||
public void func_149666_a (Item id, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < 1; iter++)
|
||||
{
|
||||
list.add(new ItemStack(b, 1, iter));
|
||||
list.add(new ItemStack(id, 1, iter));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity func_149915_a (World var1, int metadata)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
case 0:
|
||||
return new CraftingStationLogic();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public TileEntity func_149915_a(World arg0, int arg1) {
|
||||
return new CraftingStationLogic();
|
||||
}
|
||||
}
|
||||
@@ -41,13 +41,13 @@ public class EquipBlock extends InventoryBlock
|
||||
return new String[] { "toolstation_top" };
|
||||
}
|
||||
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
return Blocks.iron_block.func_149691_a(side, meta);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons (IIconRegister par1IconRegister)
|
||||
public void func_149651_a (IIconRegister par1IconRegister)
|
||||
{
|
||||
//this.blockIcon = par1iconRegister.registerIcon(Block.blockIron.getUnlocalizedName());
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class FurnaceSlab extends InventorySlab
|
||||
return icons[(meta % 8) * 3 + getTextureIndex(side)];
|
||||
}
|
||||
|
||||
public IIcon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
|
||||
public IIcon func_149673_e (IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
TileEntity logic = world.func_147438_o(x, y, z);
|
||||
short direction = (logic instanceof IFacingLogic) ? ((IFacingLogic) logic).getRenderDirection() : 0;
|
||||
|
||||
@@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GravelOre extends BlockSand
|
||||
public class GravelOre extends BlockFalling
|
||||
{
|
||||
public String[] textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt" };
|
||||
public IIcon[] icons;
|
||||
@@ -24,10 +24,11 @@ public class GravelOre extends BlockSand
|
||||
super();
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
this.field_149762_H = field_149767_g;
|
||||
this.field_149764_J = Material.field_151596_z;
|
||||
//this.field_149764_J = Material.field_151596_z;
|
||||
}
|
||||
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
@Override
|
||||
public void func_149651_a (IIconRegister iconRegister)
|
||||
{
|
||||
this.icons = new IIcon[textureNames.length];
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class LavaTankBlock extends BlockContainer
|
||||
return textureNames;
|
||||
}
|
||||
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
public void func_149651_a (IIconRegister iconRegister)
|
||||
{
|
||||
String[] textureNames = getTextureNames();
|
||||
this.icons = new IIcon[textureNames.length];
|
||||
@@ -120,7 +120,7 @@ public class LavaTankBlock extends BlockContainer
|
||||
return TankRender.tankModelID;
|
||||
}
|
||||
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
if (meta >= 3)
|
||||
meta = 0;
|
||||
|
||||
@@ -212,7 +212,7 @@ public class SearedBlock extends InventoryBlock
|
||||
return textureNames;
|
||||
}
|
||||
|
||||
//TODO getIcon
|
||||
//TODO func_149691_a
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
|
||||
@@ -70,7 +70,7 @@ public class SmelteryBlock extends InventoryBlock
|
||||
return textureNames;
|
||||
}
|
||||
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
if (meta < 2)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ public class SmelteryBlock extends InventoryBlock
|
||||
return icons[3 + meta];
|
||||
}
|
||||
|
||||
public IIcon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
|
||||
public IIcon func_149673_e (IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
TileEntity logic = world.func_147438_o(x, y, z);
|
||||
short direction = (logic instanceof IFacingLogic) ? ((IFacingLogic) logic).getRenderDirection() : 0;
|
||||
|
||||
@@ -38,7 +38,7 @@ public class SoilSlab extends SlabBase
|
||||
switch (meta % 8)
|
||||
{
|
||||
case 0:
|
||||
return this.field_149761_L;//Block.grass.getIcon(1, 0);
|
||||
return this.field_149761_L;//Block.grass.func_149691_a(1, 0);
|
||||
case 1:
|
||||
return Blocks.dirt.func_149691_a(side, 0);
|
||||
case 2:
|
||||
|
||||
@@ -149,7 +149,7 @@ public class StoneTorch extends MantleBlock
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons (IIconRegister par1IconRegister)
|
||||
public void func_149651_a (IIconRegister par1IconRegister)
|
||||
{
|
||||
this.field_149761_L = par1IconRegister.registerIcon("tinker:torch_stone");
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TConstructFluid extends BlockFluidClassic
|
||||
{
|
||||
return alpha ? 1 : 0;
|
||||
}
|
||||
//TODO registerIcons
|
||||
//TODO func_149651_a
|
||||
@Override
|
||||
public void func_149651_a (IIconRegister iconRegister)
|
||||
{
|
||||
@@ -41,7 +41,7 @@ public class TConstructFluid extends BlockFluidClassic
|
||||
flowIcon = iconRegister.registerIcon("tinker:" + texture + "_flow");
|
||||
}
|
||||
|
||||
//TODO getIcon()
|
||||
//TODO func_149691_a()
|
||||
@Override
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ public class TankAirBlock extends BlockContainer
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons (IIconRegister par1IconRegister)
|
||||
public void func_149651_a (IIconRegister par1IconRegister)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class WoodRail extends BlockRailBase
|
||||
/**
|
||||
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
|
||||
*/
|
||||
public IIcon getIcon (int par1, int par2)
|
||||
public IIcon func_149691_a (int par1, int par2)
|
||||
{
|
||||
return par2 >= 6 ? this.theIcon : this.field_149761_L;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public class WoodRail extends BlockRailBase
|
||||
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
|
||||
* is the only chance you get to register icons.
|
||||
*/
|
||||
public void registerIcons (IIconRegister par1IconRegister)
|
||||
public void func_149651_a (IIconRegister par1IconRegister)
|
||||
{
|
||||
this.field_149761_L = par1IconRegister.registerIcon("tinker:woodrail");
|
||||
this.theIcon = par1IconRegister.registerIcon("tinker:woodrail_turn");
|
||||
|
||||
@@ -38,7 +38,7 @@ public class SlimeTallGrass extends BlockBush implements IShearable
|
||||
/**
|
||||
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
|
||||
*/
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
/*if (meta >= this.iconArray.length)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ public class SlimeTallGrass extends BlockBush implements IShearable
|
||||
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
|
||||
* is the only chance you get to register icons.
|
||||
*/
|
||||
public void registerIcons (IIconRegister par1IconRegister)
|
||||
public void func_149651_a (IIconRegister par1IconRegister)
|
||||
{
|
||||
this.iconArray = new IIcon[grassTypes.length];
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BarricadeBlock extends MantleBlock
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
}
|
||||
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
return modelBlock.func_149691_a(2, modelMeta);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Landmine extends MantleBlock
|
||||
this.func_149676_a(var5, 0.0F, var5, 1.0F - var5, 0.03125F, 1.0F - var5);
|
||||
}
|
||||
|
||||
public IIcon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
|
||||
public IIcon func_149673_e (IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
Block block = world.func_147439_a(x, y - 1, z);
|
||||
if (block != null)
|
||||
@@ -46,12 +46,12 @@ public class Landmine extends MantleBlock
|
||||
return Blocks.sponge.func_149691_a(side, world.getBlockMetadata(x, y, z));
|
||||
}
|
||||
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
return Blocks.sponge.func_149691_a(1, meta);
|
||||
}
|
||||
|
||||
public void registerIcons (IIconRegister par1IconRegister)
|
||||
public void func_149651_a (IIconRegister par1IconRegister)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import net.minecraft.client.model.ModelSlime;
|
||||
import net.minecraft.client.particle.*;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.entity.*;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.settings.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -125,27 +126,27 @@ public class TProxyClient extends TProxyCommon
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderblocks.func_147768_a(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(0, meta));
|
||||
renderblocks.func_147768_a(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(0, meta)));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderblocks.func_147806_b(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(1, meta));
|
||||
renderblocks.func_147806_b(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(1, meta)));//block.func_149691_a(1, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderblocks.func_147761_c(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(2, meta));
|
||||
renderblocks.func_147761_c(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(2, meta)));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderblocks.func_147734_d(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(3, meta));
|
||||
renderblocks.func_147734_d(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(3, meta)));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderblocks.func_147798_e(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(4, meta));
|
||||
renderblocks.func_147798_e(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(4, meta)));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderblocks.func_147764_f(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(5, meta));
|
||||
renderblocks.func_147764_f(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(5, meta)));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
@@ -159,27 +160,27 @@ public class TProxyClient extends TProxyCommon
|
||||
GL11.glRotatef(60, 1, 0, 0);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderblocks.func_147768_a(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(0, meta));
|
||||
renderblocks.func_147768_a(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(0, meta)));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderblocks.func_147806_b(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(1, meta));
|
||||
renderblocks.func_147806_b(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(1, meta)));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderblocks.func_147761_c(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(2, meta));
|
||||
renderblocks.func_147761_c(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(2, meta)));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderblocks.func_147734_d(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(3, meta));
|
||||
renderblocks.func_147734_d(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(3, meta)));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderblocks.func_147798_e(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(4, meta));
|
||||
renderblocks.func_147798_e(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(4, meta)));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderblocks.func_147764_f(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(5, meta));
|
||||
renderblocks.func_147764_f(block, 0.0D, 0.0D, 0.0D, getIcon(block.func_149691_a(5, meta)));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
@@ -946,5 +947,11 @@ public class TProxyClient extends TProxyCommon
|
||||
{
|
||||
//MinecraftForgeClient.registerItemRenderer(TRepo.armorPattern.itemID, new RenderArmorCast());
|
||||
}
|
||||
|
||||
private static IIcon getIcon(IIcon icon)
|
||||
{
|
||||
if (icon != null) return icon;
|
||||
return ((TextureMap)Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,7 +20,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
public static int smelteryModel = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
if (modelID == smelteryModel)
|
||||
{
|
||||
|
||||
@@ -67,9 +67,9 @@ public class Smeltery
|
||||
*/
|
||||
public static void addMelting (ItemStack input, Item item, int metadata, int temperature, FluidStack liquid)
|
||||
{
|
||||
instance.smeltingList.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), liquid);
|
||||
instance.temperatureList.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), temperature);
|
||||
instance.renderIndex.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), new ItemStack(item, input.stackSize, metadata));
|
||||
//instance.smeltingList.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), liquid);
|
||||
//instance.temperatureList.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), temperature);
|
||||
//instance.renderIndex.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), new ItemStack(item, input.stackSize, metadata));
|
||||
}
|
||||
|
||||
/** Adds an alloy mixing recipe.
|
||||
|
||||
@@ -2,7 +2,7 @@ package tconstruct.util.player;
|
||||
|
||||
import cpw.mods.fml.common.*;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.*;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -33,24 +33,24 @@ public class TPlayerHandler
|
||||
public ConcurrentHashMap<String, TPlayerStats> playerStats = new ConcurrentHashMap<String, TPlayerStats>();
|
||||
|
||||
@SubscribeEvent
|
||||
public void PlayerLoggedInEvent (PlayerEvent event)
|
||||
public void PlayerLoggedInEvent (PlayerLoggedInEvent event)
|
||||
{
|
||||
onPlayerLogin(event.player);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void PlayerLoggedOutEvent (PlayerEvent event)
|
||||
public void PlayerLoggedOutEvent (PlayerLoggedOutEvent event)
|
||||
{
|
||||
savePlayerStats(event.player, true);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerChangedDimension (PlayerEvent event)
|
||||
public void onPlayerChangedDimension (PlayerChangedDimensionEvent event)
|
||||
{
|
||||
savePlayerStats(event.player, false);
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void onPlayerRespawn (PlayerEvent event)
|
||||
public void onPlayerRespawn (PlayerRespawnEvent event)
|
||||
{
|
||||
onPlayerRespawn(event.player);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user