fix CTM textures
bump version to 2.0.10
This commit is contained in:
@@ -2,7 +2,7 @@ apply plugin: "net.minecraftforge.gradle.forge"
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
group = 'com.github.octarine-noise'
|
||||
version = "2.0.9"
|
||||
version = "2.0.10"
|
||||
archivesBaseName = rootProject.name + '-MC1.9'
|
||||
|
||||
buildscript {
|
||||
|
||||
@@ -48,7 +48,7 @@ object OptifineCTM {
|
||||
if (state !is BlockStateBase) return result
|
||||
|
||||
connectedProperties.forEach { cp ->
|
||||
if (Refs.CPmatchesBlock.invoke(cp, state) as Boolean &&
|
||||
if (Refs.CPmatchesBlock.invoke(cp, Refs.getBlockId.invoke(state), Refs.getMetadata.invoke(state)) as Boolean &&
|
||||
Refs.CPmatchesIcon.invoke(cp, icon) as Boolean) {
|
||||
Client.log(INFO, "Match for block: ${state.toString()}, icon: ${icon.iconName} -> CP: ${cp.toString()}")
|
||||
result.addAll(Refs.CPtileIcons.get(cp) as Array<TextureAtlasSprite>)
|
||||
|
||||
@@ -80,6 +80,9 @@ object Refs {
|
||||
// Optifine
|
||||
val OptifineClassTransformer = ClassRef("optifine.OptiFineClassTransformer")
|
||||
|
||||
val getBlockId = MethodRef(BlockStateBase, "getBlockId", ClassRef.int);
|
||||
val getMetadata = MethodRef(BlockStateBase, "getMetadata", ClassRef.int);
|
||||
|
||||
val RenderEnv = ClassRef("RenderEnv")
|
||||
val RenderEnv_reset = MethodRef(RenderEnv, "reset", ClassRef.void, IBlockAccess, IBlockState, BlockPos)
|
||||
val ConnectedTextures = ClassRef("ConnectedTextures")
|
||||
@@ -89,7 +92,7 @@ object Refs {
|
||||
|
||||
val ConnectedProperties = ClassRef("ConnectedProperties")
|
||||
val CPtileIcons = FieldRef(ConnectedProperties, "tileIcons", null)
|
||||
val CPmatchesBlock = MethodRef(ConnectedProperties, "matchesBlock", ClassRef.boolean, BlockStateBase)
|
||||
val CPmatchesBlock = MethodRef(ConnectedProperties, "matchesBlock", ClassRef.boolean, ClassRef.int, ClassRef.int)
|
||||
val CPmatchesIcon = MethodRef(ConnectedProperties, "matchesIcon", ClassRef.boolean, TextureAtlasSprite)
|
||||
|
||||
// ShadersMod
|
||||
|
||||
@@ -125,7 +125,7 @@ class MethodRef(val parentClass: ClassRef,
|
||||
}
|
||||
|
||||
/** Invoke this method using reflection. */
|
||||
fun invoke(receiver: Any, vararg args: Any) = element?.invoke(receiver, *args)
|
||||
fun invoke(receiver: Any, vararg args: Any?) = element?.invoke(receiver, *args)
|
||||
|
||||
/** Invoke this static method using reflection. */
|
||||
fun invokeStatic(vararg args: Any) = element?.invoke(null, *args)
|
||||
|
||||
Reference in New Issue
Block a user