Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transfer to early/late mixin system #29

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@ usesMixins = true
separateMixinSourceSet =

# Adds some debug arguments like verbose output and class export.
usesMixinDebug = false
usesMixinDebug = true

# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin = mixinplugin.MixinPlugin
mixinPlugin =

# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage = mixins

# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
coreModClass =
coreModClass = mixinplugin.EarlyMixinLoader

# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package com.sinthoras.hydroenergy.mixinplugin;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.gtnewhorizon.gtnhmixins.IEarlyMixinLoader;

import cpw.mods.fml.relauncher.FMLLaunchHandler;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;

@IFMLLoadingPlugin.MCVersion("1.7.10")
public class EarlyMixinLoader implements IFMLLoadingPlugin, IEarlyMixinLoader {

@Override
public String[] getASMTransformerClass() {
return null;
}

@Override
public String getModContainerClass() {
return null;
}

@Override
public String getSetupClass() {
return null;
}

@Override
public void injectData(Map<String, Object> data) {}

@Override
public String getAccessTransformerClass() {
return null;
}

@Override
public String getMixinConfig() {
return "mixins.hydroenergy.early.json";
}

@Override
public List<String> getMixins(Set<String> loadedCoreMods) {
final List<String> mixins = new ArrayList<>();
if (FMLLaunchHandler.side().isClient()) {
mixins.add("ActiveRenderInfoMixin");
mixins.add("ChunkClientMixin");
mixins.add("ChunkProviderClientMixin");
mixins.add("EntityRendererMixin");
mixins.add("WorldRendererMixin");
mixins.add("WorldMixinClient");
}
mixins.add("ChunkMixin");
mixins.add("EntityMixin");
mixins.add("WorldMixin");
return mixins;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.sinthoras.hydroenergy.mixinplugin;

import java.util.Collections;
import java.util.List;
import java.util.Set;

import com.gtnewhorizon.gtnhmixins.ILateMixinLoader;
import com.gtnewhorizon.gtnhmixins.LateMixin;

import cpw.mods.fml.relauncher.FMLLaunchHandler;

@LateMixin
public class LateMixinLoader implements ILateMixinLoader {

@Override
public String getMixinConfig() {
return "mixins.hydroenergy.late.json";
}

@Override
public List<String> getMixins(Set<String> loadedMods) {
if (FMLLaunchHandler.side().isClient()) {
return Collections.singletonList("GT_PollutionRendererMixin");
}
return Collections.emptyList();
}

}
58 changes: 0 additions & 58 deletions src/main/java/com/sinthoras/hydroenergy/mixinplugin/Mixin.java

This file was deleted.

110 changes: 0 additions & 110 deletions src/main/java/com/sinthoras/hydroenergy/mixinplugin/MixinPlugin.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.minecraft;
package com.sinthoras.hydroenergy.mixins.early;

import net.minecraft.block.Block;
import net.minecraft.client.renderer.ActiveRenderInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.minecraft;
package com.sinthoras.hydroenergy.mixins.early;

import net.minecraft.world.chunk.Chunk;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.minecraft;
package com.sinthoras.hydroenergy.mixins.early;

import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.chunk.Chunk;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.minecraft;
package com.sinthoras.hydroenergy.mixins.early;

import net.minecraft.client.multiplayer.ChunkProviderClient;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.minecraft;
package com.sinthoras.hydroenergy.mixins.early;

import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.minecraft;
package com.sinthoras.hydroenergy.mixins.early;

import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.RenderGlobal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.minecraft;
package com.sinthoras.hydroenergy.mixins.early;

import net.minecraft.block.Block;
import net.minecraft.world.World;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.minecraft;
package com.sinthoras.hydroenergy.mixins.early;

import net.minecraft.block.Block;
import net.minecraft.world.World;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.minecraft;
package com.sinthoras.hydroenergy.mixins.early;

import net.minecraft.client.renderer.WorldRenderer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sinthoras.hydroenergy.mixins.gregtech;
package com.sinthoras.hydroenergy.mixins.late;

import static com.sinthoras.hydroenergy.api.HEGetMaterialUtil.getMaterialWrapper;

Expand Down
Loading