Fix trigger/action rendering
This commit is contained in:
parent
e6633ae6ff
commit
5441e821ad
3 changed files with 14 additions and 15 deletions
|
@ -321,9 +321,9 @@ public class BuildCraftCore {
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void textureHook(TextureStitchEvent.Pre event){
|
||||
if (event.map == Minecraft.getMinecraft().renderEngine.textureMapItems) {
|
||||
//if (event.map.textureType == 1) { 'TODO Replace above
|
||||
iconProvider = new CoreIconProvider();
|
||||
iconProvider.registerIcons(event.map);
|
||||
actionTriggerIconProvider.registerIcons(event.map);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft {
|
|||
if (getItemStack() != null) {
|
||||
drawStack(getItemStack());
|
||||
} else if (getTexture() != null) {
|
||||
mc.renderEngine.bindTexture("/gui/items.png");
|
||||
System.out.printf("Drawing advanced sprite %s (%d,%d) at %d %d\n", getTexture().getIconName(), getTexture().getOriginX(),getTexture().getOriginY(),cornerX + x, cornerY + y);
|
||||
drawTexturedModelRectFromIcon(cornerX + x, cornerY + y, getTexture(), 16, 16);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,8 +58,6 @@ public class ActionTriggerIconProvider implements IIconProvider {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
if (registered) return;
|
||||
registered = true;
|
||||
icons = new Icon[MAX];
|
||||
|
||||
icons[ActionTriggerIconProvider.Action_MachineControl_On] = iconRegister.registerIcon("buildcraft:triggers/action_machinecontrol_on");
|
||||
|
@ -94,7 +92,6 @@ public class ActionTriggerIconProvider implements IIconProvider {
|
|||
icons[ActionTriggerIconProvider.Trigger_PipeSignal_Yellow_Inactive] = iconRegister.registerIcon("buildcraft:triggers/trigger_pipesignal_yellow_inactive");
|
||||
icons[ActionTriggerIconProvider.Trigger_RedstoneInput_Active] = iconRegister.registerIcon("buildcraft:triggers/trigger_redstoneinput_active");
|
||||
icons[ActionTriggerIconProvider.Trigger_RedstoneInput_Inactive] = iconRegister.registerIcon("buildcraft:triggers/trigger_redstoneinput_inactive");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue