This shows how to manage a Ctrl-C interrupt from a Java program.
Look into the synchonized
blocks...
Mixins are a way to inject code or change the minecraft source code directly and should be use with caution. If you can do a PR to Forge or use an event, try those first. If all else fails, then mixins may be a good option to look into. Here are some resources for mixins:
- Mixin Official Docs: https://github.com/SpongePowered/Mixin/wiki
- Mixin Javadocs: https://jenkins.liteloader.com/view/Other/job/Mixin/javadoc/index.html
- Mixin Cheatsheet: https://github.com/2xsaiko/mixin-cheatsheet
- MixinExtras (Adds some powerful compatiable mixin options!): https://github.com/LlamaLad7/MixinExtras
Now, I'll be honest, the official mixin doc is kind of terrible to learn from for most people. It's extremely dense and and really only helps people who already knows in-depth bytecode and stuff. But most modders aren't like that and just wants to do small stuff lol. But I'll give you the run-down here. There's a few kinds of mixins that you will encounter quite often.
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
package net.minecraft.src; | |
import net.minecraft.client.Minecraft; | |
import java.io.File; | |
import java.util.*; | |
import java.nio.*; | |
import org.lwjgl.opengl.GL11; | |
import org.lwjgl.opengl.ContextCapabilities; | |
import org.lwjgl.opengl.GLContext; |