mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Added poor Ores to the Crusher
This commit is contained in:
parent
0f6225959f
commit
ed1d09148c
26 changed files with 75 additions and 68 deletions
|
@ -28,7 +28,6 @@ import ellpeck.actuallyadditions.recipe.HairyBallHandler;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.Util;
|
||||||
import net.minecraft.block.BlockDispenser;
|
|
||||||
|
|
||||||
@Mod(modid = ModUtil.MOD_ID, name = ModUtil.NAME, version = ModUtil.VERSION, canBeDeactivated = false)
|
@Mod(modid = ModUtil.MOD_ID, name = ModUtil.NAME, version = ModUtil.VERSION, canBeDeactivated = false)
|
||||||
public class ActuallyAdditions{
|
public class ActuallyAdditions{
|
||||||
|
@ -41,7 +40,7 @@ public class ActuallyAdditions{
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event){
|
public void preInit(FMLPreInitializationEvent event){
|
||||||
Util.logInfo("Starting PreInitialization Phase...");
|
ModUtil.LOGGER.info("Starting PreInitialization Phase...");
|
||||||
|
|
||||||
ConfigurationHandler.init(event.getSuggestedConfigurationFile());
|
ConfigurationHandler.init(event.getSuggestedConfigurationFile());
|
||||||
PacketHandler.init();
|
PacketHandler.init();
|
||||||
|
@ -52,12 +51,12 @@ public class ActuallyAdditions{
|
||||||
FuelHandler.init();
|
FuelHandler.init();
|
||||||
proxy.preInit();
|
proxy.preInit();
|
||||||
|
|
||||||
Util.logInfo("PreInitialization Finished.");
|
ModUtil.LOGGER.info("PreInitialization Finished.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void init(FMLInitializationEvent event){
|
public void init(FMLInitializationEvent event){
|
||||||
Util.logInfo("Starting Initialization Phase...");
|
ModUtil.LOGGER.info("Starting Initialization Phase...");
|
||||||
|
|
||||||
InitAchievements.init();
|
InitAchievements.init();
|
||||||
GuiHandler.init();
|
GuiHandler.init();
|
||||||
|
@ -68,12 +67,12 @@ public class ActuallyAdditions{
|
||||||
FMLInterModComms.sendMessage("Waila", "register", "ellpeck.actuallyadditions.waila.WailaDataProvider.register");
|
FMLInterModComms.sendMessage("Waila", "register", "ellpeck.actuallyadditions.waila.WailaDataProvider.register");
|
||||||
proxy.init();
|
proxy.init();
|
||||||
|
|
||||||
Util.logInfo("Initialization Finished.");
|
ModUtil.LOGGER.info("Initialization Finished.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void postInit(FMLPostInitializationEvent event){
|
public void postInit(FMLPostInitializationEvent event){
|
||||||
Util.logInfo("Starting PostInitialization Phase...");
|
ModUtil.LOGGER.info("Starting PostInitialization Phase...");
|
||||||
|
|
||||||
ItemCoffee.initIngredients();
|
ItemCoffee.initIngredients();
|
||||||
CrusherCrafting.init();
|
CrusherCrafting.init();
|
||||||
|
@ -81,7 +80,7 @@ public class ActuallyAdditions{
|
||||||
HairyBallHandler.init();
|
HairyBallHandler.init();
|
||||||
proxy.postInit();
|
proxy.postInit();
|
||||||
|
|
||||||
Util.logInfo("PostInitialization Finished.");
|
ModUtil.LOGGER.info("PostInitialization Finished.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -92,9 +91,9 @@ public class ActuallyAdditions{
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void serverStarting(FMLServerStartingEvent event){
|
public void serverStarting(FMLServerStartingEvent event){
|
||||||
|
|
||||||
BlockDispenser.dispenseBehaviorRegistry.putObject(InitItems.itemBucketCanolaOil, new DispenserHandlerEmptyBucket());
|
Util.registerDispenserHandler(InitItems.itemBucketOil, new DispenserHandlerEmptyBucket());
|
||||||
BlockDispenser.dispenseBehaviorRegistry.putObject(InitItems.itemBucketOil, new DispenserHandlerEmptyBucket());
|
Util.registerDispenserHandler(InitItems.itemBucketCanolaOil, new DispenserHandlerEmptyBucket());
|
||||||
BlockDispenser.dispenseBehaviorRegistry.putObject(InitItems.itemFertilizer, new DispenserHandlerFertilize());
|
Util.registerDispenserHandler(InitItems.itemFertilizer, new DispenserHandlerFertilize());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package ellpeck.actuallyadditions.achievement;
|
package ellpeck.actuallyadditions.achievement;
|
||||||
|
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
|
||||||
import net.minecraft.stats.Achievement;
|
import net.minecraft.stats.Achievement;
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraftforge.common.AchievementPage;
|
import net.minecraftforge.common.AchievementPage;
|
||||||
|
@ -18,7 +17,7 @@ public class InitAchievements{
|
||||||
public static ArrayList<Achievement> achievementList = new ArrayList<Achievement>();
|
public static ArrayList<Achievement> achievementList = new ArrayList<Achievement>();
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Achievements...");
|
ModUtil.LOGGER.info("Initializing Achievements...");
|
||||||
|
|
||||||
for(int i = 0; i < TheAchievements.values().length; i++){
|
for(int i = 0; i < TheAchievements.values().length; i++){
|
||||||
achievementList.add(TheAchievements.values()[i].ach);
|
achievementList.add(TheAchievements.values()[i].ach);
|
||||||
|
|
|
@ -4,7 +4,6 @@ import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
||||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||||
import ellpeck.actuallyadditions.util.CompatUtil;
|
import ellpeck.actuallyadditions.util.CompatUtil;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
|
@ -79,7 +78,7 @@ public class InitBlocks{
|
||||||
public static Block blockColoredLampOn;
|
public static Block blockColoredLampOn;
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Blocks...");
|
ModUtil.LOGGER.info("Initializing Blocks...");
|
||||||
|
|
||||||
blockTestifiBucksGreenWall = new BlockGeneric("blockTestifiBucksGreenWall");
|
blockTestifiBucksGreenWall = new BlockGeneric("blockTestifiBucksGreenWall");
|
||||||
BlockUtil.register(blockTestifiBucksGreenWall, BlockGeneric.TheItemBlock.class);
|
BlockUtil.register(blockTestifiBucksGreenWall, BlockGeneric.TheItemBlock.class);
|
||||||
|
|
|
@ -5,7 +5,6 @@ import ellpeck.actuallyadditions.items.ItemCoffee;
|
||||||
import ellpeck.actuallyadditions.recipe.CrusherRecipeManualRegistry;
|
import ellpeck.actuallyadditions.recipe.CrusherRecipeManualRegistry;
|
||||||
import ellpeck.actuallyadditions.recipe.HairyBallHandler;
|
import ellpeck.actuallyadditions.recipe.HairyBallHandler;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
@ -27,7 +26,7 @@ public class InterModCommunications{
|
||||||
|
|
||||||
if(input != null && outputOne != null){
|
if(input != null && outputOne != null){
|
||||||
CrusherRecipeManualRegistry.registerRecipe(input, outputOne, outputTwo, secondChance);
|
CrusherRecipeManualRegistry.registerRecipe(input, outputOne, outputTwo, secondChance);
|
||||||
Util.logInfo("Crusher Recipe that was sent from Mod " + message.getSender() + " has been registered successfully: " + input.toString() + " -> " + outputOne.toString() + (outputTwo != null ? " + " + outputTwo.toString() + ", Second Chance: " + secondChance : ""));
|
ModUtil.LOGGER.info("Crusher Recipe that was sent from Mod "+message.getSender()+" has been registered successfully: "+input.toString()+" -> "+outputOne.toString()+(outputTwo != null ? " + "+outputTwo.toString()+", Second Chance: "+secondChance : ""));
|
||||||
}
|
}
|
||||||
else ModUtil.LOGGER.log(Level.ERROR, "Crusher Recipe that was sent from Mod " + message.getSender() + " could not be registered: It's missing an Input or an Output!");
|
else ModUtil.LOGGER.log(Level.ERROR, "Crusher Recipe that was sent from Mod " + message.getSender() + " could not be registered: It's missing an Input or an Output!");
|
||||||
}
|
}
|
||||||
|
@ -45,7 +44,7 @@ public class InterModCommunications{
|
||||||
if(input != null && potionID > 0 && duration > 0 && maxAmp > 0){
|
if(input != null && potionID > 0 && duration > 0 && maxAmp > 0){
|
||||||
PotionEffect effect = new PotionEffect(potionID, duration, amplifier);
|
PotionEffect effect = new PotionEffect(potionID, duration, amplifier);
|
||||||
ItemCoffee.registerIngredient(new ItemCoffee.Ingredient(input, new PotionEffect[]{effect}, maxAmp));
|
ItemCoffee.registerIngredient(new ItemCoffee.Ingredient(input, new PotionEffect[]{effect}, maxAmp));
|
||||||
Util.logInfo("Coffee Machine Recipe that was sent from Mod " + message.getSender() + " has been registered successfully: " + input.toString() + " -> " + effect.toString());
|
ModUtil.LOGGER.info("Coffee Machine Recipe that was sent from Mod "+message.getSender()+" has been registered successfully: "+input.toString()+" -> "+effect.toString());
|
||||||
}
|
}
|
||||||
else ModUtil.LOGGER.log(Level.ERROR, "Coffee Machine Recipe that was sent from Mod " + message.getSender() + " could not be registered: It's missing an Input, a Potion ID, a Duration or a max Amplifier!");
|
else ModUtil.LOGGER.log(Level.ERROR, "Coffee Machine Recipe that was sent from Mod " + message.getSender() + " could not be registered: It's missing an Input, a Potion ID, a Duration or a max Amplifier!");
|
||||||
}
|
}
|
||||||
|
@ -59,7 +58,7 @@ public class InterModCommunications{
|
||||||
|
|
||||||
if(output != null && chance > 0){
|
if(output != null && chance > 0){
|
||||||
HairyBallHandler.addReturn(output, chance);
|
HairyBallHandler.addReturn(output, chance);
|
||||||
Util.logInfo("Ball Of Hair Recipe that was sent from Mod " + message.getSender() + " has been registered successfully: " + output.toString() + ", Chance: " + chance);
|
ModUtil.LOGGER.info("Ball Of Hair Recipe that was sent from Mod "+message.getSender()+" has been registered successfully: "+output.toString()+", Chance: "+chance);
|
||||||
}
|
}
|
||||||
else ModUtil.LOGGER.log(Level.ERROR, "Ball Of Hair Recipe that was sent from Mod " + message.getSender() + " could not be registered: It's missing an Output or a Chance!");
|
else ModUtil.LOGGER.log(Level.ERROR, "Ball Of Hair Recipe that was sent from Mod " + message.getSender() + " could not be registered: It's missing an Output or a Chance!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package ellpeck.actuallyadditions.config;
|
package ellpeck.actuallyadditions.config;
|
||||||
|
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -10,7 +10,7 @@ public class ConfigurationHandler{
|
||||||
public static final String ISSUES_WARNING = " [THIS COULD CAUSE ISSUES, CHANGE AT YOUR OWN RISK!]";
|
public static final String ISSUES_WARNING = " [THIS COULD CAUSE ISSUES, CHANGE AT YOUR OWN RISK!]";
|
||||||
|
|
||||||
public static void init(File configFile){
|
public static void init(File configFile){
|
||||||
Util.logInfo("Grabbing Configurations...");
|
ModUtil.LOGGER.info("Grabbing Configurations...");
|
||||||
Configuration config = new Configuration(configFile);
|
Configuration config = new Configuration(configFile);
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
|
@ -6,7 +6,7 @@ import ellpeck.actuallyadditions.items.metalists.TheFoods;
|
||||||
import ellpeck.actuallyadditions.recipe.CrusherRecipeAutoRegistry;
|
import ellpeck.actuallyadditions.recipe.CrusherRecipeAutoRegistry;
|
||||||
import ellpeck.actuallyadditions.recipe.CrusherRecipeAutoRegistry.SearchCase;
|
import ellpeck.actuallyadditions.recipe.CrusherRecipeAutoRegistry.SearchCase;
|
||||||
import ellpeck.actuallyadditions.recipe.CrusherRecipeManualRegistry;
|
import ellpeck.actuallyadditions.recipe.CrusherRecipeManualRegistry;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack;
|
||||||
public class CrusherCrafting{
|
public class CrusherCrafting{
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Crusher Recipes...");
|
ModUtil.LOGGER.info("Initializing Crusher Recipes...");
|
||||||
|
|
||||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.redstone_ore), new ItemStack(Items.redstone, 10));
|
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.redstone_ore), new ItemStack(Items.redstone, 10));
|
||||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.lapis_ore), new ItemStack(InitItems.itemDust, 12, TheDusts.LAPIS.ordinal()));
|
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.lapis_ore), new ItemStack(InitItems.itemDust, 12, TheDusts.LAPIS.ordinal()));
|
||||||
|
@ -30,6 +30,7 @@ public class CrusherCrafting{
|
||||||
CrusherRecipeManualRegistry.registerRecipe("oreIron", "dustIron", "dustGold", 20, 2, 1);
|
CrusherRecipeManualRegistry.registerRecipe("oreIron", "dustIron", "dustGold", 20, 2, 1);
|
||||||
|
|
||||||
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("oreNether", 6));
|
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("oreNether", 6));
|
||||||
|
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("orePoor", 4, "nugget"));
|
||||||
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("denseore", 8));
|
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("denseore", 8));
|
||||||
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("gem", 1));
|
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("gem", 1));
|
||||||
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("ingot", 1));
|
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("ingot", 1));
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package ellpeck.actuallyadditions.crafting;
|
package ellpeck.actuallyadditions.crafting;
|
||||||
|
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
|
||||||
public class InitCrafting {
|
public class InitCrafting {
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Crafting Recipes...");
|
ModUtil.LOGGER.info("Initializing Crafting Recipes...");
|
||||||
|
|
||||||
ItemCrafting.init();
|
ItemCrafting.init();
|
||||||
BlockCrafting.init();
|
BlockCrafting.init();
|
||||||
|
|
|
@ -4,22 +4,23 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||||
import ellpeck.actuallyadditions.achievement.InitAchievements;
|
import ellpeck.actuallyadditions.achievement.InitAchievements;
|
||||||
import ellpeck.actuallyadditions.achievement.TheAchievements;
|
import ellpeck.actuallyadditions.achievement.TheAchievements;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class CraftEvent{
|
public class CraftEvent{
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onCraftedEvent(PlayerEvent.ItemCraftedEvent event){
|
public void onCraftedEvent(PlayerEvent.ItemCraftedEvent event){
|
||||||
checkAchievements(event.crafting, event, InitAchievements.CRAFTING_ACH);
|
checkAchievements(event.crafting, event.player, InitAchievements.CRAFTING_ACH);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void checkAchievements(ItemStack gotten, PlayerEvent event, int type){
|
public static void checkAchievements(ItemStack gotten, EntityPlayer player, int type){
|
||||||
for(int i = 0; i < TheAchievements.values().length; i++){
|
for(int i = 0; i < TheAchievements.values().length; i++){
|
||||||
TheAchievements ach = TheAchievements.values()[i];
|
TheAchievements ach = TheAchievements.values()[i];
|
||||||
if(ach.type == type){
|
if(ach.type == type){
|
||||||
if(gotten.getItem() == ach.ach.theItemStack.getItem()){
|
if(gotten.getItem() == ach.ach.theItemStack.getItem()){
|
||||||
if(gotten.getItemDamage() == ach.ach.theItemStack.getItemDamage()){
|
if(gotten.getItemDamage() == ach.ach.theItemStack.getItemDamage()){
|
||||||
event.player.addStat(ach.ach, 1);
|
player.addStat(ach.ach, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package ellpeck.actuallyadditions.event;
|
package ellpeck.actuallyadditions.event;
|
||||||
|
|
||||||
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.Util;
|
||||||
|
|
||||||
public class InitEvents{
|
public class InitEvents{
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Events...");
|
ModUtil.LOGGER.info("Initializing Events...");
|
||||||
|
|
||||||
Util.registerEvent(new SmeltEvent());
|
Util.registerEvent(new SmeltEvent());
|
||||||
Util.registerEvent(new CraftEvent());
|
Util.registerEvent(new CraftEvent());
|
||||||
|
|
|
@ -8,6 +8,6 @@ public class PickupEvent{
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPickupEvent(PlayerEvent.ItemPickupEvent event){
|
public void onPickupEvent(PlayerEvent.ItemPickupEvent event){
|
||||||
CraftEvent.checkAchievements(event.pickedUp.getEntityItem(), event, InitAchievements.PICKUP_ACH);
|
CraftEvent.checkAchievements(event.pickedUp.getEntityItem(), event.player, InitAchievements.PICKUP_ACH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,6 @@ public class SmeltEvent{
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onSmeltedEvent(PlayerEvent.ItemSmeltedEvent event){
|
public void onSmeltedEvent(PlayerEvent.ItemSmeltedEvent event){
|
||||||
CraftEvent.checkAchievements(event.smelting, event, InitAchievements.SMELTING_ACH);
|
CraftEvent.checkAchievements(event.smelting, event.player, InitAchievements.SMELTING_ACH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||||
import ellpeck.actuallyadditions.items.InitItems;
|
import ellpeck.actuallyadditions.items.InitItems;
|
||||||
import ellpeck.actuallyadditions.items.metalists.TheJams;
|
import ellpeck.actuallyadditions.items.metalists.TheJams;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.WeightedRandomChestContent;
|
import net.minecraft.util.WeightedRandomChestContent;
|
||||||
|
@ -18,7 +17,7 @@ public class InitVillager{
|
||||||
public static final String JAM_HOUSE_CHEST_NAME = ModUtil.MOD_ID_LOWER+".jamHouseChest";
|
public static final String JAM_HOUSE_CHEST_NAME = ModUtil.MOD_ID_LOWER+".jamHouseChest";
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Village Addons...");
|
ModUtil.LOGGER.info("Initializing Village Addons...");
|
||||||
|
|
||||||
if(ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()){
|
if(ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()){
|
||||||
initJamVillagePart();
|
initJamVillagePart();
|
||||||
|
|
|
@ -7,7 +7,6 @@ import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
||||||
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
||||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
|
@ -64,7 +63,7 @@ public class OreGen implements IWorldGenerator{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Registering World Generator...");
|
ModUtil.LOGGER.info("Registering World Generator...");
|
||||||
GameRegistry.registerWorldGenerator(new OreGen(), 10);
|
GameRegistry.registerWorldGenerator(new OreGen(), 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||||
import ellpeck.actuallyadditions.inventory.gui.*;
|
import ellpeck.actuallyadditions.inventory.gui.*;
|
||||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ public class GuiHandler implements IGuiHandler{
|
||||||
public static final int ENERVATOR_ID = 20;
|
public static final int ENERVATOR_ID = 20;
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing GuiHandler...");
|
ModUtil.LOGGER.info("Initializing GuiHandler...");
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(ActuallyAdditions.instance, new GuiHandler());
|
NetworkRegistry.INSTANCE.registerGuiHandler(ActuallyAdditions.instance, new GuiHandler());
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -7,7 +7,7 @@ import ellpeck.actuallyadditions.items.tools.*;
|
||||||
import ellpeck.actuallyadditions.material.InitItemMaterials;
|
import ellpeck.actuallyadditions.material.InitItemMaterials;
|
||||||
import ellpeck.actuallyadditions.util.CompatUtil;
|
import ellpeck.actuallyadditions.util.CompatUtil;
|
||||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
|
@ -81,7 +81,7 @@ public class InitItems{
|
||||||
public static Item itemBattery;
|
public static Item itemBattery;
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Items...");
|
ModUtil.LOGGER.info("Initializing Items...");
|
||||||
|
|
||||||
itemDrill = new ItemDrill();
|
itemDrill = new ItemDrill();
|
||||||
ItemUtil.register(itemDrill);
|
ItemUtil.register(itemDrill);
|
||||||
|
|
|
@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.material;
|
||||||
|
|
||||||
import ellpeck.actuallyadditions.config.values.ConfigFloatValues;
|
import ellpeck.actuallyadditions.config.values.ConfigFloatValues;
|
||||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import net.minecraft.item.Item.ToolMaterial;
|
import net.minecraft.item.Item.ToolMaterial;
|
||||||
import net.minecraftforge.common.util.EnumHelper;
|
import net.minecraftforge.common.util.EnumHelper;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public class InitItemMaterials{
|
||||||
public static ToolMaterial toolMaterialObsidian;
|
public static ToolMaterial toolMaterialObsidian;
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Materials...");
|
ModUtil.LOGGER.info("Initializing Materials...");
|
||||||
|
|
||||||
toolMaterialEmerald = EnumHelper.addToolMaterial("toolMaterialEmerald", ConfigIntValues.EMERALD_HARVEST_LEVEL.getValue(), ConfigIntValues.EMERALD_USES.getValue(), ConfigFloatValues.EMERALD_SPEED.getValue(), ConfigFloatValues.EMERALD_MAX_DAMAGE.getValue(), ConfigIntValues.EMERALD_ENCHANTABILITY.getValue());
|
toolMaterialEmerald = EnumHelper.addToolMaterial("toolMaterialEmerald", ConfigIntValues.EMERALD_HARVEST_LEVEL.getValue(), ConfigIntValues.EMERALD_USES.getValue(), ConfigFloatValues.EMERALD_SPEED.getValue(), ConfigFloatValues.EMERALD_MAX_DAMAGE.getValue(), ConfigIntValues.EMERALD_ENCHANTABILITY.getValue());
|
||||||
toolMaterialObsidian = EnumHelper.addToolMaterial("toolMaterialObsidian", ConfigIntValues.OBSIDIAN_HARVEST_LEVEL.getValue(), ConfigIntValues.OBSIDIAN_USES.getValue(), ConfigFloatValues.OBSIDIAN_SPEED.getValue(), ConfigFloatValues.OBSIDIAN_MAX_DAMAGE.getValue(), ConfigIntValues.OBSIDIAN_ENCHANTABILITY.getValue());
|
toolMaterialObsidian = EnumHelper.addToolMaterial("toolMaterialObsidian", ConfigIntValues.OBSIDIAN_HARVEST_LEVEL.getValue(), ConfigIntValues.OBSIDIAN_USES.getValue(), ConfigFloatValues.OBSIDIAN_SPEED.getValue(), ConfigFloatValues.OBSIDIAN_MAX_DAMAGE.getValue(), ConfigIntValues.OBSIDIAN_ENCHANTABILITY.getValue());
|
||||||
|
|
|
@ -13,7 +13,7 @@ public class NEIActuallyAdditionsConfig implements IConfigureNEI{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadConfig(){
|
public void loadConfig(){
|
||||||
Util.logInfo("Initializing Not Enough Items Plugin...");
|
ModUtil.LOGGER.info("Initializing Not Enough Items Plugin...");
|
||||||
|
|
||||||
API.registerGuiOverlay(GuiCrafter.class, "crafting");
|
API.registerGuiOverlay(GuiCrafter.class, "crafting");
|
||||||
API.registerGuiOverlayHandler(GuiCrafter.class, new DefaultOverlayHandler(), "crafting");
|
API.registerGuiOverlayHandler(GuiCrafter.class, new DefaultOverlayHandler(), "crafting");
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class ClientProxy implements IProxy{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void preInit(){
|
public void preInit(){
|
||||||
Util.logInfo("PreInitializing ClientProxy...");
|
ModUtil.LOGGER.info("PreInitializing ClientProxy...");
|
||||||
|
|
||||||
if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled()){
|
if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled()){
|
||||||
new UpdateChecker().init();
|
new UpdateChecker().init();
|
||||||
|
@ -30,7 +30,7 @@ public class ClientProxy implements IProxy{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(){
|
public void init(){
|
||||||
Util.logInfo("Initializing ClientProxy...");
|
ModUtil.LOGGER.info("Initializing ClientProxy...");
|
||||||
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost()));
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost()));
|
||||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockCompost), new RenderItems(new ModelCompost()));
|
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockCompost), new RenderItems(new ModelCompost()));
|
||||||
|
@ -54,6 +54,6 @@ public class ClientProxy implements IProxy{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postInit(){
|
public void postInit(){
|
||||||
Util.logInfo("PostInitializing ClientProxy...");
|
ModUtil.LOGGER.info("PostInitializing ClientProxy...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
package ellpeck.actuallyadditions.proxy;
|
package ellpeck.actuallyadditions.proxy;
|
||||||
|
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class ServerProxy implements IProxy{
|
public class ServerProxy implements IProxy{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void preInit(){
|
public void preInit(){
|
||||||
Util.logInfo("PreInitializing ServerProxy...");
|
ModUtil.LOGGER.info("PreInitializing ServerProxy...");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(){
|
public void init(){
|
||||||
Util.logInfo("Initializing ServerProxy...");
|
ModUtil.LOGGER.info("Initializing ServerProxy...");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postInit(){
|
public void postInit(){
|
||||||
Util.logInfo("PostInitializing ServerProxy...");
|
ModUtil.LOGGER.info("PostInitializing ServerProxy...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,16 @@ public class CrusherRecipeAutoRegistry{
|
||||||
|
|
||||||
public final String name;
|
public final String name;
|
||||||
public final int resultAmount;
|
public final int resultAmount;
|
||||||
|
public final String replacer;
|
||||||
|
|
||||||
public SearchCase(String name, int resultAmount){
|
public SearchCase(String name, int resultAmount, String replacer){
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.resultAmount = resultAmount;
|
this.resultAmount = resultAmount;
|
||||||
|
this.replacer = replacer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchCase(String name, int resultAmount){
|
||||||
|
this(name, resultAmount, "dust");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,18 +33,20 @@ public class CrusherRecipeAutoRegistry{
|
||||||
if(!exceptions.contains(inputName)){
|
if(!exceptions.contains(inputName)){
|
||||||
int resultAmount = 1;
|
int resultAmount = 1;
|
||||||
String inputNameWithoutPrefix = null;
|
String inputNameWithoutPrefix = null;
|
||||||
|
String replacer = null;
|
||||||
|
|
||||||
for(SearchCase searchCase : searchCases){
|
for(SearchCase searchCase : searchCases){
|
||||||
String toSearch = searchCase.name;
|
String toSearch = searchCase.name;
|
||||||
if(inputName.length() > toSearch.length() && inputName.substring(0, toSearch.length()).equals(toSearch)){
|
if(inputName.length() > toSearch.length() && inputName.substring(0, toSearch.length()).equals(toSearch)){
|
||||||
inputNameWithoutPrefix = inputName.substring(toSearch.length());
|
inputNameWithoutPrefix = inputName.substring(toSearch.length());
|
||||||
resultAmount = searchCase.resultAmount;
|
resultAmount = searchCase.resultAmount;
|
||||||
|
replacer = searchCase.replacer;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(inputNameWithoutPrefix != null){
|
if(inputNameWithoutPrefix != null && replacer != null){
|
||||||
String inputWithDustPrefix = "dust" + inputNameWithoutPrefix;
|
String inputWithDustPrefix = replacer+inputNameWithoutPrefix;
|
||||||
CrusherRecipeManualRegistry.registerRecipe(inputName, inputWithDustPrefix, resultAmount);
|
CrusherRecipeManualRegistry.registerRecipe(inputName, inputWithDustPrefix, resultAmount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class CrusherRecipeManualRegistry{
|
||||||
public static void registerRecipe(String input, String outputOne, String outputTwo, int secondChance, int outputOneAmount, int outputTwoAmount){
|
public static void registerRecipe(String input, String outputOne, String outputTwo, int secondChance, int outputOneAmount, int outputTwoAmount){
|
||||||
ArrayList<ItemStack> inputStacks = (ArrayList<ItemStack>)OreDictionary.getOres(input, false);
|
ArrayList<ItemStack> inputStacks = (ArrayList<ItemStack>)OreDictionary.getOres(input, false);
|
||||||
ArrayList<ItemStack> outputOneStacks = (ArrayList<ItemStack>)OreDictionary.getOres(outputOne, false);
|
ArrayList<ItemStack> outputOneStacks = (ArrayList<ItemStack>)OreDictionary.getOres(outputOne, false);
|
||||||
ArrayList<ItemStack> outputTwoStacks = outputTwo.length() <= 0 ? null : (ArrayList<ItemStack>)OreDictionary.getOres(outputTwo, false);
|
ArrayList<ItemStack> outputTwoStacks = (outputTwo == null || outputTwo.isEmpty()) ? null : (ArrayList<ItemStack>)OreDictionary.getOres(outputTwo, false);
|
||||||
|
|
||||||
if(inputStacks != null && !inputStacks.isEmpty()){
|
if(inputStacks != null && !inputStacks.isEmpty()){
|
||||||
for(ItemStack anInput : inputStacks){
|
for(ItemStack anInput : inputStacks){
|
||||||
|
|
|
@ -6,7 +6,7 @@ import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||||
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
||||||
import ellpeck.actuallyadditions.items.InitItems;
|
import ellpeck.actuallyadditions.items.InitItems;
|
||||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -26,7 +26,7 @@ public class FuelHandler implements IFuelHandler{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Fuelstuffs...");
|
ModUtil.LOGGER.info("Initializing Fuelstuffs...");
|
||||||
|
|
||||||
GameRegistry.registerFuelHandler(new FuelHandler());
|
GameRegistry.registerFuelHandler(new FuelHandler());
|
||||||
setFuelValues();
|
setFuelValues();
|
||||||
|
|
|
@ -2,7 +2,6 @@ package ellpeck.actuallyadditions.tile;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import ellpeck.actuallyadditions.util.ModUtil;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.network.NetworkManager;
|
import net.minecraft.network.NetworkManager;
|
||||||
|
@ -26,7 +25,7 @@ public class TileEntityBase extends TileEntity{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Registering TileEntities...");
|
ModUtil.LOGGER.info("Registering TileEntities...");
|
||||||
GameRegistry.registerTileEntity(TileEntityCompost.class, ModUtil.MOD_ID_LOWER + ":tileEntityCompost");
|
GameRegistry.registerTileEntity(TileEntityCompost.class, ModUtil.MOD_ID_LOWER + ":tileEntityCompost");
|
||||||
GameRegistry.registerTileEntity(TileEntityFeeder.class, ModUtil.MOD_ID_LOWER + ":tileEntityFeeder");
|
GameRegistry.registerTileEntity(TileEntityFeeder.class, ModUtil.MOD_ID_LOWER + ":tileEntityFeeder");
|
||||||
GameRegistry.registerTileEntity(TileEntityGiantChest.class, ModUtil.MOD_ID_LOWER + ":tileEntityGiantChest");
|
GameRegistry.registerTileEntity(TileEntityGiantChest.class, ModUtil.MOD_ID_LOWER + ":tileEntityGiantChest");
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
import net.minecraft.util.IChatComponent;
|
import net.minecraft.util.IChatComponent;
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import org.apache.logging.log4j.Level;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
@ -24,7 +23,7 @@ public class UpdateChecker{
|
||||||
public String changelog;
|
public String changelog;
|
||||||
|
|
||||||
public void init(){
|
public void init(){
|
||||||
Util.logInfo("Initializing Update Checker...");
|
ModUtil.LOGGER.info("Initializing Update Checker...");
|
||||||
Util.registerEvent(this);
|
Util.registerEvent(this);
|
||||||
new UpdateCheckThread();
|
new UpdateCheckThread();
|
||||||
}
|
}
|
||||||
|
@ -66,7 +65,7 @@ public class UpdateChecker{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(){
|
public void run(){
|
||||||
Util.logInfo("Starting Update Check...");
|
ModUtil.LOGGER.info("Starting Update Check...");
|
||||||
try{
|
try{
|
||||||
URL newestURL = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/update/newestVersion.txt");
|
URL newestURL = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/update/newestVersion.txt");
|
||||||
BufferedReader newestReader = new BufferedReader(new InputStreamReader(newestURL.openStream()));
|
BufferedReader newestReader = new BufferedReader(new InputStreamReader(newestURL.openStream()));
|
||||||
|
@ -78,10 +77,10 @@ public class UpdateChecker{
|
||||||
changelog = changeReader.readLine();
|
changelog = changeReader.readLine();
|
||||||
changeReader.close();
|
changeReader.close();
|
||||||
|
|
||||||
Util.logInfo("Update Check done!");
|
ModUtil.LOGGER.info("Update Check done!");
|
||||||
}
|
}
|
||||||
catch(Exception e){
|
catch(Exception e){
|
||||||
ModUtil.LOGGER.log(Level.ERROR, "Update Check failed!");
|
ModUtil.LOGGER.error("Update Check failed!");
|
||||||
checkFailed = true;
|
checkFailed = true;
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,25 @@
|
||||||
package ellpeck.actuallyadditions.util;
|
package ellpeck.actuallyadditions.util;
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import net.minecraft.block.BlockDispenser;
|
||||||
|
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import org.apache.logging.log4j.Level;
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class Util{
|
public class Util{
|
||||||
|
|
||||||
public static final int WILDCARD = OreDictionary.WILDCARD_VALUE;
|
public static final int WILDCARD = OreDictionary.WILDCARD_VALUE;
|
||||||
|
|
||||||
public static void logInfo(String text){
|
|
||||||
ModUtil.LOGGER.log(Level.INFO, text);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void registerEvent(Object o){
|
public static void registerEvent(Object o){
|
||||||
MinecraftForge.EVENT_BUS.register(o);
|
MinecraftForge.EVENT_BUS.register(o);
|
||||||
FMLCommonHandler.instance().bus().register(o);
|
FMLCommonHandler.instance().bus().register(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void registerDispenserHandler(Item item, BehaviorDefaultDispenseItem handler){
|
||||||
|
if(BlockDispenser.dispenseBehaviorRegistry.getObject(item) == null){
|
||||||
|
BlockDispenser.dispenseBehaviorRegistry.putObject(item, handler);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.waila;
|
||||||
|
|
||||||
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
||||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||||
|
@ -53,7 +53,7 @@ public class WailaDataProvider implements IWailaDataProvider{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void register(IWailaRegistrar registrar){
|
public static void register(IWailaRegistrar registrar){
|
||||||
Util.logInfo("Initializing Waila Plugin...");
|
ModUtil.LOGGER.info("Initializing Waila Plugin...");
|
||||||
|
|
||||||
WailaDataProvider provider = new WailaDataProvider();
|
WailaDataProvider provider = new WailaDataProvider();
|
||||||
for(Block theBlock : BlockUtil.wailaRegisterList){
|
for(Block theBlock : BlockUtil.wailaRegisterList){
|
||||||
|
|
Loading…
Reference in a new issue