generated from BocchiKessokuTeam/ForgeTemplateMod-ArchLoom
-
Notifications
You must be signed in to change notification settings - Fork 2
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
8 changed files
with
187 additions
and
40 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,26 +1,14 @@ | ||
package fi.dy.masa.itemscroller; | ||
|
||
import fi.dy.masa.itemscroller.gui.GuiConfigs; | ||
import fi.dy.masa.malilib.compat.forge.ForgePlatformUtils; | ||
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 ItemScroller { | ||
public static final Logger logger = LogManager.getLogger(Reference.MOD_ID); | ||
|
||
public ItemScroller() { | ||
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; | ||
}); | ||
} | ||
public static void onInitialize() | ||
{ | ||
InitializationHandler.getInstance().registerInitializationHandler(new InitHandler()); | ||
} | ||
} |
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
20 changes: 0 additions & 20 deletions
20
src/main/java/fi/dy/masa/itemscroller/mixin/MixinForgeHooksClient.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/main/java/org/thinkingstudio/rocknroller/RocknRoller.java
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,34 @@ | ||
package org.thinkingstudio.rocknroller; | ||
|
||
import fi.dy.masa.itemscroller.ItemScroller; | ||
import fi.dy.masa.itemscroller.Reference; | ||
import fi.dy.masa.itemscroller.event.RenderEventHandler; | ||
import fi.dy.masa.itemscroller.gui.GuiConfigs; | ||
import net.minecraftforge.client.event.GuiScreenEvent; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.loading.FMLLoader; | ||
import org.thinkingstudio.mafglib.util.ForgePlatformUtils; | ||
|
||
@Mod(Reference.MOD_ID) | ||
public class RocknRoller { | ||
public RocknRoller() { | ||
if (FMLLoader.getDist().isClient()) { | ||
// Make sure the mod being absent on the other network side does not cause | ||
// the client to display the server as incompatible | ||
ForgePlatformUtils.getInstance().getClientModIgnoredServerOnly(); | ||
ItemScroller.onInitialize(); | ||
|
||
// Config Screen | ||
ForgePlatformUtils.getInstance().registerModConfigScreen(Reference.MOD_ID, (screen) -> { | ||
GuiConfigs gui = new GuiConfigs(); | ||
gui.setParent(screen); | ||
return gui; | ||
}); | ||
|
||
MinecraftForge.EVENT_BUS.<GuiScreenEvent.DrawScreenEvent.Post>addListener(event -> { | ||
RenderEventHandler.instance().onDrawScreenPost(event.getGui().getMinecraft()); | ||
}); | ||
} | ||
} | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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