Workaround very good decision of mojank to strip client classes from server
This commit is contained in:
parent
90da43ec49
commit
e2115397fe
@ -182,6 +182,7 @@ sealed class AbstractMatterySprite : IGUIRenderable, IUVCoords {
|
||||
type.toActualNetwork(this, buff)
|
||||
}
|
||||
|
||||
private inner class ClientData {
|
||||
val renderTypeNoDepth by lazy {
|
||||
noDepthCache.computeIfAbsent(texture) {
|
||||
val builder = RenderType.CompositeState.builder()
|
||||
@ -254,6 +255,12 @@ sealed class AbstractMatterySprite : IGUIRenderable, IUVCoords {
|
||||
builder.createCompositeState(false)) as RenderType
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val clientData by lazy { ClientData() }
|
||||
val renderTypeNoDepth get() = clientData.renderTypeNoDepth
|
||||
val renderTypeDepth get() = clientData.renderTypeDepth
|
||||
val renderTypeWorld get() = clientData.renderTypeWorld
|
||||
|
||||
companion object {
|
||||
private val noDepthCache = ConcurrentHashMap<ResourceLocation, RenderType>()
|
||||
|
Loading…
Reference in New Issue
Block a user