public Rail3rdRenderer() { this.model = new WavefrontObject[] { new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_s.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_l.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_t.obj")) }; this.eleModel = new WavefrontObject[] { new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_se.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_le.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_te.obj")) }; this.pillarModel = new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_p.obj")); this.texture = new ResourceLocation("nyasamarailway", "textures/rails/trd_rail_base.png"); this.eleTexture = new ResourceLocation("nyasamarailway", "textures/rails/trd_rail_ele.png"); }
public TriSignalLightRenderer(String baseName) { modelBase = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_base.obj") ); modelLight = new WavefrontObject[] { new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_1.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_2.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_3.obj") ) }; }
private void renderArclamp(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); switch (type) { case INVENTORY: GL11.glScalef(0.9F, 0.9F, 0.9F); break; case EQUIPPED_FIRST_PERSON: GL11.glTranslatef(0.8F, 0.8F, 0.5F); GL11.glRotatef(150F, 0, 1F, 0); GL11.glScalef(0.7F, 0.7F, 0.7F); break; case EQUIPPED: GL11.glTranslatef(0.6F, 0.8F, 0.6F); GL11.glRotatef(150F, 0, 1F, 0); GL11.glScalef(0.9F, 0.9F, 0.9F); break; default: break; } GL11.glScalef(0.07F, 0.07F, 0.07F); GL11.glRotatef(90, 0, 0, -1); FMLClientHandler.instance().getClient().getTextureManager().bindTexture(TileEntityArclampRenderer.lampTexture); TileEntityArclampRenderer.lampMetal.renderAll(); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); FMLClientHandler.instance().getClient().getTextureManager().bindTexture(TileEntityArclampRenderer.lightTexture); Tessellator tessellator = Tessellator.instance; tessellator.startDrawing(GL11.GL_QUADS); tessellator.setColorRGBA(255, 255, 255, 255); GL11.glDisable(GL11.GL_LIGHTING); ((WavefrontObject) TileEntityArclampRenderer.lampLight).tessellateAll(tessellator); tessellator.draw(); GL11.glPopMatrix(); GL11.glEnable(GL11.GL_LIGHTING); }
public static WavefrontObject getModel(String path) { ResourceLocation rl = resourceMap.containsKey(path) ? resourceMap.get(path) : new ResourceLocation(path); if(!resourceMap.containsKey(path)) { resourceMap.put(path, rl); } return (WavefrontObject) AdvancedModelLoader.loadModel(rl); }
public static void renderWithResourceAndRotation(WavefrontObject model, float angle, ResourceLocation texture) { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); GL11.glPushMatrix(); GL11.glScalef(0.0625F, 0.0625F, 0.0625F); GL11.glPushMatrix(); GL11.glRotatef(angle, 0.0F, -1.0F, 0.0F); model.renderAll(); GL11.glPopMatrix(); GL11.glPopMatrix(); }
public static void renderWithResource(WavefrontObject model, ResourceLocation texture) { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); GL11.glPushMatrix(); GL11.glScalef(0.0625F, 0.0625F, 0.0625F); model.renderAll(); GL11.glPopMatrix(); }
public static void renderPartWithResource(WavefrontObject model, String part, ResourceLocation texture) { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); GL11.glPushMatrix(); GL11.glScalef(0.0625F, 0.0625F, 0.0625F); model.renderPart(part); GL11.glPopMatrix(); }
public RailMonoSwitchRenderer() { this.model = new WavefrontObject[] { new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_straight.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_turned.obj")) }; this.texture = new ResourceLocation("nyasamarailway", "textures/rails/mono_rail_switch.png"); }
public RailMonoSwitchRenderer(boolean is3rdRail) { if (is3rdRail) { this.model = new WavefrontObject[] { new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_s.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_t.obj")) }; this.texture = new ResourceLocation("nyasamarailway", "textures/rails/trd_rail_ele.png"); } else { this.model = new WavefrontObject[] { new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/rail_magnet_switch.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/rail_magnet_switch.obj")) }; this.texture = new ResourceLocation("nyasamarailway", "textures/rails/trd_rail_ele.png"); } }
public RailMonoRenderer() { this.model = new WavefrontObject[] { new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_straight.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_slope.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_turned.obj")) }; this.textures = new ResourceLocation[] { new ResourceLocation("nyasamarailway", "textures/rails/mono_rail.png"), new ResourceLocation("nyasamarailway", "textures/rails/mono_rail.png"), new ResourceLocation("nyasamarailway", "textures/rails/mono_rail.png") }; this.isMagnet = false; }
public RailMonoRenderer(String[] texturePath) { this.model = new WavefrontObject[] { new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_straight_magnet.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_slope_magnet.obj")), new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_turned_magnet.obj")) }; this.textures = new ResourceLocation[6]; for (int i = 0; i < 3; i++) { textures[i] = new ResourceLocation("nyasamarailway", texturePath[i]); } for (int i = 3; i < 6; i++) { textures[i] = new ResourceLocation("nyasamarailway", texturePath[i - 3].replace(".png", "_powered.png")); } this.isMagnet = true; }
public BiSignalLightRenderer(String baseName) { modelBase = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_base.obj") ); modelLight = new WavefrontObject[] { new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_1.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_2.obj") ) }; }
public RailTriSwitchRenderer() { this.model = new WavefrontObject(new ResourceLocation("nyasamarailway", "models/blocks/rail_tri_switch.obj")); this.textures = new ResourceLocation[] { new ResourceLocation("nyasamarailway", "textures/blocks/rail_tri_switch_straight.png"), new ResourceLocation("nyasamarailway", "textures/blocks/rail_tri_switch_left.png"), new ResourceLocation("nyasamarailway", "textures/blocks/rail_tri_switch_right.png") }; }
public SignalBoxRenderer(boolean hasButton) { textureBase = new ResourceLocation("nyasamarailway", "textures/blocks/signal_box_base.png"); if (hasButton) { modelBtn = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/signal_box_btn.obj") ); modelBtnLight = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/signal_box_btn_light.obj") ); } else { modelBtn = null; modelBtnLight = null; } }
public SignalBoxRenderer(boolean hasButton, String texture) { textureBase = new ResourceLocation("nyasamarailway", "textures/blocks/" + texture + ".png"); if (hasButton) { modelBtn = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/signal_box_btn.obj") ); modelBtnLight = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/signal_box_btn_light.obj") ); } else { modelBtn = null; modelBtnLight = null; } }
public static Collection<CustomPartedModel> loadObjModelParts(WavefrontObject obj) { List<CustomPartedModel> ret = new ArrayList(); for(GroupObject go : obj.groupObjects) { ret.add(new CustomPartedModel(obj, go.name)); } return ret; }
public SimpleBlockOBJRenderer(Addon addon, int renderID, ResourceLocation modelLocation) { super(addon, renderID); final IModelCustom temp = AdvancedModelLoader.loadModel(modelLocation); if (!(temp instanceof WavefrontObject)) { throw new IllegalArgumentException("SimpleBlockOBJRenderer is only for WaveFrontObjects (.obj)!"); } model = (WavefrontObject) temp; }
/** * Creates a renderer using properties from a {@link org.obsidianbox.magma.block.SimpleBlock} * * This will also set the render type for that block * @param addon The addon creating the block * @param renderID The render type used by Forge * @param block Block being rendered */ public SimpleBlockOBJRenderer(Addon addon, int renderID, SimpleBlock block) { super(addon, renderID); final IModelCustom temp = AdvancedModelLoader.loadModel(new ResourceLocation(addon.getDescription().getIdentifier(), "models/blocks/" + block.getIdentifier() + ".obj")); if (!(temp instanceof WavefrontObject)) { throw new IllegalArgumentException("SimpleBlockOBJRenderer is only for WaveFrontObjects (.obj)!"); } model = (WavefrontObject) temp; block.setRenderType(renderID); }
@Override public void renderStatic(float size, TileEntity te){ GL11.glPushMatrix(); if(model instanceof WavefrontObject) { applyRenderPreps(te); } if(staticParts != null) { model.renderOnly(staticParts); } else { renderAll(te); } GL11.glPopMatrix(); }
public TicketBlockRenderer(int renderType) { modelOnceBase = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_once_base.obj") ); modelCardBase = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_card_base.obj") ); modelCoinBase = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/coin_block.obj") ); modelScreen = new WavefrontObject[] { new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_screen_insert.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_screen_once.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_screen_card.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_screen_over.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_screen_over1.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_screen_over2.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_screen_over3.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/ticket/ticket_block_screen_over4.obj") ) }; textureMain = new ResourceLocation("nyasamarailway", "textures/blocks/ticket_block_main.png"); textureText = new ResourceLocation[16]; for (int i = 0; i < 10; i++) textureText[i] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_" + i + ".png"); textureText[TEXT_E] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_e.png"); textureText[TEXT_R] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_r.png"); textureText[TEXT_SUB] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_sub.png"); textureText[TEXT_N] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_n.png"); textureText[TEXT_U] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_u.png"); textureText[TEXT_L] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_l.png"); this.renderType = renderType; }
public GateRenderer(int renderType) { modelBase = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_base.obj") ); modelFrontMain = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_front_main.obj") ); modelDoorAxis = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_door_axis.obj") ); modelDoorLeft = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_door_left.obj") ); modelDoorRight = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_door_right.obj") ); modelLight = new WavefrontObject[] { new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_front_light_r.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_front_light_g.obj") ) }; modelScreen = new WavefrontObject[] { new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_screen_info.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_screen_1.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_screen_2.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_screen_3.obj") ) }; textureMain = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_main.png"); textureText = new ResourceLocation[16]; for (int i = 0; i < 10; i++) textureText[i] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_" + i + ".png"); textureText[TEXT_E] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_e.png"); textureText[TEXT_R] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_r.png"); textureText[TEXT_SUB] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_sub.png"); textureText[TEXT_N] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_n.png"); textureText[TEXT_U] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_u.png"); textureText[TEXT_L] = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_text_l.png"); modelBaseTop = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/gate/gate_base_top.obj") ); textureBaseTop = new ResourceLocation("nyasamarailway", "textures/blocks/gate/gate_base_top.png"); this.renderType = renderType; }
public GlassShieldRenderer(int renderType) { modelMain = new WavefrontObject[] { new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield_half.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield_1x1.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield_3x1.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield_3x1d5.obj") ) }; modelMainAl = new WavefrontObject[] { new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield_al.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield_al_half.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield_albase.obj") ) }; modelCorner = new WavefrontObject[] { new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield_corner.obj") ), new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/glass_shield_corner_half.obj") ) }; textureMain = new ResourceLocation("nyasamarailway", "textures/blocks/glass_shield_main.png"); textureMainAl = new ResourceLocation("nyasamarailway", "textures/blocks/glass_shield_al_main.png"); textureCorner = new ResourceLocation("nyasamarailway", "textures/blocks/BrushedAluminum.png"); this.renderType = renderType; }
public SignalLightRenderer() { model = new WavefrontObject( new ResourceLocation("nyasamarailway", "models/blocks/signal_light.obj") ); }
public SignalLightRenderer(String modelPath) { model = new WavefrontObject( new ResourceLocation("nyasamarailway", modelPath) ); }
public static Collection<CustomPartedModel> loadObjModelParts(ResourceLocation objLocation) { return loadObjModelParts(new WavefrontObject(objLocation)); }
public static void renderWithIcon(WavefrontObject model, IIcon icon, Tessellator tes) { renderWithIcon(model.groupObjects, icon, null, tes); }
public SimpleModelRenderer(WavefrontObject model, int renderId) { this.model = model; this.renderId = renderId; }
public RenderInfo(WavefrontObject model) { this.model = model; }
public RenderInfo(ResourceLocation modelLoc) { this.model = (WavefrontObject) AdvancedModelLoader.loadModel(modelLoc); }
public WavefrontObject getModel() { return this.model; }
public WavefrontObject getModel() { return model; }
public ItemRendererWarpGem() { model = new WavefrontObject(new ResourceLocation("enderamm", "misc/wgem2.obj")); }
public RockExterminatorTESR() { model = new WavefrontObject(new ResourceLocation("enderamm", "misc/rock_exterminator4.obj")); }
public RenderJetPack(float par2) { this.jetPack = (WavefrontObject) AdvancedModelLoader.loadModel("/mods/weapons/models/jetpack.obj"); this.bipedBody = new ArmorRenderPart(this, jetPack); this.bipedBody.setRotationPoint(0.0F, 0.0F + par2, 0.0F); }
public ModelPartRender(ModelBiped modelBase, WavefrontObject model) { super((ModelBase)modelBase); this.modelBase = modelBase; this.model = model; }
public ModelJetBoots(float par2) { this.jetPack = (WavefrontObject) AdvancedModelLoader.loadModel("/mods/weapons/models/jetpack.obj"); this.bipedBody = new JetBootsRenderPart(this, jetPack); this.bipedBody.setRotationPoint(0.0F, 0.0F + par2, 0.0F); }
public ArmorRenderPart(RenderJetPack modelBase, WavefrontObject model) { super(modelBase); this.modelBase = modelBase; this.model = model; }
public JetBootsRenderPart(ModelJetBoots modelBase, WavefrontObject model) { super((ModelBase)modelBase); this.modelBase = modelBase; this.model = model; }
public RenderInfoHelmet(float par2) { this.wavefrontObj = (WavefrontObject) AdvancedModelLoader.loadModel("/mods/weapons/models/jetpack.obj"); this.bipedBody = new ModelPartRender(this, wavefrontObj); this.bipedBody.setRotationPoint(0.0F, 0.0F + par2, 0.0F); }