RC4
This commit is contained in:
parent
647e2e1cbf
commit
9843a83b7f
@ -38,7 +38,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry;
|
||||
* @dependencies: IC2 API, MFR API
|
||||
*/
|
||||
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.5.RC2", dependencies = "required-after:Forge@[7.7.1.675,)")
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.5.RC4", 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
|
||||
{
|
||||
|
56
mods/tinker/tconstruct/blocks/LightCrystalBase.java
Normal file
56
mods/tinker/tconstruct/blocks/LightCrystalBase.java
Normal file
@ -0,0 +1,56 @@
|
||||
package mods.tinker.tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mods.natura.common.NContent;
|
||||
import mods.tinker.tconstruct.client.block.CrystalBlockRender;
|
||||
import mods.tinker.tconstruct.library.TConstructRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class LightCrystalBase extends Block
|
||||
{
|
||||
public LightCrystalBase(int id)
|
||||
{
|
||||
super(id, Material.glass);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon (int side, int meta)
|
||||
{
|
||||
if (meta < 5)
|
||||
return Block.glowStone.getIcon(side, meta);
|
||||
return Block.blockNetherQuartz.getIcon(side, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
{
|
||||
return CrystalBlockRender.model;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < 10; iter++)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, iter));
|
||||
}
|
||||
}
|
||||
}
|
@ -8,72 +8,20 @@ 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.GlowstoneAggregator;
|
||||
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.SmelteryLogic;
|
||||
import mods.tinker.tconstruct.blocks.logic.StencilTableLogic;
|
||||
import mods.tinker.tconstruct.blocks.logic.ToolForgeLogic;
|
||||
import mods.tinker.tconstruct.blocks.logic.ToolStationLogic;
|
||||
import mods.tinker.tconstruct.client.block.BarricadeRender;
|
||||
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.TableForgeRender;
|
||||
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.CloneHeadModel;
|
||||
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.SlimeCloneRender;
|
||||
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.GlowstoneAggregatorGui;
|
||||
import mods.tinker.tconstruct.client.gui.GuiManual;
|
||||
import mods.tinker.tconstruct.client.gui.InventoryTab;
|
||||
import mods.tinker.tconstruct.client.gui.KnapsackGui;
|
||||
import mods.tinker.tconstruct.client.gui.PartCrafterGui;
|
||||
import mods.tinker.tconstruct.client.gui.PatternChestGui;
|
||||
import mods.tinker.tconstruct.client.gui.SmelteryGui;
|
||||
import mods.tinker.tconstruct.client.gui.StencilTableGui;
|
||||
import mods.tinker.tconstruct.client.gui.ToolForgeGui;
|
||||
import mods.tinker.tconstruct.client.gui.ToolStationGui;
|
||||
import mods.tinker.tconstruct.common.TContent;
|
||||
import mods.tinker.tconstruct.common.TProxyCommon;
|
||||
import mods.tinker.tconstruct.entity.Automaton;
|
||||
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.Skyla;
|
||||
import mods.tinker.tconstruct.entity.SlimeClone;
|
||||
import mods.tinker.tconstruct.entity.projectile.DaggerEntity;
|
||||
import mods.tinker.tconstruct.entity.projectile.LaunchedPotion;
|
||||
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.util.player.KnapsackInventory;
|
||||
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.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;
|
||||
@ -284,6 +232,7 @@ public class TProxyClient extends TProxyCommon
|
||||
RenderingRegistry.registerBlockHandler(new GolemCoreRender());
|
||||
RenderingRegistry.registerBlockHandler(new OreberryRender());
|
||||
RenderingRegistry.registerBlockHandler(new BarricadeRender());
|
||||
RenderingRegistry.registerBlockHandler(new CrystalBlockRender());
|
||||
//RenderingRegistry.registerBlockHandler(new BrickRender());
|
||||
//RenderingRegistry.registerBlockHandler(new BallRepeaterRender());
|
||||
|
||||
|
126
mods/tinker/tconstruct/client/block/CrystalBlockRender.java
Normal file
126
mods/tinker/tconstruct/client/block/CrystalBlockRender.java
Normal file
@ -0,0 +1,126 @@
|
||||
package mods.tinker.tconstruct.client.block;
|
||||
|
||||
import mods.tinker.tconstruct.client.TProxyClient;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class CrystalBlockRender implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
public static int model = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
if (modelID == model)
|
||||
{
|
||||
renderer.setRenderBounds(0.375F, 0.0F, 0.375F, 0.625F, 0.125F, 0.625F);
|
||||
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.3125F, 0.125F, 0.3125F, 0.6875F, 0.25F, 0.6875F);
|
||||
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F);
|
||||
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.3125F, 0.75F, 0.3125F, 0.6875F, 0.875F, 0.6875F);
|
||||
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.375F, 0.875F, 0.375F, 0.625F, 1.0F, 0.625F);
|
||||
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
if (modelID == model)
|
||||
{
|
||||
int metadata = world.getBlockMetadata(x, y, z) % 5;
|
||||
|
||||
if (metadata != 3)
|
||||
{
|
||||
renderer.setRenderBounds(0.0625F, 0.0F, 0.0625F, 0.25F, 0.0625F, 0.375F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.5F, 0.0F, 0.75F, 0.625F, 0.125F, 0.8125F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.5F, 0.0F, 0.8125F, 0.5625F, 0.0625F, 0.875F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
if (metadata == 0)
|
||||
{
|
||||
renderer.setRenderBounds(0.375F, 0.0F, 0.375F, 0.625F, 0.125F, 0.625F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
else if (metadata == 1)
|
||||
{
|
||||
renderer.setRenderBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.25, 0.6875F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.375F, 0.25, 0.375F, 0.625F, 0.375, 0.625F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.1875, 0.0F, 0.5F, 0.3125F, 0.1875, 0.75F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.4325F, 0.0F, 0.1875, 0.625, 0.125, 0.3125F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.625F, 0.0F, 0.5F, 0.8125f, 0.125, 0.75F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
else if (metadata == 2)
|
||||
{
|
||||
renderer.setRenderBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.5F, 0.6875F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.375F, 0.5F, 0.375F, 0.625F, 0.625F, 0.625F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.125F, 0.0F, 0.5F, 0.3125F, 0.25F, 0.75F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.4325F, 0.0F, 0.125F, 0.6875F, 0.375F, 0.3125F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.625F, 0.0F, 0.5F, 0.8125f, 0.375F, 0.75F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
else if (metadata == 3)
|
||||
{
|
||||
renderer.setRenderBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.75F, 0.75F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.3125F, 0.75F, 0.3125F, 0.6875F, 0.875F, 0.6875F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.375F, 0.875F, 0.375F, 0.625F, 0.9325F, 0.625F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
|
||||
renderer.setRenderBounds(0.125F, 0.0F, 0.5F, 0.375F, 0.375, 0.875F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.4325F, 0.0F, 0.0625, 0.625, 0.5, 0.3125F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.625F, 0.0F, 0.5F, 0.875F, 0.625, 0.875F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
else if (metadata == 4)
|
||||
{
|
||||
/*renderer.setRenderBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.75F, 0.75F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.3125F, 0.75F, 0.3125F, 0.6875F, 0.875F, 0.6875F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.375F, 0.875F, 0.375F, 0.625F, 0.9325F, 0.625F);
|
||||
renderer.renderStandardBlock(block, x, y, z);*/
|
||||
|
||||
renderer.setRenderBounds(0.125F, 0.0F, 0.5F, 0.375F, 0.125F, 0.75F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.4325F, 0.0F, 0.0625, 0.625, 0.25F, 0.3125F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.625F, 0.0F, 0.5F, 0.75F, 0.1875F, 0.75F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId ()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
}
|
@ -139,7 +139,9 @@ public class TContent implements IFuelHandler
|
||||
//InfiBlocks
|
||||
public static Block speedBlock;
|
||||
|
||||
//Crystalline
|
||||
public static Block aggregator;
|
||||
public static Block lightCrystalBase;
|
||||
|
||||
//Liquids
|
||||
public static Block liquidMetalFlowing;
|
||||
@ -359,8 +361,13 @@ public class TContent implements IFuelHandler
|
||||
GameRegistry.registerBlock(speedBlock, SpeedBlockItem.class, "SpeedBlock");
|
||||
|
||||
aggregator = new Aggregator(PHConstruct.aggregator).setUnlocalizedName("Aggregator");
|
||||
aggregator.stepSound = Block.soundMetalFootstep;
|
||||
GameRegistry.registerBlock(aggregator, "Aggregator");
|
||||
GameRegistry.registerTileEntity(GlowstoneAggregator.class, "GlowstoneAggregator");
|
||||
|
||||
/*lightCrystalBase = new LightCrystalBase(PHConstruct.lightCrystalBase).setUnlocalizedName("LightCrystalBase");
|
||||
lightCrystalBase.stepSound = Block.soundGlassFootstep;
|
||||
GameRegistry.registerBlock(lightCrystalBase, LightCrystalItem.class, "LightCrystalBase");*/
|
||||
|
||||
/*redstoneBallRepeater = new RedstoneBallRepeater(PHConstruct.redstoneBallRepeater, false).setUnlocalizedName("decoration.redstoneballrepeater");
|
||||
GameRegistry.registerBlock(redstoneBallRepeater, "decoration.redstoneballrepeater");
|
||||
|
@ -166,6 +166,7 @@ public class TProxyCommon implements IGuiHandler
|
||||
LanguageRegistry.addName(TContent.battleaxe, "Battleaxe");
|
||||
LanguageRegistry.addName(TContent.cutlass, "Cutlass");
|
||||
LanguageRegistry.addName(TContent.aggregator, "Glowstone Aggregator");
|
||||
//LanguageRegistry.addName(TContent.lightCrystalBase, "Lightstone Crystal");
|
||||
LanguageRegistry.addName(TContent.knapsack, "Knapsack");
|
||||
|
||||
}
|
||||
|
33
mods/tinker/tconstruct/items/blocks/LightCrystalItem.java
Normal file
33
mods/tinker/tconstruct/items/blocks/LightCrystalItem.java
Normal file
@ -0,0 +1,33 @@
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class LightCrystalItem extends ItemBlock
|
||||
{
|
||||
public static final String blockType[] =
|
||||
{
|
||||
"Crafter", "Parts", "Parts", "Parts", "Parts", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternChest",
|
||||
"PatternShaper", "PatternShaper", "PatternShaper", "PatternShaper", "CastingTable"
|
||||
};
|
||||
|
||||
public LightCrystalItem(int id)
|
||||
{
|
||||
super(id);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
/*@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("ToolStation.").append(blockType[pos]).toString();
|
||||
}*/
|
||||
}
|
@ -145,7 +145,10 @@ public class TConstructRegistry
|
||||
|
||||
public static ItemStack getPartMapping(int itemID, int metadata, int materialID)
|
||||
{
|
||||
return patternPartMapping.get(Arrays.asList(itemID, metadata, materialID)).copy();
|
||||
ItemStack stack = patternPartMapping.get(Arrays.asList(itemID, metadata, materialID));
|
||||
if (stack != null)
|
||||
return stack.copy();
|
||||
return null;
|
||||
}
|
||||
|
||||
//Tools
|
||||
|
@ -90,6 +90,7 @@ public class PHConstruct
|
||||
multiBrickFancy = config.getBlock("Multi Brick Fancy", 1467).getInt(1467);
|
||||
|
||||
aggregator = config.getBlock("Aggregator", 3221).getInt(3221);
|
||||
//lightCrystalBase = config.getBlock("Light Crystal", 3222).getInt(3222);
|
||||
|
||||
/*golemCore = config.getBlock("Golem Core", 1481).getInt(1481);
|
||||
golemHead = config.getBlock("Golem Head", 1482).getInt(1482);*/
|
||||
@ -286,7 +287,9 @@ public class PHConstruct
|
||||
//InfiBlocks
|
||||
public static int speedBlock;
|
||||
|
||||
//Crystalline
|
||||
public static int aggregator;
|
||||
public static int lightCrystalBase;
|
||||
|
||||
//Liquids
|
||||
public static int metalFlowing;
|
||||
|
Loading…
x
Reference in New Issue
Block a user