Jump to content

[1.7.10] Recolouring a tessellator model


BourgeoisArab
 Share

Recommended Posts

I have a method drawing a square with an animated water texture and I've been trying to change the colour of it with the method:

Tessellator.instance.setColorOpaque(r, g, b);

This works, however it simply takes away the colors from the original texture, so it comes out very dark. Is there a way to increase the brightness/lightness of the texture so it doesn't look awful? Or a different way of recolouring the texture?

 

EDIT: I tried making use of the Tessellator.instance.setBrightness() method, but it doesn't appear to do anything. Am I just using it wrong?

Link to comment
Share on other sites

Hi

 

Best thing to do is to make the original texture grey scale i.e. shades of white.  If your original texture is blue and you are trying to change it to red, you are really going to struggle.  It is possible using rendering & shader tricks to change the hue (convert your blue to grey scale and then to red) but changing the source texture is a hundred times easier.

 

-TGG

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Got this Issue here. Tried a few things but nothing really helpd.     [08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 3668[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39) 3669[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) 3670[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) 3671[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) 3672[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) 3673[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:49) 3674[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:46) 3675[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.server.ServerMain.main(ServerMain.java:43) 3676[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.reflect.InvocationTargetException 3677[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 3678[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 3679[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 3680[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.lang.reflect.Method.invoke(Method.java:498) 3681[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:37) 3682[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) 3683[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: ... 7 more 3684[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered 3685[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) 3686[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) 3687[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) 3688[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) 3689[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) 3690[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) 3691[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) 3692[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) 3693[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) 3694[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) 3695[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at java.lang.ClassLoader.loadClass(ClassLoader.java:351) 3696[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.block.Blocks.<clinit>(Blocks.java:30) 3697[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.world.gen.surfacebuilders.SurfaceBuilder.<clinit>(SurfaceBuilder.java:12) 3698[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilders.<clinit>(SourceFile:11) 3699[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.WorldGenRegistries.func_243674_g(WorldGenRegistries.java:33) 3700[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.WorldGenRegistries.func_243668_a(WorldGenRegistries.java:89) 3701[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) 3702[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.WorldGenRegistries.<clinit>(WorldGenRegistries.java:88) 3703[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.Registry.<clinit>(Registry.java:464) 3704[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.Bootstrap.func_151354_b(Bootstrap.java:38) 3705[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.server.Main.main(Main.java:92) 3706[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: ... 13 more 3707[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector pehkui$tickCramming$getBoundingBox(Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/util/math/AxisAlignedBB; in pehkui.mixins.json:LivingEntityMixin failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap Pehkui-refmap.json 3708[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:468) 3709[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1362) 3710[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1051) 3711[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:400) 3712[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) 3713[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383) 3714[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365) 3715[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) 3716[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: ... 33 more 3717       Modlist: https://pastebin.com/pMMqiLeq
    • The error does not really identify a mod. But it could be flywheel since that modifies the code in this area, or it could be a conflict with optifine? Check you have the latest version of flywheel and try without optifine.
    • Issue with jeed, check you have the latest version then contact the mod author.
    • I'm looking to disable this auto-jumping that happens in certain mobs (e.g. fish) so that they don't jump out of the water when they are swimming in 1 block deep water.  
    • I have items that use a reference to potions to get mob effects and a machine to make them. I can't simply use a potion as an input for the recipe since the player doesn't directly interact with potions but potion items. I can get the registry location for the potion easily enough.  How do I get a reference to the actual potion item to set an an input for the recipe?
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.