Skip to content
Open
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
26 changes: 16 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ minecraft {
mcpMappingChannel = 'stable'
mcpMappingVersion = '39'

username = 'superhelo'
username = 'test_user'

def args = ["-ea:${project.group}"]
if (project.use_coremod.toBoolean()) {
Expand Down Expand Up @@ -122,13 +122,18 @@ dependencies {
implementation 'com.cleanroommc:assetmover:2.5'
}
if (project.use_mixins.toBoolean()) {
implementation 'zone.rong:mixinbooter:7.1'
implementation('zone.rong:mixinbooter:10.2') {
transitive = false
}
annotationProcessor('zone.rong:mixinbooter:10.2') {
transitive = false
}
}
implementation 'com.cleanroommc:configanytime:3.0'

implementation files('libs/CraftTweaker2-MC1120-Mod-JEI-1.12-4.1.20.670-deobf.jar')
implementation rfg.deobf("curse.maven:Baubles-227083:2518667")
implementation rfg.deobf("curse.maven:zenutils-401178:5162113-sources-5162114")
implementation rfg.deobf("curse.maven:zenutils-401178:5935733-sources-5935735")
implementation rfg.deobf("curse.maven:modtweaker-220954:3488553")
implementation rfg.deobf("curse.maven:hammerlib-247401:3611193")
implementation rfg.deobf("curse.maven:thaumcraft-223628:2629023")
Expand All @@ -147,7 +152,7 @@ dependencies {
implementation rfg.deobf("vazkii.patchouli:Patchouli:1.0-21.5")
implementation rfg.deobf("cofh:RedstoneFlux:1.12-2.0.0.1:universal")
implementation rfg.deobf("mcjty.theoneprobe:TheOneProbe-1.12:1.12-1.4.28-17")
implementation rfg.deobf("zone.rong:mixinbooter:4.2")
implementation rfg.deobf("zone.rong:mixinbooter:10.2")
implementation rfg.deobf("com.blamejared:MTLib:3.0.5.15")
implementation rfg.deobf("mezz.jei:jei_1.12.2:4.16.1.302")
implementation rfg.deobf("vazkii.botania:Botania:r1.10-363.148")
Expand All @@ -160,15 +165,16 @@ dependencies {
}

if (project.use_mixins.toBoolean()) {
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2'
annotationProcessor 'com.google.guava:guava:32.1.2-jre'
annotationProcessor 'com.google.code.gson:gson:2.8.9'
// Change your mixin refmap name here:
String mixin = modUtils.enableMixins('org.spongepowered:mixin:0.8.3', "mixins.${project.archives_base_name}.refmap.json")
api(mixin) {
String mixinBooter = modUtils.enableMixins('zone.rong:mixinbooter:10.2')
// modUtils.enableMixins('zone.rong:mixinbooter:10.2', 'mod_id.mixins.refmap.json') << add refmap name as 2nd arg (optional)
api(mixinBooter) {
transitive = false
}
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2'
annotationProcessor 'com.google.guava:guava:24.1.1-jre'
annotationProcessor 'com.google.code.gson:gson:2.8.6'
annotationProcessor(mixin) {
annotationProcessor(mixinBooter) {
transitive = false
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
org.gradle.jvmargs=-Xmx3G
# Mod Information
mod_version=1.4.7
maven_group=ink.ikx.rt
maven_group=dev.ikx.rt
archives_base_name=RandomTweaker
# If any properties changes below this line, run `gradlew setupDecompWorkspace` and refresh gradle again to ensure everything is working correctly.
# Boilerplate Options
Expand All @@ -14,4 +14,4 @@ use_assetmover=false
use_access_transformer=true
# Coremod Arguments
include_mod=true
coremod_plugin_class_name=ink.ikx.rt.impl.internal.core.CoreModBoot
coremod_plugin_class_name=dev.ikx.rt.impl.internal.core.CoreModBoot
14 changes: 14 additions & 0 deletions src/main/java/dev/ikx/rt/Constant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package dev.ikx.rt;

public class Constant {
public static final String MODID = "randomtweaker";
public static final String NAME = "RandomTweaker";
public static final String VERSION = "1.5.0";

public static final String DESPENDENCIES = "required-after:crafttweaker;" +
"required-after:mixinbooter@[10.2,);" +
"required-after:zenutils@[1.20,);" +
"required-after:configanytime@[2.0,);" +
"after:contenttweaker;after:thaumcraft";

}
51 changes: 51 additions & 0 deletions src/main/java/dev/ikx/rt/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package dev.ikx.rt;

import dev.ikx.rt.api.mods.jei.core.JEIPanel;
import dev.ikx.rt.api.mods.jei.core.JEIRecipe;
import dev.ikx.rt.impl.internal.compact.CompactManager;
import dev.ikx.rt.impl.internal.proxy.IProxy;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLConstructionEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

import java.util.HashSet;
import java.util.Set;

@Mod(
modid = Constant.MODID,
name = Constant.NAME,
version = Constant.VERSION,
dependencies = Constant.DESPENDENCIES
)
public class Main {
public static final Set<JEIPanel> JEI_PANEL_SET = new HashSet<>();
public static final Set<JEIRecipe> JEI_RECIPE_SET = new HashSet<>();

@SidedProxy(clientSide = "dev.ikx.rt.impl.internal.proxy.ClientProxy", serverSide = "dev.ikx.rt.impl.internal.proxy.ServerProxy")
public static IProxy proxy;

@EventHandler
public void onConstruct(FMLConstructionEvent event) {
CompactManager.INSTANCE.registerConstructEvent(event);
}

@EventHandler
public void onPreInit(FMLPreInitializationEvent event) {
CompactManager.INSTANCE.registerPreInitEvent(event);
}

@EventHandler
public void onInit(FMLInitializationEvent event) {
CompactManager.INSTANCE.registerInitEvent(event);
}

@EventHandler
public void onPostInit(FMLPostInitializationEvent event) {
CompactManager.INSTANCE.registerPostInitEvent(event);
}

}
63 changes: 63 additions & 0 deletions src/main/java/dev/ikx/rt/api/internal/file/IProp.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package dev.ikx.rt.api.internal.file;

import crafttweaker.api.item.IIngredient;
import dev.ikx.rt.impl.internal.compact.mods.DeprecatedCompact;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;

import java.util.List;

@Deprecated
@ZenClass(IProp.ZEN_CLASS)
public class IProp {

public static final String ZEN_CLASS = "mods.randomtweaker.file.Prop";

public static DeprecatedCompact compact = new DeprecatedCompact(ZEN_CLASS, Props.ZEN_CLASS);

@ZenMethod
public static void write(String key, String value) {
compact.callVoid(() -> Props.write(key, value));
}

@ZenMethod
public static void write(String key, int value) {
compact.callVoid(() -> Props.write(key, value));
}

@ZenMethod
public static void write(String key, float value) {
compact.callVoid(() -> Props.write(key, value));
}

@ZenMethod
public static void write(String key, double value) {
compact.callVoid(() -> Props.write(key, value));
}

@ZenMethod
public static void write(String key, long value) {
compact.callVoid(() -> Props.write(key, value));
}

@ZenMethod
public static void write(String key, boolean value) {
compact.callVoid(() -> Props.write(key, value));
}

@ZenMethod
public static void write(String key, IIngredient value) {
compact.callVoid(() -> Props.write(key, value));
}

@ZenMethod
public static String read(String key) {
return compact.call(() -> Props.read(key));
}

@ZenMethod
public static List<String> getAllKeys() {
return compact.call(Props::getAllKeys);
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ink.ikx.rt.api.internal.file;
package dev.ikx.rt.api.internal.file;

import crafttweaker.api.item.IIngredient;
import org.apache.commons.lang3.StringUtils;
Expand All @@ -13,8 +13,10 @@
import java.util.Properties;
import java.util.stream.Collectors;

@ZenClass("mods.randomtweaker.file.IProp")
public abstract class IProp {
@ZenClass(Props.ZEN_CLASS)
public class Props {

public static final String ZEN_CLASS = "mods.randomtweaker.file.Props";

public static String FILE = getPath(System.getProperty("user.dir"), "rt.properties");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package ink.ikx.rt.api.internal.utils;
package dev.ikx.rt.api.internal.utils;

import crafttweaker.api.item.IIngredient;
import ink.ikx.rt.impl.internal.utils.MCInputPattern;
import dev.ikx.rt.impl.internal.utils.MCInputPattern;

import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import youyihj.zenutils.api.zenscript.SidedZenRegister;

import java.util.Map;


@SidedZenRegister
@ZenClass("mods.randomtweaker.utils.IInputPattern")
public interface IInputPattern {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ink.ikx.rt.api.mods.astralsorcery;
package dev.ikx.rt.api.mods.astralsorcery;

import crafttweaker.CraftTweakerAPI;
import crafttweaker.IAction;
Expand All @@ -7,16 +7,16 @@
import crafttweaker.api.item.IItemStack;
import hellfirepvp.astralsorcery.common.constellation.ConstellationRegistry;
import hellfirepvp.astralsorcery.common.constellation.IConstellation;
import ink.ikx.rt.impl.internal.config.RTConfig;
import ink.ikx.rt.impl.mods.astralsorcery.CustomAttunementRecipe;
import dev.ikx.rt.impl.internal.config.RTConfig;
import dev.ikx.rt.impl.mods.astralsorcery.CustomAttunementRecipe;

import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;


@SidedZenRegister(modDeps = "astralsorcery")
@ZenClass("mods.randomtweaker.astralsorcery.AttunementAltar")
public abstract class IAttunementAltar {
public class AttunementAltar {

@ZenMethod
public static void addRecipe(IIngredient input, IItemStack output, String constellationString) {
Expand Down Expand Up @@ -66,8 +66,8 @@ public void apply() {
@Override
public String describe() {
return "Add attunement recipe " +
ingredient.toString() + (constellationString != null ? ", constellation : " + constellationString : "")
+ " -> " + output.toString();
ingredient.toString() + (constellationString != null ? ", constellation : " + constellationString : "")
+ " -> " + output.toString();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package ink.ikx.rt.api.mods.astralsorcery;
package dev.ikx.rt.api.mods.astralsorcery;

import crafttweaker.CraftTweakerAPI;
import youyihj.zenutils.api.zenscript.SidedZenRegister;
import crafttweaker.api.minecraft.CraftTweakerMC;
import crafttweaker.api.player.IPlayer;
import hellfirepvp.astralsorcery.common.constellation.IMajorConstellation;
import hellfirepvp.astralsorcery.common.data.research.ResearchManager;

import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.math.MathHelper;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenExpansion;
import stanhebben.zenscript.annotations.ZenMethod;
import youyihj.zenutils.api.zenscript.SidedZenRegister;

import java.util.List;


@SidedZenRegister(modDeps = "astralsorcery")
@ZenExpansion("crafttweaker.player.IPlayer")
@ZenClass("mods.randomtweaker.astralsorcery.IPlayer")
public abstract class IPlayerExpansionAs {
public class IPlayerExpansionAs {

@ZenMethod
public static float getPerkPercentToNextLevel(IPlayer player) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
package ink.ikx.rt.api.mods.astralsorcery.event;
package dev.ikx.rt.api.mods.astralsorcery.event;

import youyihj.zenutils.api.zenscript.SidedZenRegister;
import crafttweaker.api.entity.IEntity;
import crafttweaker.api.entity.IEntityItem;
import crafttweaker.api.event.IEntityEvent;
import crafttweaker.api.event.IEventCancelable;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.minecraft.CraftTweakerMC;
import crafttweaker.api.world.IWorld;
import ink.ikx.rt.impl.mods.astralsorcery.event.AttunementRecipeCompleteEvent;

import java.util.List;
import dev.ikx.rt.impl.mods.astralsorcery.event.AttunementRecipeCompleteEvent;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenGetter;
import stanhebben.zenscript.annotations.ZenMethod;
import stanhebben.zenscript.annotations.ZenSetter;
import youyihj.zenutils.api.zenscript.SidedZenRegister;

import java.util.List;


@SidedZenRegister(modDeps = "astralsorcery")
@ZenClass("mods.randomtweaker.astralsorcery.AttunementRecipeCompleteEvent")
public abstract class CTAttunementRecipeCompleteEvent implements IEventCancelable, IEntityEvent {
public class CTAttunementRecipeCompleteEvent implements IEventCancelable, IEntityEvent {

private final AttunementRecipeCompleteEvent event;

Expand Down Expand Up @@ -67,7 +67,7 @@ public IEntity getEntity() {

@ZenGetter("itemEntity")
@ZenMethod
public IEntityItem getItemEntity(){
public IEntityItem getItemEntity() {
return CraftTweakerMC.getIEntityItem(this.event.getInputEntity());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ink.ikx.rt.api.mods.astralsorcery.event;
package dev.ikx.rt.api.mods.astralsorcery.event;

import youyihj.zenutils.api.zenscript.SidedZenRegister;
import crafttweaker.api.entity.IEntity;
import crafttweaker.api.event.IEntityEvent;
import crafttweaker.api.minecraft.CraftTweakerMC;
import crafttweaker.api.world.IWorld;
import ink.ikx.rt.impl.mods.astralsorcery.event.AttunementStartEvent;
import dev.ikx.rt.impl.mods.astralsorcery.event.AttunementStartEvent;

import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenGetter;
Expand All @@ -14,7 +14,7 @@

@SidedZenRegister(modDeps = "astralsorcery")
@ZenClass("mods.randomtweaker.astralsorcery.AttunementStartEvent")
public abstract class CTAttunementStartEvent implements IEntityEvent {
public class CTAttunementStartEvent implements IEntityEvent {

private final AttunementStartEvent event;

Expand Down
Loading