mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-26 23:13:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38a2bf629f | ||
|
|
2abb775696 |
No files matched your search
+1
-1
@@ -3,5 +3,5 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:CodeChickenLib:1.2.1:dev")
|
api("com.github.GTNewHorizons:CodeChickenLib:1.2.1:dev")
|
||||||
|
|
||||||
devOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.5.17-GTNH:dev")
|
devOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.6.0-GTNH:dev")
|
||||||
}
|
}
|
||||||
+1
-1
@@ -117,7 +117,7 @@ minimizeShadowedDependencies = true
|
|||||||
# If disabled, won't rename the shadowed classes.
|
# If disabled, won't rename the shadowed classes.
|
||||||
relocateShadowedDependencies = true
|
relocateShadowedDependencies = true
|
||||||
|
|
||||||
# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories.
|
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||||
includeWellKnownRepositories = true
|
includeWellKnownRepositories = true
|
||||||
|
|
||||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.14'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -10,17 +10,31 @@ import codechicken.lib.vec.{Cuboid6, Vector3}
|
|||||||
import net.minecraft.entity.player.EntityPlayer
|
import net.minecraft.entity.player.EntityPlayer
|
||||||
import codechicken.lib.render.{
|
import codechicken.lib.render.{
|
||||||
CCRenderPipeline,
|
CCRenderPipeline,
|
||||||
ColourMultiplier,
|
CCRenderState,
|
||||||
CCRenderState
|
ColourMultiplier
|
||||||
}
|
}
|
||||||
import codechicken.microblock.handler.MicroblockProxy
|
import codechicken.microblock.handler.MicroblockProxy
|
||||||
import net.minecraft.entity.Entity
|
import net.minecraft.entity.Entity
|
||||||
import codechicken.lib.render.uv.{UVTransformation, MultiIconTransformation}
|
import codechicken.lib.render.uv.{UVTransformation, MultiIconTransformation}
|
||||||
import cpw.mods.fml.common.registry.{GameRegistry, GameData}
|
import cpw.mods.fml.common.registry.{GameRegistry, GameData}
|
||||||
|
|
||||||
|
import java.util.function.Supplier
|
||||||
|
|
||||||
|
private class ThreadState {
|
||||||
|
var pass = 0
|
||||||
|
var builder: CCRenderPipeline#PipelineBuilder = _
|
||||||
|
}
|
||||||
|
|
||||||
object MaterialRenderHelper {
|
object MaterialRenderHelper {
|
||||||
private var pass = 0
|
private val threadState =
|
||||||
private var builder: CCRenderPipeline#PipelineBuilder = _
|
ThreadLocal.withInitial[ThreadState](new Supplier[ThreadState]() {
|
||||||
|
override def get(): ThreadState = new ThreadState()
|
||||||
|
})
|
||||||
|
def pass = threadState.get().pass
|
||||||
|
def pass_=(pass: Int) = threadState.get().pass = pass
|
||||||
|
def builder = threadState.get().builder
|
||||||
|
def builder_=(builder: CCRenderPipeline#PipelineBuilder) =
|
||||||
|
threadState.get().builder = builder
|
||||||
|
|
||||||
def start(pos: Vector3, pass: Int, uvt: UVTransformation) = {
|
def start(pos: Vector3, pass: Int, uvt: UVTransformation) = {
|
||||||
this.pass = pass
|
this.pass = pass
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import org.lwjgl.opengl.GL11._
|
|||||||
import codechicken.lib.render.{CCRenderState, TextureUtils}
|
import codechicken.lib.render.{CCRenderState, TextureUtils}
|
||||||
import codechicken.lib.render.BlockRenderer.BlockFace
|
import codechicken.lib.render.BlockRenderer.BlockFace
|
||||||
import codechicken.microblock.MicroMaterialRegistry.IMicroMaterial
|
import codechicken.microblock.MicroMaterialRegistry.IMicroMaterial
|
||||||
|
import java.util.function.Supplier
|
||||||
|
|
||||||
object MicroblockRender {
|
object MicroblockRender {
|
||||||
def renderHighlight(
|
def renderHighlight(
|
||||||
@@ -55,7 +56,9 @@ object MicroblockRender {
|
|||||||
glPopMatrix()
|
glPopMatrix()
|
||||||
}
|
}
|
||||||
|
|
||||||
val face = new BlockFace()
|
val face = ThreadLocal.withInitial[BlockFace](new Supplier[BlockFace]() {
|
||||||
|
override def get(): BlockFace = new BlockFace()
|
||||||
|
})
|
||||||
def renderCuboid(
|
def renderCuboid(
|
||||||
pos: Vector3,
|
pos: Vector3,
|
||||||
mat: IMicroMaterial,
|
mat: IMicroMaterial,
|
||||||
@@ -63,9 +66,10 @@ object MicroblockRender {
|
|||||||
c: Cuboid6,
|
c: Cuboid6,
|
||||||
faces: Int
|
faces: Int
|
||||||
) {
|
) {
|
||||||
CCRenderState.instance().setModel(face)
|
val localFace = face.get()
|
||||||
|
CCRenderState.instance().setModel(localFace)
|
||||||
for (s <- 0 until 6 if (faces & 1 << s) == 0) {
|
for (s <- 0 until 6 if (faces & 1 << s) == 0) {
|
||||||
face.loadCuboidFace(c, s)
|
localFace.loadCuboidFace(c, s)
|
||||||
mat.renderMicroFace(pos, pass, c)
|
mat.renderMicroFace(pos, pass, c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user