This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
forked from Dance-Dog/RewardClaim
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed set-cookie header getting the 2nd header, removed Lombok, done …
…activeAd header, cleaned code, add support for new forge simplified some code
- Loading branch information
Showing
20 changed files
with
1,382 additions
and
1,227 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
Binary file not shown.
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,6 +1,5 @@ | ||
#Sun Mar 29 22:07:45 EDT 2020 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package me.dancedog.rewardclaim; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.util.ChatComponentText; | ||
import net.minecraft.util.EnumChatFormatting; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import net.minecraftforge.fml.common.Mod.EventHandler; | ||
import net.minecraftforge.fml.common.event.FMLInitializationEvent; | ||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
import java.util.concurrent.Executors; | ||
import java.util.concurrent.ThreadPoolExecutor; | ||
|
||
@net.minecraftforge.fml.common.Mod( | ||
modid = RewardClaim.MODID, | ||
version = RewardClaim.VERSION, | ||
name = RewardClaim.MODNAME, | ||
useMetadata = true) | ||
public class RewardClaim { | ||
|
||
public static final ThreadPoolExecutor pool = (ThreadPoolExecutor) Executors.newFixedThreadPool(10); | ||
public static final String MODID = "rewardclaim"; | ||
public static final String VERSION = "0.2"; | ||
static final String MODNAME = "RewardClaim"; | ||
|
||
private static Logger logger = LogManager.getLogger(MODID); | ||
|
||
public static Logger getLogger() { | ||
return RewardClaim.logger; | ||
} | ||
|
||
@EventHandler | ||
public void preInit(FMLPreInitializationEvent event) { | ||
logger = event.getModLog(); | ||
} | ||
|
||
@EventHandler | ||
public void init(FMLInitializationEvent event) { | ||
MinecraftForge.EVENT_BUS.register(new RewardListener()); | ||
} | ||
|
||
/** | ||
* Get a resource from the mod's GUI asset folder | ||
* | ||
* @param path Path to the resource (appended to /gui/) | ||
* @return ResourceLocation of the requested asset | ||
*/ | ||
public static ResourceLocation getGuiTexture(String path) { | ||
return new ResourceLocation(MODID + ":textures/gui/" + path); | ||
} | ||
|
||
public static void printWarning(String message, Throwable t, boolean inChat) { | ||
logger.warn(message, t); | ||
|
||
if (inChat && Minecraft.getMinecraft().thePlayer != null) { | ||
ChatComponentText chatMessage = new ChatComponentText("[" + MODNAME + "] " + message); | ||
chatMessage.getChatStyle().setBold(true).setColor(EnumChatFormatting.RED); | ||
Minecraft.getMinecraft().thePlayer.addChatMessage(chatMessage); | ||
} | ||
} | ||
} |
Oops, something went wrong.