Work on transmitters
This commit is contained in:
parent
b387c8529d
commit
c72e1c6efc
7 changed files with 31 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
minecraft_version=1.7.2
|
||||
forge_version=10.12.1.1060
|
||||
forge_version=10.12.1.1065
|
||||
FMP_version=1.1.0.275
|
||||
CCLIB_version=1.1.0.76
|
||||
NEI_version=rc2
|
||||
|
|
|
@ -7,6 +7,7 @@ import mekanism.api.Coord4D;
|
|||
import mekanism.client.model.ModelTransporterBox;
|
||||
import mekanism.client.render.MekanismRenderer.DisplayInteger;
|
||||
import mekanism.client.render.MekanismRenderer.Model3D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.item.ItemConfigurator;
|
||||
import mekanism.common.multipart.PartDiversionTransporter;
|
||||
import mekanism.common.multipart.PartLogisticalTransporter;
|
||||
|
@ -23,6 +24,7 @@ import mekanism.common.util.MekanismUtils;
|
|||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.common.util.TransporterUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -546,12 +548,24 @@ public class RenderPartTransmitter implements IIconSelfRegister
|
|||
|
||||
public void renderPart(IIcon icon, CCModel cc, double x, double y, double z, Colour color)
|
||||
{
|
||||
cc.render(0, cc.verts.length, new Translation(x, y, z), new IconTransformation(icon), new ColourMultiplier(color.rgba()));
|
||||
if(color != null)
|
||||
{
|
||||
cc.render(0, cc.verts.length, new Translation(x, y, z), new IconTransformation(icon), new ColourMultiplier(color.rgba()));
|
||||
}
|
||||
else {
|
||||
cc.render(0, cc.verts.length, new Translation(x, y, z), new IconTransformation(icon));
|
||||
}
|
||||
}
|
||||
|
||||
public void renderTransparency(IIcon icon, CCModel cc, Colour color)
|
||||
{
|
||||
cc.render(0, cc.verts.length, new Translation(0, 0, 0), new IconTransformation(icon), new ColourMultiplier(color.rgba()));
|
||||
if(color != null)
|
||||
{
|
||||
cc.render(0, cc.verts.length, new Translation(0, 0, 0), new IconTransformation(icon), new ColourMultiplier(color.rgba()));
|
||||
}
|
||||
else {
|
||||
cc.render(0, cc.verts.length, new Translation(0, 0, 0), new IconTransformation(icon));
|
||||
}
|
||||
}
|
||||
|
||||
public CCModel getItemModel(ForgeDirection side, TransmitterType type)
|
||||
|
|
|
@ -414,8 +414,10 @@ public class ItemRenderingHandler implements IItemRenderer
|
|||
{
|
||||
GL11.glTranslated(-0.5, -0.5, -0.5);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
MekanismRenderer.blendOn();
|
||||
RenderPartTransmitter.getInstance().renderItem(TransmitterType.values()[item.getItemDamage()]);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
MekanismRenderer.blendOff();
|
||||
}
|
||||
else if(item.getItem() instanceof ItemGlowPanel)
|
||||
{
|
||||
|
|
|
@ -933,6 +933,7 @@ public class Mekanism
|
|||
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid("brine"), new ItemStack(BrineBucket), FluidContainerRegistry.EMPTY_BUCKET);
|
||||
|
||||
//Registrations
|
||||
GameRegistry.registerItem(PartTransmitter, "PartTransmitter");
|
||||
GameRegistry.registerItem(ElectricBow, "ElectricBow");
|
||||
GameRegistry.registerItem(Dust, "Dust");
|
||||
GameRegistry.registerItem(Ingot, "Ingot");
|
||||
|
|
|
@ -112,27 +112,27 @@ public class ItemPartTransmitter extends JItemMultiPart
|
|||
list.add("- " + EnumColor.PURPLE + "Joules " + EnumColor.GREY + "(Mekanism)");
|
||||
break;
|
||||
}
|
||||
case 4: case 9: case 10: case 11:
|
||||
case 4: case 5: case 6: case 7:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "mB " + EnumColor.GREY + "(FluidRegistry)");
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
case 8:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "O " + EnumColor.GREY + "(Oxygen)");
|
||||
list.add("- " + EnumColor.PURPLE + "H " + EnumColor.GREY + "(Hydrogen)");
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
case 9:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "Items (universal)");
|
||||
list.add("- " + EnumColor.PURPLE + "Blocks (universal)");
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
case 10:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "Items (universal)");
|
||||
|
@ -140,7 +140,7 @@ public class ItemPartTransmitter extends JItemMultiPart
|
|||
list.add("- " + EnumColor.DARK_RED + "Only used if no other paths available");
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
case 11:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "Items (universal)");
|
||||
|
|
|
@ -303,6 +303,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
{
|
||||
return getTransmitter().getSize().centerSize+1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -352,6 +353,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
testingSide = side;
|
||||
boolean unblocked = tile().canReplacePart(this, this);
|
||||
testingSide = null;
|
||||
|
||||
return unblocked;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,13 +11,13 @@ public enum TransmitterType
|
|||
UNIVERSAL_CABLE_ELITE("EliteUniversalCable", Size.SMALL, TransmissionType.ENERGY, PartUniversalCable.cableIcons, 2, 0),
|
||||
UNIVERSAL_CABLE_ULTIMATE("UltimateUniversalCable", Size.SMALL, TransmissionType.ENERGY, PartUniversalCable.cableIcons, 3, 0),
|
||||
MECHANICAL_PIPE_BASIC("BasicMechanicalPipe", Size.LARGE, TransmissionType.FLUID, PartMechanicalPipe.pipeIcons, 0, 0),
|
||||
MECHANICAL_PIPE_ADVANCED("AdvancedMechanicalPipe", Size.LARGE, TransmissionType.FLUID, PartMechanicalPipe.pipeIcons, 0, 0),
|
||||
MECHANICAL_PIPE_ELITE("EliteMechanicalPipe", Size.LARGE, TransmissionType.FLUID, PartMechanicalPipe.pipeIcons, 0, 0),
|
||||
MECHANICAL_PIPE_ULTIMATE("UltimateMechanicalPipe", Size.LARGE, TransmissionType.FLUID, PartMechanicalPipe.pipeIcons, 0, 0),
|
||||
PRESSURIZED_TUBE("PressurizedTube", Size.SMALL, TransmissionType.GAS, PartPressurizedTube.tubeIcons, 0, 0),
|
||||
LOGISTICAL_TRANSPORTER("LogisticalTransporter", Size.LARGE, TransmissionType.ITEM, PartLogisticalTransporter.transporterIcons, 0, 0),
|
||||
RESTRICTIVE_TRANSPORTER("RestrictiveTransporter", Size.LARGE, TransmissionType.ITEM, PartLogisticalTransporter.transporterIcons, 1, 1),
|
||||
DIVERSION_TRANSPORTER("DiversionTransporter", Size.LARGE, TransmissionType.ITEM, PartLogisticalTransporter.transporterIcons, 2, 0),
|
||||
MECHANICAL_PIPE_ADVANCED("AdvancedMechanicalPipe", Size.LARGE, TransmissionType.FLUID, PartMechanicalPipe.pipeIcons, 0, 0),
|
||||
MECHANICAL_PIPE_ELITE("EliteMechanicalPipe", Size.LARGE, TransmissionType.FLUID, PartMechanicalPipe.pipeIcons, 0, 0),
|
||||
MECHANICAL_PIPE_ULTIMATE("UltimateMechanicalPipe", Size.LARGE, TransmissionType.FLUID, PartMechanicalPipe.pipeIcons, 0, 0);
|
||||
DIVERSION_TRANSPORTER("DiversionTransporter", Size.LARGE, TransmissionType.ITEM, PartLogisticalTransporter.transporterIcons, 2, 0);
|
||||
|
||||
private String unlocalizedName;
|
||||
private Size size;
|
||||
|
|
Loading…
Reference in a new issue