Skip to content

Commit

Permalink
Seasonal Boots (#20) (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alastors authored Dec 3, 2023
1 parent d44f8e3 commit 35fb44f
Show file tree
Hide file tree
Showing 19 changed files with 211 additions and 797 deletions.
3 changes: 2 additions & 1 deletion src/main/java/thaumicboots/events/BootsEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import thaumicboots.api.ItemElectricBoots;
import thaumicboots.item.boots.comet.ItemElectricCometBoots;
import thaumicboots.item.boots.meteor.ItemElectricMeteorBoots;
import thaumicboots.main.Config;
import thaumicboots.main.utils.compat.EMTHelper;

public class BootsEventHandler {
Expand Down Expand Up @@ -108,7 +109,7 @@ public void onLivingFall(LivingFallEvent event) {
Item item = itemStack.getItem();

// if the boots aren't Comet boots or its derivative
if (!(item instanceof ItemElectricCometBoots)) {
if (!Config.emtActive || !(item instanceof ItemElectricCometBoots)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package thaumicboots.item.armor.seasonal.christmas;

public class ItemChristmasArmor {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package thaumicboots.item.boots.unique;

import thaumicboots.api.IComet;
import thaumicboots.api.ItemBoots;
import thaumicboots.main.utils.CalendarHelper;
import thaumicboots.main.utils.TabThaumicBoots;

public class ItemChristmasBoots extends ItemBoots implements IComet {

int modifier = 1;

public ItemChristmasBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par2EnumArmorMaterial, par3, par4);
setCreativeTab(TabThaumicBoots.tabThaumicBoots);
setUnlocalizedName(unlocalisedName);
}

protected void setBootsData() {
super.setBootsData();
if (CalendarHelper.isChristmas()) {
visDiscount = 25;
modifier = 12;
} else {
visDiscount = 2;
}
jumpBonus = 0.35D; // 3.5 blocks
tier = 2;
runBonus = 0.165F;
longrunningbonus = 0.012F * modifier;
steadyBonus = true;
negateFall = true;
waterEffects = true;
unlocalisedName = "ItemChristmasBoots";
iconResPath = "thaumicboots:bootsChristmas";
armorResPath = "thaumicboots:model/boots_christmas.png";
}
}
37 changes: 37 additions & 0 deletions src/main/java/thaumicboots/item/boots/unique/ItemSeasonBoots.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package thaumicboots.item.boots.unique;

import thaumicboots.api.ItemBoots;
import thaumicboots.main.utils.CalendarHelper;
import thaumicboots.main.utils.TabThaumicBoots;

public class ItemSeasonBoots extends ItemBoots {

int modifier = 1;

public ItemSeasonBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par2EnumArmorMaterial, par3, par4);
setCreativeTab(TabThaumicBoots.tabThaumicBoots);
setUnlocalizedName(unlocalisedName);
}

protected void setBootsData() {
super.setBootsData();
jumpBonus = 0.35D; // 3.5 blocks
tier = 2;
runBonus = 0.165F;
steadyBonus = true;
negateFall = true;
waterEffects = true;
unlocalisedName = "ItemSeasonBoots";
iconResPath = "thaumicboots:bootsArcanium";
armorResPath = "thaumicboots:model/boots_arcanium.png";
visDiscount = 3;
if (CalendarHelper.isChristmas()) {
iconResPath = "thaumicboots:bootsChristmas";
armorResPath = "thaumicboots:model/boots_christmas.png";
visDiscount = 12;
modifier = 12;
}
longrunningbonus = 0.003F * modifier;
}
}
18 changes: 11 additions & 7 deletions src/main/java/thaumicboots/main/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import thaumcraft.api.ThaumcraftApi;
import thaumicboots.item.boots.unique.ItemChristmasBoots;
import thaumicboots.item.boots.unique.ItemSeasonBoots;
import thaumicboots.item.tools.ItemThaumicInterfacer;
import thaumicboots.main.utils.VersionInfo;

Expand All @@ -23,15 +26,10 @@ public class Config {
public static final String CATEGORY_MODULES = "modules";

public static boolean thaumcraftActive;
public static int blockStoneDeviceRI;
public static int blockStoneDeviceTwoRI;
public static int blockStoneDeviceThreeRI;

public static Item arcaniumLens;

// Tainted Magic Compat
public static Item comaLasDrogas;

public static Item seasonBoots;
public static Item christmasBoots;
// ----- Config State info ----------------------------------
public static Configuration configuration;
private static Config instance = null;
Expand Down Expand Up @@ -71,6 +69,12 @@ public static void setupBlocks() {}
public static void setupItems() {
arcaniumLens = new ItemThaumicInterfacer();
GameRegistry.registerItem(arcaniumLens, arcaniumLens.getUnlocalizedName());

seasonBoots = new ItemSeasonBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
GameRegistry.registerItem(seasonBoots, seasonBoots.getUnlocalizedName());

christmasBoots = new ItemChristmasBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
GameRegistry.registerItem(christmasBoots, christmasBoots.getUnlocalizedName());
}

private static void processConfigFile() {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/thaumicboots/main/ThaumicBoots.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import thaumicboots.events.BootsEventHandler;
import thaumicboots.main.utils.CalendarHelper;
import thaumicboots.main.utils.LogHelper;
import thaumicboots.main.utils.VersionInfo;

Expand All @@ -29,6 +30,7 @@ public class ThaumicBoots {

@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
CalendarHelper.calendar();
proxy.preInit(event);
}

Expand Down
44 changes: 44 additions & 0 deletions src/main/java/thaumicboots/main/utils/CalendarHelper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package thaumicboots.main.utils;

import java.util.Calendar;

public class CalendarHelper {

private static final int month = Calendar.getInstance().get(Calendar.MONTH) + 1;
private static boolean isIrish = false;
private static boolean isEaster = false;
private static boolean isFree = false;
private static boolean isChristmas = false;

public static void calendar() {
switch (month) {
case 3:
isIrish = true;
case 4:
isEaster = true;
break;
case 7:
isFree = true; // AMERICA #1 BABY
break;
case 12:
isChristmas = true;
break;
}
}

public static boolean isIrish() {
return isIrish;
}

public static boolean isEaster() {
return isEaster;
}

public static boolean isFree() {
return isFree;
}

public static boolean isChristmas() {
return isChristmas;
}
}
67 changes: 64 additions & 3 deletions src/main/java/thaumicboots/main/utils/compat/ThaumcraftHelper.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package thaumicboots.main.utils.compat;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.OreDictionary;

import flaxbeard.thaumicexploration.ThaumicExploration;
import taintedmagic.common.registry.ItemRegistry;
Expand All @@ -20,6 +22,7 @@
import thaumicboots.api.TB_Aspect;
import thaumicboots.main.Config;
import thaumicboots.main.utils.BlockInterface;
import thaumicboots.main.utils.CalendarHelper;
import thaumicboots.main.utils.ItemInterface;
import thaumicboots.main.utils.LocalizationManager;
import thaumicboots.main.utils.VersionInfo;
Expand Down Expand Up @@ -258,13 +261,37 @@ public static void getItems() {
public static InfusionRecipe cometMeteor;
public static InfusionRecipe meteorComet;

public static InfusionRecipe seasonalBoot;
public static CrucibleRecipe seasonalToChristmas;

public static void setupCrafting() {
thaumaturgicCombinator = ThaumcraftApi.addCrucibleRecipe(
"TB_Core_Research",
new ItemStack(Config.arcaniumLens),
new ItemStack(miscResource, 1, MiscResource.THAUMIUM.ordinal()),
new AspectList().add(TB_Aspect.BOOTS, 25).add(Aspect.EXCHANGE, 25).add(TB_Aspect.SPACE, 25));

seasonalBoot = ThaumcraftApi.addInfusionCraftingRecipe(
"TB_Seasonal_Boots",
new ItemStack(Config.seasonBoots),
10,
new AspectList().add(TB_Aspect.BOOTS, 75).add(Aspect.LIGHT, 50).add(Aspect.MAGIC, 50)
.add(Aspect.MOTION, 50).add(Aspect.AURA, 25),
new ItemStack(ConfigItems.itemBootsTraveller),
new ItemStack[] { new ItemStack(Items.fireworks, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(Items.dye, 1, 10), new ItemStack(Items.book),
new ItemStack(Items.fireworks, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(Items.iron_sword), new ItemStack(Blocks.lit_pumpkin),
new ItemStack(ConfigItems.itemFocusFrost), new ItemStack(Blocks.sapling, 1, 1) });

if (CalendarHelper.isChristmas()) {
seasonalToChristmas = ThaumcraftApi.addCrucibleRecipe(
"TB_Seasonal_Boots",
new ItemStack(Config.christmasBoots),
new ItemStack(Config.seasonBoots),
new AspectList().add(Aspect.TRAP, 50).add(Aspect.EXCHANGE, 25).add(Aspect.COLD, 25));
}

if (!EMTHelper.isActive() && !ExplorationsHelper.isActive() && !TaintedHelper.isActive()) {
return;
}
Expand Down Expand Up @@ -347,9 +374,9 @@ public static void setupResearch() {
new ResourceLocation(VersionInfo.ModID, "textures/gui/research_bg1_b.png"));

ResearchItem coreResearch;
ResearchItem explorationsCore, taintedCore, uniqueCore;
ResearchPage core1, core2, explorationsCore1, explorationsCore2, taintedCore1, taintedCore2, uniqueCore1,
uniqueCore2;
ResearchItem explorationsCore, taintedCore, seasonalCore, seasonalStabilized;
ResearchPage core1, core2, explorationsCore1, explorationsCore2, taintedCore1, taintedCore2, seasonalCore1,
seasonalCore2, seasonalStabilized1, seasonalStabilized2;
ResearchPage explorationsTainted1, explorationsTainted2, explorationsTainted3, explorationsCompat1,
explorationsCompat2, explorationsCompat3;

Expand All @@ -369,6 +396,40 @@ public static void setupResearch() {
coreResearch.setParents("THAUMIUM");
ResearchCategories.addResearch(coreResearch);

seasonalCore = new ResearchItem(
"TB_Seasonal_Boots",
category,
new AspectList().add(TB_Aspect.BOOTS, 25).add(Aspect.EXCHANGE, 25).add(Aspect.COLD, 25)
.add(Aspect.MAGIC, 25).add(Aspect.ENERGY, 25),
2,
0,
0,
new ItemStack(Config.seasonBoots));
seasonalCore1 = new ResearchPage("SeasonalCore.1");
seasonalCore2 = new ResearchPage(seasonalBoot);
seasonalCore.setPages(seasonalCore1, seasonalCore2);
seasonalCore.setParents("TB_Core_Research");
ResearchCategories.addResearch(seasonalCore);

seasonalStabilized = new ResearchItem(
"TB_Seasonal_Stabilized",
category,
new AspectList().add(Aspect.TRAP, 50).add(Aspect.CRYSTAL, 25).add(Aspect.EXCHANGE, 25)
.add(Aspect.COLD, 25).add(Aspect.LIGHT, 25),
4,
0,
0,
new ItemStack(Config.christmasBoots));
seasonalStabilized1 = new ResearchPage("SeasonalStabilized.1");
if (CalendarHelper.isChristmas()) {
seasonalStabilized2 = new ResearchPage(seasonalToChristmas);
} else {
seasonalStabilized2 = new ResearchPage("seasonalStabilized2");
}
seasonalStabilized.setPages(seasonalStabilized1, seasonalStabilized2);
seasonalStabilized.setParents("TB_Seasonal_Boots");
ResearchCategories.addResearch(seasonalStabilized);

if (!EMTHelper.isActive() && !ExplorationsHelper.isActive() && !TaintedHelper.isActive()) {
return;
}
Expand Down
10 changes: 10 additions & 0 deletions src/main/resources/assets/thaumicboots/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ item.ItemCometMeteor.name=Icy Boots of the Frozen Meteor

item.ItemPurpleVoidwalkerBoots.name=Altered Boots of the Purple Haze

item.ItemSeasonBoots.name=Boots of the Seasons
item.ItemChristmasBoots.name=Boots of Christmas Spirit

#Research things
tc.research_category.THAUMICBOOTS=Thaumic Boots
tc.research_name.TB_Core_Research=Thaumaturgic Shoemaking
Expand All @@ -66,6 +69,10 @@ tc.research_name.TB_Explorations_Tainted_Compat=Eldritch Celestial Bodies
tc.research_text.TB_Explorations_Tainted_Compat=Discovering Celestial Bodies of the Void
tc.research_name.TB_Explorations_EMT_Compat=Artificial Celestial Magicks
tc.research_text.TB_Explorations_EMT_Compat=The Application of Artificial Energy in Celestial Magicks
tc.research_name.TB_Seasonal_Boots=Seasonal Magicks
tc.research_text.TB_Seasonal_Boots=Christmas Spirits and Other Magickal Phenomena
tc.research_name.TB_Seasonal_Stabilized=Stabilized Seasonal Magicks
tc.research_text.TB_Seasonal_Stabilized=Stabilization of Seasonal Magicks

#Actual Researches
Core.1=In your studies, you have discovered something rather... peculiar. In this, you found that you were somehow able to equally combine different forms of magick energy to create something... <BR><BR>Unique.<BR><BR>A new form of energy, somehow greater than the sum of its original parts.<BR><BR>You wonder where else this could be applied.
Expand All @@ -77,6 +84,9 @@ ExplorationsTainted.1=Studying the void, you have made a unique discovery: the v
ExplorationsCompat.1=In your studies of the stars, you had discovered two distinct forms of celestial energies, those being the energy of comets as well as the energy of meteors. However, after your discovery of the thaumic combinator, you began to wonder if there were a way to combine these two energy signals...<BR><BR>Lo and behold, there was! Two distinct methods actually, though the results are currently shockingly similar.<BR><BR>Perhaps there might be a way to enhance these further...
EMTTainted.1=As you continued your studies of electricity, you noticed something interesting, like the traditional magical energies, electricity was likewise able to be combined into other energies. However, at one caveat: it doesn't exactly mix into the energy but rather, converts the natural into the artificial.<BR><BR>In your applications of this to void energy, you found that not only can they run on electricity, but likewise, they can both be overcharged by electricity AND boosted by enhanced void.<BR><BR>A rather interesting revelation...
ExplorationsEMT.1=As you continued your studies of electricity, you noticed something interesting, like the traditional magical energies, electricity was likewise able to be combined into other energies. However, at one caveat: it doesn't exactly mix into the energy but rather, converts the natural into the artificial.<BR><BR>In your applications of this to the celestial energies, you found that they were able run on electricity, even being able to be overcharged, enhancing their natural tendencies.<BR><BR>A rather interesting revelation...
SeasonalCore.1=In your studies of magickal phenomena, you discovered something peculiar: there are spikes of magickal energies around specific parts of the solar calendar. <BR><BR>These spikes have been known to cause various tranformations, such as transforming chests to presents, and vice versa as they pass. Interestingly, you've managed to capture this chaotic energy. <BR><BR>Yet you wonder if there is some way you may be able to stabilize these energies...
SeasonalStabilized.1=As you continued your studies of the seasonal magick phenomena, you noticed something interesting, it actually is possible to attune these energies into a specific phenomena, resulting in a drastically boosted seasonal effect... with one caveat: these effects become incredibly diminished after the season has passed. <BR><BR>The first of these effects you've noticed is a drastic increase in the steady running speed over time, while freezing water similar to that of comet attuned magicks <BR><BR>Though, you almost swear you can hear sleigh bells...
SeasonalStabilized.2=You believe you should come back to this in December...

#Aspects
tc.aspect.caelum=Celestial Space
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading

0 comments on commit 35fb44f

Please sign in to comment.