-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FF]: Add new tweaking enchantment option and fix modIds getter.
- Loading branch information
1 parent
90cf1a7
commit 957e6a9
Showing
37 changed files
with
385 additions
and
185 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
46 changes: 46 additions & 0 deletions
46
fabric/src/main/java/crystalspider/soulfired/ModLoader.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,46 @@ | ||
package crystalspider.soulfired; | ||
|
||
import crystalspider.soulfired.api.FireManager; | ||
import crystalspider.soulfired.config.ModConfig; | ||
import crystalspider.soulfired.handler.FireResourceReloadListener; | ||
import crystalspider.soulfired.handler.LootTableEventsHandler; | ||
import net.fabricmc.api.ModInitializer; | ||
import net.fabricmc.fabric.api.loot.v2.LootTableEvents; | ||
import net.fabricmc.fabric.api.resource.ResourceManagerHelper; | ||
import net.minecraft.resource.ResourceType; | ||
import net.minecraftforge.api.ModLoadingContext; | ||
import net.minecraftforge.fml.config.ModConfig.Type; | ||
|
||
/** | ||
* Soul fire'd mod loader. | ||
*/ | ||
public final class ModLoader implements ModInitializer { | ||
/** | ||
* ID of this mod. | ||
*/ | ||
public static final String MOD_ID = "soulfired"; | ||
|
||
@Override | ||
public void onInitialize() { | ||
ModLoadingContext.registerConfig(MOD_ID, Type.COMMON, ModConfig.SPEC); | ||
LootTableEvents.MODIFY.register(LootTableEventsHandler::handle); | ||
ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(new FireResourceReloadListener()); | ||
FireManager.registerFire( | ||
FireManager.fireBuilder(FireManager.SOUL_FIRE_TYPE) | ||
.setDamage(2) | ||
.setFireAspectConfig(builder -> builder | ||
.setEnabled(ModConfig::getEnableSoulFireAspect) | ||
.setIsDiscoverable(ModConfig::getEnableSoulFireAspectDiscovery) | ||
.setIsTradeable(ModConfig::getEnableSoulFireAspectTrades) | ||
.setIsTreasure(ModConfig::getEnableSoulFireAspectTreasure) | ||
) | ||
.setFlameConfig(builder -> builder | ||
.setEnabled(ModConfig::getEnableSoulFlame) | ||
.setIsDiscoverable(ModConfig::getEnableSoulFlameDiscovery) | ||
.setIsTradeable(ModConfig::getEnableSoulFlameTrades) | ||
.setIsTreasure(ModConfig::getEnableSoulFlameTreasure) | ||
) | ||
.build() | ||
); | ||
} | ||
} |
46 changes: 0 additions & 46 deletions
46
fabric/src/main/java/crystalspider/soulfired/SoulFiredLoader.java
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
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
18 changes: 18 additions & 0 deletions
18
fabric/src/main/java/crystalspider/soulfired/api/type/FireTypedEnchantment.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,18 @@ | ||
package crystalspider.soulfired.api.type; | ||
|
||
import net.minecraft.entity.Entity; | ||
|
||
/** | ||
* Fire typed enchantment. | ||
*/ | ||
public interface FireTypedEnchantment extends FireTyped { | ||
/** | ||
* Returns the duration for the applied flame. | ||
* | ||
* @param attacker {@link Entity} attacking with the enchantment. | ||
* @param target {@link Entity} being attacked. | ||
* @param duration default duration that would be applied. | ||
* @return the duration for the applied flame. | ||
*/ | ||
public int duration(Entity attacker, Entity target, Integer duration); | ||
} |
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
Oops, something went wrong.