Skip to content

Commit

Permalink
update MaFgLib version
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed May 29, 2024
1 parent 88d3574 commit c0bc32a
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 89 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ loom.platform=forge
yarn_mappings=1.20.1+build.10

# Mod Properties
mod_version=0.1.3
mod_version=0.1.4
maven_group=org.thinkingstudio.tweakerge
archives_base_name=Tweakerge
mod_id=tweakerge
Expand All @@ -21,4 +21,4 @@ loom.platform=forge
curseforge_id=915857

# Dependencies
malilib_version=0.1.9-mc1.20.1
malilib_version=0.1.11-mc1.20.1
25 changes: 0 additions & 25 deletions src/main/java/fi/dy/masa/tweakeroo/Tweakeroo.java
Original file line number Diff line number Diff line change
@@ -1,36 +1,11 @@
package fi.dy.masa.tweakeroo;

import fi.dy.masa.malilib.compat.forge.ForgePlatformUtils;
import fi.dy.masa.tweakeroo.gui.GuiConfigs;
import fi.dy.masa.tweakeroo.tweaks.PlacementTweaks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.loading.FMLLoader;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import fi.dy.masa.malilib.event.InitializationHandler;

@Mod(Reference.MOD_ID)
public class Tweakeroo {
public static final Logger logger = LogManager.getLogger(Reference.MOD_ID);

public static int renderCountItems;
public static int renderCountXPOrbs;

public Tweakeroo() {
if (FMLLoader.getDist().isClient()) {
ForgePlatformUtils.getInstance().getClientModIgnoredServerOnly();
InitializationHandler.getInstance().registerInitializationHandler(new InitHandler());
ForgePlatformUtils.getInstance().getMod(Reference.MOD_ID).registerModConfigScreen((screen) -> {
GuiConfigs gui = new GuiConfigs();
gui.setParent(screen);
return gui;
});

MinecraftForge.EVENT_BUS.<PlayerDestroyItemEvent>addListener(event -> {
PlacementTweaks.onProcessRightClickPost(event.getEntity(), event.getHand());
});
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/fi/dy/masa/tweakeroo/gui/GuiConfigs.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class GuiConfigs extends GuiConfigsBase

public GuiConfigs()
{
super(10, 50, Reference.MOD_ID, null, "tweakeroo.gui.title.configs", String.format("%s", Reference.MOD_VERSION));
super(10, 50, Reference.MOD_ID, null, "tweakeroo.gui.title.configs", Reference.MOD_NAME, Reference.MOD_VERSION);
}

@Override
Expand Down
31 changes: 31 additions & 0 deletions src/main/java/org/thinkingstudio/tweakerge/Tweakerge.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.thinkingstudio.tweakerge;

import fi.dy.masa.malilib.event.InitializationHandler;
import fi.dy.masa.tweakeroo.InitHandler;
import fi.dy.masa.tweakeroo.Reference;
import fi.dy.masa.tweakeroo.gui.GuiConfigs;
import fi.dy.masa.tweakeroo.tweaks.PlacementTweaks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.loading.FMLLoader;
import org.thinkingstudio.mafglib.util.ForgePlatformUtils;

@Mod(Reference.MOD_ID)
public class Tweakerge {
public Tweakerge() {
if (FMLLoader.getDist().isClient()) {
ForgePlatformUtils.getInstance().getClientModIgnoredServerOnly();
InitializationHandler.getInstance().registerInitializationHandler(new InitHandler());
ForgePlatformUtils.getInstance().registerModConfigScreen(Reference.MOD_ID, (screen) -> {
GuiConfigs gui = new GuiConfigs();
gui.setParent(screen);
return gui;
});

MinecraftForge.EVENT_BUS.<PlayerDestroyItemEvent>addListener(event -> {
PlacementTweaks.onProcessRightClickPost(event.getEntity(), event.getHand());
});
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/assets/tweakerge/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

"tweakeroo.gui.button.misc.command_block.hover.update_execution": "Whether or not multiple triggers per game tick are allowed",

"tweakeroo.gui.title.configs": "Tweakeroo Configs - %s",
"tweakeroo.gui.title.configs": "%s Configs - %s",

"tweakeroo.hotkeys.category.disable_toggle_hotkeys": "Disable Toggle Hotkeys",
"tweakeroo.hotkeys.category.generic_hotkeys": "Generic hotkeys",
Expand Down
Loading

0 comments on commit c0bc32a

Please sign in to comment.