forked from ThinkingStudios/Tweakeroo-Forge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
58 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.