ReworkedExtraInfoLoading

This commit is contained in:
DarkGuardsman 2013-09-22 00:05:28 -04:00
parent 50d359f048
commit dc6e0ccb3d
4 changed files with 30 additions and 27 deletions

View file

@ -10,7 +10,7 @@ import dark.core.common.DMCreativeTab;
import dark.core.prefab.machine.BlockMachine; import dark.core.prefab.machine.BlockMachine;
import dark.core.registration.ModObjectRegistry.BlockBuildData; import dark.core.registration.ModObjectRegistry.BlockBuildData;
public abstract class BlockAssembly extends BlockMachine public class BlockAssembly extends BlockMachine
{ {
public Icon machine_icon; public Icon machine_icon;

View file

@ -20,10 +20,11 @@ import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.client.render.BlockRenderingHandler; import dark.assembly.client.render.BlockRenderingHandler;
import dark.assembly.common.machine.BlockAssembly; import dark.assembly.common.machine.BlockAssembly;
import dark.assembly.common.machine.belt.TileEntityConveyorBelt.SlantType; import dark.assembly.common.machine.belt.TileEntityConveyorBelt.SlantType;
import dark.core.common.DarkMain;
import dark.core.registration.ModObjectRegistry.BlockBuildData; import dark.core.registration.ModObjectRegistry.BlockBuildData;
/** The block for the actual conveyor belt! /** The block for the actual conveyor belt!
* *
* @author Calclavia, DarkGuardsman */ * @author Calclavia, DarkGuardsman */
public class BlockConveyorBelt extends BlockAssembly public class BlockConveyorBelt extends BlockAssembly
{ {
@ -335,7 +336,7 @@ public class BlockConveyorBelt extends BlockAssembly
@Override @Override
public int getRenderType() public int getRenderType()
{ {
return BlockRenderingHandler.BLOCK_RENDER_ID; return DarkMain.zeroRendering ? 0 : BlockRenderingHandler.BLOCK_RENDER_ID;
} }
@Override @Override

View file

@ -18,10 +18,11 @@ import universalelectricity.prefab.tile.IRotatable;
import dark.assembly.api.IBelt; import dark.assembly.api.IBelt;
import dark.assembly.common.AssemblyLine; import dark.assembly.common.AssemblyLine;
import dark.assembly.common.machine.TileEntityAssembly; import dark.assembly.common.machine.TileEntityAssembly;
import dark.core.common.DarkMain;
import dark.core.network.PacketHandler; import dark.core.network.PacketHandler;
/** Conveyer belt TileEntity that allows entities of all kinds to be moved /** Conveyer belt TileEntity that allows entities of all kinds to be moved
* *
* @author DarkGuardsman */ * @author DarkGuardsman */
public class TileEntityConveyorBelt extends TileEntityAssembly implements IPacketReceiver, IBelt, IRotatable public class TileEntityConveyorBelt extends TileEntityAssembly implements IPacketReceiver, IBelt, IRotatable
{ {
@ -74,27 +75,29 @@ public class TileEntityConveyorBelt extends TileEntityAssembly implements IPacke
{ {
this.worldObj.playSound(this.xCoord, this.yCoord, this.zCoord, "mods.assemblyline.conveyor", 0.5f, 0.7f, true); this.worldObj.playSound(this.xCoord, this.yCoord, this.zCoord, "mods.assemblyline.conveyor", 0.5f, 0.7f, true);
} }
if (!DarkMain.zeroAnimation)
this.wheelRotation = (40 + this.wheelRotation) % 360;
float wheelRotPct = wheelRotation / 360f;
// Sync the animation. Slant belts are slower.
if (this.getSlant() == SlantType.NONE || this.getSlant() == SlantType.TOP)
{ {
this.animFrame = (int) (wheelRotPct * MAX_FRAME); this.wheelRotation = (40 + this.wheelRotation) % 360;
if (this.animFrame < 0)
this.animFrame = 0; float wheelRotPct = wheelRotation / 360f;
if (this.animFrame > MAX_FRAME)
this.animFrame = MAX_FRAME; // Sync the animation. Slant belts are slower.
} if (this.getSlant() == SlantType.NONE || this.getSlant() == SlantType.TOP)
else {
{ this.animFrame = (int) (wheelRotPct * MAX_FRAME);
this.animFrame = (int) (wheelRotPct * MAX_SLANT_FRAME); if (this.animFrame < 0)
if (this.animFrame < 0) this.animFrame = 0;
this.animFrame = 0; if (this.animFrame > MAX_FRAME)
if (this.animFrame > MAX_SLANT_FRAME) this.animFrame = MAX_FRAME;
this.animFrame = MAX_SLANT_FRAME; }
else
{
this.animFrame = (int) (wheelRotPct * MAX_SLANT_FRAME);
if (this.animFrame < 0)
this.animFrame = 0;
if (this.animFrame > MAX_SLANT_FRAME)
this.animFrame = MAX_SLANT_FRAME;
}
} }
} }

View file

@ -14,7 +14,6 @@ import net.minecraftforge.common.Configuration;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import universalelectricity.core.UniversalElectricity; import universalelectricity.core.UniversalElectricity;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import dark.api.ProcessorRecipes.ProcessorType; import dark.api.ProcessorRecipes.ProcessorType;
@ -22,12 +21,11 @@ import dark.assembly.client.render.BlockRenderingHandler;
import dark.assembly.common.AssemblyLine; import dark.assembly.common.AssemblyLine;
import dark.assembly.common.CommonProxy; import dark.assembly.common.CommonProxy;
import dark.core.common.DMCreativeTab; import dark.core.common.DMCreativeTab;
import dark.core.prefab.IExtraObjectInfo;
import dark.core.prefab.helpers.Pair; import dark.core.prefab.helpers.Pair;
import dark.core.prefab.machine.BlockMachine; import dark.core.prefab.machine.BlockMachine;
import dark.core.registration.ModObjectRegistry.BlockBuildData; import dark.core.registration.ModObjectRegistry.BlockBuildData;
public class BlockProcessor extends BlockMachine implements IExtraObjectInfo public class BlockProcessor extends BlockMachine
{ {
public BlockProcessor() public BlockProcessor()
@ -90,6 +88,7 @@ public class BlockProcessor extends BlockMachine implements IExtraObjectInfo
@Override @Override
public void loadExtraConfigs(Configuration config) public void loadExtraConfigs(Configuration config)
{ {
super.loadExtraConfigs(config);
for (ProcessorData data : ProcessorData.values()) for (ProcessorData data : ProcessorData.values())
{ {
data.enabled = config.get(data.unlocalizedName, "Enabled", true).getBoolean(true); data.enabled = config.get(data.unlocalizedName, "Enabled", true).getBoolean(true);