forked from Buuz135/HotOrNot
-
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.
- Loading branch information
Showing
7 changed files
with
211 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
modGroup=com.buuz135 | ||
minecraftVersion=1.12 | ||
modVersion=1.1.4 | ||
minecraftVersion=1.12.2 | ||
modVersion=1.1.5 | ||
modBaseName=HotOrNotTFC | ||
forgeVersion=1.12.2-14.23.5.2768 | ||
mcpVersion=snapshot_20180508 | ||
forgeVersion=1.12.2-14.23.5.2847 | ||
mcpVersion=stable_39 |
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,68 @@ | ||
package com.buuz135.hotornot.config; | ||
|
||
import net.minecraftforge.common.config.Config; | ||
import net.minecraftforge.common.config.ConfigManager; | ||
import net.minecraftforge.fml.client.event.ConfigChangedEvent; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
|
||
import com.buuz135.hotornot.HotOrNot; | ||
|
||
@Config(modid = HotOrNot.MOD_ID) | ||
public class HotConfig | ||
{ | ||
@Config.Comment("If true, hot effects for items will be enabled") | ||
public static boolean HOT_ITEMS = true; | ||
|
||
@Config.Comment("If true, hot effects for fluids will be enabled") | ||
public static boolean HOT_FLUIDS = true; | ||
|
||
@Config.Comment("If true, cold effects for fluids will be enabled") | ||
public static boolean COLD_FLUIDS = true; | ||
|
||
@Config.Comment("If true, gaseous effects for fluids will be enabled") | ||
public static boolean GASEOUS_FLUIDS = true; | ||
|
||
@Config.Comment("If true, items causing effects will get a tooltip") | ||
public static boolean TOOLTIP = true; | ||
|
||
@Config.Comment("If true, hot items make the player yeet them") | ||
public static boolean YEET = true; | ||
|
||
@Config.Comment("How hot a fluid should be to start burning the player (in Celsius)") | ||
public static int HOT_FLUID = 480; | ||
|
||
@Config.Comment("How cold a fluid should be to start adding effects the player (in Celsius)") | ||
public static int COLD_FLUID = 0; | ||
|
||
@Config.Comment("How hot an item should be to start burning the player (in Celsius)") | ||
public static int HOT_ITEM = 480; | ||
|
||
@Config.Comment("Max durability of the mitts") | ||
public static int MITTS_DURABILITY = 20 * 60 * 10; | ||
|
||
@Config.Comment("Hot items that are included manually") | ||
public static String[] HOT_ITEM_ADDITIONS = new String[] {"minecraft:blaze_rod"}; | ||
|
||
@Config.Comment("Cold items that are included manually") | ||
public static String[] COLD_ITEM_ADDITIONS = new String[] {"minecraft:ice", "minecraft:packed_ice"}; | ||
|
||
@Config.Comment("Gaseous items that are included manually") | ||
public static String[] GASEOUS_ITEM_ADDITIONS = new String[] {"mod_id:item"}; | ||
|
||
@Config.Comment("Items that are excluded") | ||
public static String[] ITEM_REMOVALS = new String[] {"immersiveengineering:drill", "immersiveengineering:chemthrower", "immersivepetroleum:fluid_diesel", "immersivepetroleum:fluid_gasoline"}; | ||
|
||
@Mod.EventBusSubscriber(modid = HotOrNot.MOD_ID) | ||
private static class EventHandler | ||
{ | ||
@SubscribeEvent | ||
public static void onConfigChanged(final ConfigChangedEvent.OnConfigChangedEvent event) | ||
{ | ||
if (event.getModID().equals(HotOrNot.MOD_ID)) | ||
{ | ||
ConfigManager.sync(HotOrNot.MOD_ID, Config.Type.INSTANCE); | ||
} | ||
} | ||
} | ||
} |
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,58 @@ | ||
package com.buuz135.hotornot.config; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
public class HotLists | ||
{ | ||
public static boolean isRemoved(ItemStack stack) | ||
{ | ||
String regName = stack.getItem().getRegistryName().toString(); | ||
for (String s : HotConfig.ITEM_REMOVALS) | ||
{ | ||
if (regName.equals(s)) | ||
{ | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
public static boolean isHot(ItemStack stack) | ||
{ | ||
String regName = stack.getItem().getRegistryName().toString(); | ||
for (String s : HotConfig.HOT_ITEM_ADDITIONS) | ||
{ | ||
if (regName.equals(s)) | ||
{ | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
public static boolean isCold(ItemStack stack) | ||
{ | ||
String regName = stack.getItem().getRegistryName().toString(); | ||
for (String s : HotConfig.COLD_ITEM_ADDITIONS) | ||
{ | ||
if (regName.equals(s)) | ||
{ | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
public static boolean isGaseous(ItemStack stack) | ||
{ | ||
String regName = stack.getItem().getRegistryName().toString(); | ||
for (String s : HotConfig.GASEOUS_ITEM_ADDITIONS) | ||
{ | ||
if (regName.equals(s)) | ||
{ | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
} |
Oops, something went wrong.