mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 04:06:43 -04:00
Some more adjustments for 1.8.
This commit is contained in:
parent
8c13372194
commit
7366d8d07a
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 157 B |
@ -144,7 +144,8 @@ object Textures {
|
|||||||
val Cable = L("cable")
|
val Cable = L("cable")
|
||||||
val CableCap = L("cableCap")
|
val CableCap = L("cableCap")
|
||||||
val GenericTop = L("generic_top", load = false)
|
val GenericTop = L("generic_top", load = false)
|
||||||
val NetSplitter = L("netSplitter")
|
val NetSplitterSide = L("netSplitter_side")
|
||||||
|
val NetSplitterTop = L("netSplitter_top")
|
||||||
val RackFront = L("serverRack_front", load = false)
|
val RackFront = L("serverRack_front", load = false)
|
||||||
val RackSide = L("serverRack_side", load = false)
|
val RackSide = L("serverRack_side", load = false)
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ import scala.collection.mutable
|
|||||||
object ModelInitialization {
|
object ModelInitialization {
|
||||||
final val CableBlockLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Cable, "normal")
|
final val CableBlockLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Cable, "normal")
|
||||||
final val CableItemLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Cable, "inventory")
|
final val CableItemLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Cable, "inventory")
|
||||||
|
final val NetSplitterBlockLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.NetSplitter, "normal")
|
||||||
|
final val NetSplitterItemLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.NetSplitter, "inventory")
|
||||||
final val PrintBlockLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Print, "normal")
|
final val PrintBlockLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Print, "normal")
|
||||||
final val PrintItemLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Print, "inventory")
|
final val PrintItemLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Print, "inventory")
|
||||||
final val RobotBlockLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Robot, "normal")
|
final val RobotBlockLocation = new ModelResourceLocation(Settings.resourceDomain + ":" + Constants.BlockName.Robot, "normal")
|
||||||
@ -45,6 +47,7 @@ object ModelInitialization {
|
|||||||
MinecraftForge.EVENT_BUS.register(this)
|
MinecraftForge.EVENT_BUS.register(this)
|
||||||
|
|
||||||
registerModel(Constants.BlockName.Cable, CableBlockLocation, CableItemLocation)
|
registerModel(Constants.BlockName.Cable, CableBlockLocation, CableItemLocation)
|
||||||
|
registerModel(Constants.BlockName.NetSplitter, NetSplitterBlockLocation, NetSplitterItemLocation)
|
||||||
registerModel(Constants.BlockName.Print, PrintBlockLocation, PrintItemLocation)
|
registerModel(Constants.BlockName.Print, PrintBlockLocation, PrintItemLocation)
|
||||||
registerModel(Constants.BlockName.Robot, RobotBlockLocation, RobotItemLocation)
|
registerModel(Constants.BlockName.Robot, RobotBlockLocation, RobotItemLocation)
|
||||||
registerModel(Constants.BlockName.RobotAfterimage, RobotAfterimageBlockLocation, RobotAfterimageItemLocation)
|
registerModel(Constants.BlockName.RobotAfterimage, RobotAfterimageBlockLocation, RobotAfterimageItemLocation)
|
||||||
@ -137,6 +140,8 @@ object ModelInitialization {
|
|||||||
|
|
||||||
registry.putObject(CableBlockLocation, CableModel)
|
registry.putObject(CableBlockLocation, CableModel)
|
||||||
registry.putObject(CableItemLocation, CableModel)
|
registry.putObject(CableItemLocation, CableModel)
|
||||||
|
registry.putObject(NetSplitterBlockLocation, NetSplitterModel)
|
||||||
|
registry.putObject(NetSplitterItemLocation, NetSplitterModel)
|
||||||
registry.putObject(PrintBlockLocation, PrintModel)
|
registry.putObject(PrintBlockLocation, PrintModel)
|
||||||
registry.putObject(PrintItemLocation, PrintModel)
|
registry.putObject(PrintItemLocation, PrintModel)
|
||||||
registry.putObject(RobotBlockLocation, RobotModel)
|
registry.putObject(RobotBlockLocation, RobotModel)
|
||||||
|
@ -23,7 +23,14 @@ object NetSplitterModel extends SmartBlockModelBase with ISmartItemModel {
|
|||||||
|
|
||||||
override def handleItemState(stack: ItemStack) = new ItemModel(stack)
|
override def handleItemState(stack: ItemStack) = new ItemModel(stack)
|
||||||
|
|
||||||
protected def splitterTexture = Array.fill(6)(Textures.getSprite(Textures.Block.NetSplitter))
|
protected def splitterTexture = Array(
|
||||||
|
Textures.getSprite(Textures.Block.NetSplitterTop),
|
||||||
|
Textures.getSprite(Textures.Block.NetSplitterTop),
|
||||||
|
Textures.getSprite(Textures.Block.NetSplitterSide),
|
||||||
|
Textures.getSprite(Textures.Block.NetSplitterSide),
|
||||||
|
Textures.getSprite(Textures.Block.NetSplitterSide),
|
||||||
|
Textures.getSprite(Textures.Block.NetSplitterSide)
|
||||||
|
)
|
||||||
|
|
||||||
protected final val BaseModel = {
|
protected final val BaseModel = {
|
||||||
val faces = mutable.ArrayBuffer.empty[BakedQuad]
|
val faces = mutable.ArrayBuffer.empty[BakedQuad]
|
||||||
|
@ -16,20 +16,22 @@ object NetSplitterRenderer extends TileEntitySpecialRenderer {
|
|||||||
|
|
||||||
val splitter = tileEntity.asInstanceOf[tileentity.NetSplitter]
|
val splitter = tileEntity.asInstanceOf[tileentity.NetSplitter]
|
||||||
if (splitter.openSides.contains(!splitter.isInverted)) {
|
if (splitter.openSides.contains(!splitter.isInverted)) {
|
||||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS)
|
RenderState.pushAttrib()
|
||||||
|
RenderState.disableEntityLighting()
|
||||||
RenderState.disableLighting()
|
|
||||||
RenderState.makeItBlend()
|
RenderState.makeItBlend()
|
||||||
|
|
||||||
GL11.glPushMatrix()
|
RenderState.pushMatrix()
|
||||||
|
|
||||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5)
|
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5)
|
||||||
GL11.glScaled(1.0025, -1.0025, 1.0025)
|
GL11.glScaled(1.0025, -1.0025, 1.0025)
|
||||||
GL11.glTranslatef(-0.5f, -0.5f, -0.5f)
|
GL11.glTranslatef(-0.5f, -0.5f, -0.5f)
|
||||||
|
|
||||||
bindTexture(TextureMap.locationBlocksTexture)
|
bindTexture(TextureMap.locationBlocksTexture)
|
||||||
|
|
||||||
val t = Tessellator.getInstance
|
val t = Tessellator.getInstance
|
||||||
val r = t.getWorldRenderer
|
val r = t.getWorldRenderer
|
||||||
|
|
||||||
|
Textures.Block.bind()
|
||||||
r.startDrawingQuads()
|
r.startDrawingQuads()
|
||||||
|
|
||||||
val sideActivity = Textures.getSprite(Textures.Block.NetSplitterOn)
|
val sideActivity = Textures.getSprite(Textures.Block.NetSplitterOn)
|
||||||
@ -78,10 +80,10 @@ object NetSplitterRenderer extends TileEntitySpecialRenderer {
|
|||||||
|
|
||||||
t.draw()
|
t.draw()
|
||||||
|
|
||||||
RenderState.enableLighting()
|
RenderState.enableEntityLighting()
|
||||||
|
|
||||||
GL11.glPopMatrix()
|
RenderState.popMatrix()
|
||||||
GL11.glPopAttrib()
|
RenderState.popAttrib()
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderState.checkError(getClass.getName + ".renderTileEntityAt: leaving")
|
RenderState.checkError(getClass.getName + ".renderTileEntityAt: leaving")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user