-
-
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.
Added compatibility layer for mods using older versions
At least I do not need to face transition hell anymore
- Loading branch information
Showing
19 changed files
with
1,264 additions
and
10 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
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
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
33 changes: 33 additions & 0 deletions
33
mc/src/main/java/io/redstudioragnarok/redcore/RedCore.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,33 @@ | ||
package io.redstudioragnarok.redcore; | ||
|
||
import dev.redstudio.redcore.utils.OptiNotFine; | ||
import io.redstudioragnarok.redcore.ticking.RedClientTicker; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import net.minecraftforge.fml.relauncher.Side; | ||
import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
||
/** | ||
* @author Luna Lage (Desoroxxx) | ||
* @deprecated See methods for details. | ||
*/ | ||
@Deprecated | ||
public final class RedCore { | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.ticking.RedClientTicker#startClientTicker} | ||
*/ | ||
@Deprecated | ||
@SideOnly(Side.CLIENT) | ||
public static void startClientTicker() { | ||
MinecraftForge.EVENT_BUS.register(RedClientTicker.class); | ||
} | ||
|
||
/** | ||
* @deprecated Use {@link OptiNotFine#forceOptiFineFastRenderOff} | ||
*/ | ||
@Deprecated | ||
@SideOnly(Side.CLIENT) | ||
public static void forceOptiFineFastRenderOff() { | ||
OptiNotFine.forceOptiFineFastRenderOff(); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
mc/src/main/java/io/redstudioragnarok/redcore/logging/RedLogger.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,45 @@ | ||
package io.redstudioragnarok.redcore.logging; | ||
|
||
import org.apache.logging.log4j.Logger; | ||
|
||
import java.net.URI; | ||
import java.util.Random; | ||
|
||
/** | ||
* @author Luna Lage (Desoroxxx) | ||
* @deprecated See methods for details. | ||
*/ | ||
@Deprecated | ||
public final class RedLogger extends dev.redstudio.redcore.logging.RedLogger { | ||
|
||
/** | ||
* @deprecated Use your own random | ||
*/ | ||
@Deprecated | ||
public static final Random RANDOM = new Random(); | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.logging.RedLogger#RedLogger(String, String, Logger, String...)} | ||
*/ | ||
@Deprecated | ||
public RedLogger(final String modName, final String newIssueLink, final Logger logger, final String... customRecomfortMessages) { | ||
super(modName, newIssueLink, logger, customRecomfortMessages); | ||
} | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.logging.RedLogger#RedLogger(String, URI, Logger, String...)} | ||
*/ | ||
@Deprecated | ||
public RedLogger(final String modName, final URI newIssueLink, final Logger logger, final String... customRecomfortMessages) { | ||
super(modName, newIssueLink, logger, customRecomfortMessages); | ||
} | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.logging.RedLogger#printFramedError} | ||
*/ | ||
@Override | ||
@Deprecated | ||
public void printFramedError(final String category, final String whatHappened, final String whatNow, final String... additionalInformation) { | ||
super.printFramedError(category, whatHappened, whatNow, additionalInformation); | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
mc/src/main/java/io/redstudioragnarok/redcore/ticking/RedClientTickEvent.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,53 @@ | ||
package io.redstudioragnarok.redcore.ticking; | ||
|
||
import net.minecraftforge.fml.common.eventhandler.Event; | ||
|
||
/** | ||
* @author Luna Lage (Desoroxxx) | ||
* @deprecated See methods for details. | ||
*/ | ||
@Deprecated | ||
public class RedClientTickEvent extends Event { | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.ticking.RedClientTickEvent.BiTickEvent} | ||
*/ | ||
@Deprecated | ||
public static class BiTickEvent extends RedClientTickEvent { | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.ticking.RedClientTickEvent.BiTickEvent#BiTickEvent()} | ||
*/ | ||
@Deprecated | ||
public BiTickEvent() { | ||
} | ||
} | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.ticking.RedClientTickEvent.PentaTickEvent} | ||
*/ | ||
@Deprecated | ||
public static class PentaTickEvent extends RedClientTickEvent { | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.ticking.RedClientTickEvent.PentaTickEvent#PentaTickEvent()} | ||
*/ | ||
@Deprecated | ||
public PentaTickEvent() { | ||
} | ||
} | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.ticking.RedClientTickEvent.DecaTickEvent} | ||
*/ | ||
@Deprecated | ||
public static class DecaTickEvent extends RedClientTickEvent { | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.ticking.RedClientTickEvent.DecaTickEvent#DecaTickEvent()} | ||
*/ | ||
@Deprecated | ||
public DecaTickEvent() { | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
mc/src/main/java/io/redstudioragnarok/redcore/ticking/RedClientTicker.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,44 @@ | ||
package io.redstudioragnarok.redcore.ticking; | ||
|
||
import net.minecraftforge.common.MinecraftForge; | ||
import net.minecraftforge.fml.common.eventhandler.EventPriority; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
import net.minecraftforge.fml.common.gameevent.TickEvent; | ||
|
||
/** | ||
* @author Luna Lage (Desoroxxx) | ||
* @deprecated See methods for details. | ||
*/ | ||
@Deprecated | ||
public class RedClientTicker { | ||
|
||
private static int biTickCount, pentaTickCount, decaTickCount; | ||
|
||
/** | ||
* @deprecated Use {@link dev.redstudio.redcore.ticking.RedClientTicker#onClientTickEvent} | ||
*/ | ||
@Deprecated | ||
@SubscribeEvent(priority = EventPriority.HIGHEST) | ||
public static void onClientTickEvent(TickEvent.ClientTickEvent clientTickEvent) { | ||
if (clientTickEvent.phase == TickEvent.Phase.START) { | ||
|
||
biTickCount++; | ||
if (biTickCount == 2) { | ||
MinecraftForge.EVENT_BUS.post(new RedClientTickEvent.BiTickEvent()); | ||
biTickCount = 0; | ||
} | ||
|
||
pentaTickCount++; | ||
if (pentaTickCount == 5) { | ||
MinecraftForge.EVENT_BUS.post(new RedClientTickEvent.PentaTickEvent()); | ||
pentaTickCount = 0; | ||
} | ||
|
||
decaTickCount++; | ||
if (decaTickCount == 10) { | ||
MinecraftForge.EVENT_BUS.post(new RedClientTickEvent.DecaTickEvent()); | ||
decaTickCount = 0; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.