minor corrections
This commit is contained in:
parent
57f214edac
commit
023e752f4f
4 changed files with 57 additions and 17 deletions
|
@ -13,6 +13,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import dark.assembly.client.model.ModelConveyorBelt;
|
||||
import dark.assembly.client.model.ModelCrusher;
|
||||
import dark.assembly.client.model.ModelManipulator;
|
||||
import dark.assembly.client.model.ModelRejectorPiston;
|
||||
import dark.assembly.common.AssemblyLine;
|
||||
|
@ -25,6 +26,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
|||
private ModelConveyorBelt modelConveyorBelt = new ModelConveyorBelt();
|
||||
private ModelRejectorPiston modelEjector = new ModelRejectorPiston();
|
||||
private ModelManipulator modelInjector = new ModelManipulator();
|
||||
private ModelCrusher modelCrushor = new ModelCrusher();
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
|
@ -90,6 +92,17 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
|||
RenderCraneFrame.MODEL.render(true, true, false, false, false, false, false);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if (block.blockID == AssemblyLine.processorMachine.blockID && metadata == 0)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "CrusherBlock.png"));
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0f, 1f, 0f);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
GL11.glRotatef(-90f, 0f, 1f, 0f);
|
||||
this.modelCrushor.renderBody(0.0625f);
|
||||
this.modelCrushor.renderPiston(0.0625f, 4);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
|
||||
|
@ -50,13 +51,15 @@ import dark.assembly.common.machine.crane.TileEntityCraneRail;
|
|||
import dark.assembly.common.machine.encoder.BlockEncoder;
|
||||
import dark.assembly.common.machine.encoder.ItemDisk;
|
||||
import dark.assembly.common.machine.encoder.TileEntityEncoder;
|
||||
import dark.assembly.common.machine.processor.BlockProcessor;
|
||||
import dark.core.common.BlockRegistry.BlockData;
|
||||
import dark.core.common.DarkMain;
|
||||
import dark.core.prefab.ModPrefab;
|
||||
import dark.core.prefab.items.ItemBlockHolder;
|
||||
|
||||
@ModstatInfo(prefix = "asmline")
|
||||
@Mod(modid = AssemblyLine.MOD_ID, name = AssemblyLine.MOD_NAME, version = DarkMain.VERSION, dependencies = "required-after:DarkCore", useMetadata = true)
|
||||
@NetworkMod( clientSideRequired = true, serverSideRequired = false)
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class AssemblyLine extends ModPrefab
|
||||
{
|
||||
|
||||
|
@ -69,7 +72,6 @@ public class AssemblyLine extends ModPrefab
|
|||
public static final String MOD_ID = "AssemblyLine";
|
||||
public static final String MOD_NAME = "Assembly Line";
|
||||
|
||||
|
||||
@SidedProxy(clientSide = "dark.assembly.client.ClientProxy", serverSide = "dark.assembly.common.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
|
@ -94,6 +96,8 @@ public class AssemblyLine extends ModPrefab
|
|||
public static boolean REQUIRE_NO_POWER = false;
|
||||
public static boolean VINALLA_RECIPES = false;
|
||||
|
||||
public static Block processorMachine;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
|
@ -164,6 +168,8 @@ public class AssemblyLine extends ModPrefab
|
|||
recipeLoader.blockCraneController = new BlockCraneController(getNextID());
|
||||
recipeLoader.blockCraneFrame = new BlockCraneFrame(getNextID());
|
||||
recipeLoader.blockTurntable = new BlockTurntable(getNextID());
|
||||
this.processorMachine = new BlockProcessor(getNextID());
|
||||
dataList.add(new BlockData(this.processorMachine, ItemBlockHolder.class, "OreProcessor"));
|
||||
|
||||
recipeLoader.itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt());
|
||||
recipeLoader.itemDisk = new ItemDisk(CONFIGURATION.getItem("Disk", ITEM_ID_PREFIX + 1).getInt());
|
||||
|
|
|
@ -11,9 +11,9 @@ import net.minecraftforge.common.Configuration;
|
|||
import universalelectricity.core.UniversalElectricity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import dark.assembly.client.render.BlockRenderingHandler;
|
||||
import dark.assembly.common.AssemblyLine;
|
||||
import dark.assembly.common.TabAssemblyLine;
|
||||
import dark.assembly.common.machine.processor.ProcessorRecipes.ProcessorType;
|
||||
import dark.core.common.DarkMain;
|
||||
import dark.core.prefab.BlockMachine;
|
||||
import dark.core.prefab.IExtraObjectInfo;
|
||||
|
@ -21,6 +21,9 @@ import dark.core.prefab.helpers.Pair;
|
|||
|
||||
public class BlockProcessor extends BlockMachine implements IExtraObjectInfo
|
||||
{
|
||||
public static float crusherWattPerTick = .125f;
|
||||
public static float grinderWattPerTick = .125f;
|
||||
public static float pressWattPerTick = .2f;
|
||||
|
||||
public BlockProcessor(int blockID)
|
||||
{
|
||||
|
@ -86,25 +89,21 @@ public class BlockProcessor extends BlockMachine implements IExtraObjectInfo
|
|||
@Override
|
||||
public TileEntity createTileEntity(World world, int metadata)
|
||||
{
|
||||
if (metadata == 0 || metadata == 1)
|
||||
{
|
||||
return new TileEntityProcessor(ProcessorType.CRUSHER);
|
||||
}
|
||||
return super.createTileEntity(world, metadata);
|
||||
return new TileEntityProcessor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasExtraConfigs()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadExtraConfigs(Configuration config)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
crusherWattPerTick = (float) (config.get("settings", "CrusherWattPerTick", 125).getDouble(125) / 1000);
|
||||
grinderWattPerTick = (float) (config.get("settings", "GrinderWattPerTick", 125).getDouble(125) / 1000);
|
||||
pressWattPerTick = (float) (config.get("settings", "PressWattPerTick", 200).getDouble(200) / 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -121,4 +120,24 @@ public class BlockProcessor extends BlockMachine implements IExtraObjectInfo
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return BlockRenderingHandler.BLOCK_RENDER_ID;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,14 +21,16 @@ public class TileEntityProcessor extends TileEntityMachine
|
|||
|
||||
public ProcessorType type;
|
||||
|
||||
public TileEntityProcessor(ProcessorType type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
if (this.type == null)
|
||||
{
|
||||
if (this.getBlockMetadata() == 0 || this.getBlockMetadata() == 1)
|
||||
{
|
||||
this.type = ProcessorType.CRUSHER;
|
||||
}
|
||||
}
|
||||
super.updateEntity();
|
||||
if (this.running)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue