Started by
Max094_Reikeb
on
Topic category: User side tutorials
Hey everyone, welcome for my tutorial about how to change a block's texture in-game.
I made a video tutorial, available now on YouTube!
Link : https://www.youtube.com/watch?v=M2ksabM0xR8
Don't forget to subscribe and to like the video for more tutorials. (and sorry for the sound quality)
Wow, that's so cool!!
Would love to see this pinned, lots of people been looking for this for furnaces and stuff
not working
okay? can you develop? what is not working? do you have any error? what part is not working? are you changing the texture depending on an Int or a Boolean?
I seem to be getting an error when I do it (as in, when you exit out of a mod element, and the error message pops up). Does this work in 2020.4?
Yes, I'm using it in my mod Electrona and it works. Could you tell me what's your error? What did you do? And did you use an interger or a boolean part?
I was using the base workspace as a test, converted to 15.2, which may be the problem. Here's a screenshot of the error message.
Your screenshot doesn't really help me... I need a screenshot of the console, not just the error message...
Oh, sorry. Here's a screenshot of the console (the text on the far right says "does not exist"). Sorry for troubling you with all of this.
Yes the problem is from the conversion to 1.15.2, you need to un-lock the "WeirdBlock" element, then build the workspace, lock the "WeridBlock" element again, and follow the tutoriel.
So nothing of the added code changes, meaning if I do it on a block I made in 1.15.2, it should work?
And thank you for this awesome tutorial, by the way, you are amazing!
How would I define multiple (boolean) blockstates in this manner? I've got them registered (as in, the block has 'em, and I can see them in the debug screen), but I can't edit them with procedures and NBT.
Also, is there a way to get a state to default to true?
Does this still work in 2020.5? Because I couldnt find the int x = pos.getX(); thingy
I got the age and STATE working so in F3 you can see age: 0 but I cant seem to change it depending on a variable defined in a procedure or so any help?
Ok found the error I had to create the procedures first but still doesnt work I always get this error message:
Executing Gradle task: runClient
> Configure project :
New Dep: net.minecraftforge:forge:1.14.4-28.2.16_mapped_snapshot_20190719-1.14.3
> Task :compileJava FAILED
C:\Users\yusuf\MCreatorWorkspaces\\src\main\java\net\mcreator\\block\BasicWorkbenchBlock.java:193: error: cannot find symbol world.setBlockState(pos, state.with(AGE, Integer.valueOf(0)), 3);
^
symbol: variable AGE
location: class CustomBlock
C:\Users\yusuf\MCreatorWorkspaces\\src\main\java\net\mcreator\\block\BasicWorkbenchBlock.java:202: error: cannot find symbol world.setBlockState(pos, state.with(AGE, Integer.valueOf(1)), 3);
^
symbol: variable AGE
location: class CustomBlock
C:\Users\yusuf\MCreatorWorkspaces\\src\main\java\net\mcreator\\block\BasicWorkbenchBlock.java:211: error: cannot find symbol world.setBlockState(pos, state.with(AGE, Integer.valueOf(2)), 3);
^
symbol: variable AGE
location: class CustomBlock
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:c…
BUILD FAILED in 2s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 3853 milliseconds