diff options
author | makamys <makamys@outlook.com> | 2020-03-10 22:54:52 +0100 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2021-05-06 13:54:48 +0200 |
commit | 02a6aa4a24662815664ad86cb81d2a3f167775d7 (patch) | |
tree | 795fab48832fce98ea12790536504f159fb89470 /src/main/java/makamys/lodmod | |
download | Neodymium-02a6aa4a24662815664ad86cb81d2a3f167775d7.tar.gz Neodymium-02a6aa4a24662815664ad86cb81d2a3f167775d7.tar.bz2 Neodymium-02a6aa4a24662815664ad86cb81d2a3f167775d7.zip |
Initial commit (basic Mixin setup)
Diffstat (limited to 'src/main/java/makamys/lodmod')
-rw-r--r-- | src/main/java/makamys/lodmod/LODMod.java | 45 | ||||
-rw-r--r-- | src/main/java/makamys/lodmod/mixin/IRenderGlobal.java | 26 | ||||
-rw-r--r-- | src/main/java/makamys/lodmod/mixin/MixinSoundManager.java | 22 |
3 files changed, 93 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/LODMod.java b/src/main/java/makamys/lodmod/LODMod.java new file mode 100644 index 0000000..c31a5d7 --- /dev/null +++ b/src/main/java/makamys/lodmod/LODMod.java @@ -0,0 +1,45 @@ +package makamys.lodmod; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.init.Blocks; +import net.minecraft.launchwrapper.Launch; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.MinecraftForge; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; +import makamys.lodmod.mixin.IRenderGlobal; + +@Mod(modid = LODMod.MODID, version = LODMod.VERSION) +public class LODMod +{ + public static final String MODID = "lodmod"; + public static final String VERSION = "0.0"; + + @EventHandler + public void init(FMLInitializationEvent event) + { + FMLCommonHandler.instance().bus().register(this); + } + + @SubscribeEvent + public void onClientTick(ClientTickEvent event) { + + } +} diff --git a/src/main/java/makamys/lodmod/mixin/IRenderGlobal.java b/src/main/java/makamys/lodmod/mixin/IRenderGlobal.java new file mode 100644 index 0000000..d5ac050 --- /dev/null +++ b/src/main/java/makamys/lodmod/mixin/IRenderGlobal.java @@ -0,0 +1,26 @@ +package makamys.lodmod.mixin; + +import java.nio.IntBuffer; +import java.util.ArrayList; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.WorldClient; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.RenderGlobal; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IWorldAccess; + +@Mixin(RenderGlobal.class) +public interface IRenderGlobal { + @Accessor("cloudTickCounter") + int cloudTickCounter(); +}
\ No newline at end of file diff --git a/src/main/java/makamys/lodmod/mixin/MixinSoundManager.java b/src/main/java/makamys/lodmod/mixin/MixinSoundManager.java new file mode 100644 index 0000000..3cdb58b --- /dev/null +++ b/src/main/java/makamys/lodmod/mixin/MixinSoundManager.java @@ -0,0 +1,22 @@ +package makamys.lodmod.mixin; + +import java.util.List; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import net.minecraft.client.audio.SoundManager; + + +@Mixin(SoundManager.class) +abstract class MixinSoundManager { + + @Inject(method = "<init>*", at = @At("RETURN")) + private void onConstructed(CallbackInfo ci) { + System.out.println("(MIXIN EXAMPLE) Running injector mixin for SoundManager constructor!"); + } + + +} |