added potions of all effects
This commit is contained in:
@@ -145,3 +145,24 @@ The Tools & Utilities creative tab contains one glowing debug stick for each of
|
|||||||
direct hit applies the named effect through the normal source-aware API. Soul Rot, Bleed, and Fracture add their
|
direct hit applies the named effect through the normal source-aware API. Soul Rot, Bleed, and Fracture add their
|
||||||
configured stacks; the other effects use `taggedWeaponEffectDurationTicks`. The sticks have no recipes and only apply
|
configured stacks; the other effects use `taggedWeaponEffectDurationTicks`. The sticks have no recipes and only apply
|
||||||
effects when wielded by a player in Creative Mode, including on multiplayer and dedicated servers.
|
effects when wielded by a player in Creative Mode, including on multiplayer and dedicated servers.
|
||||||
|
|
||||||
|
## Potions
|
||||||
|
|
||||||
|
Each ailment has a drinkable potion brewed from an Awkward Potion. Add Gunpowder for its splash variant (and Dragon's
|
||||||
|
Breath afterward for the standard lingering variant).
|
||||||
|
|
||||||
|
| Ailment | Awkward Potion ingredient |
|
||||||
|
| --- | --- |
|
||||||
|
| Soul Rot | Soul Sand |
|
||||||
|
| Bleed | Rotten Flesh |
|
||||||
|
| Fracture | Bone |
|
||||||
|
| Fear | Fermented Spider Eye |
|
||||||
|
| Charm | Honey Bottle |
|
||||||
|
| Taunt | Fire Charge |
|
||||||
|
| Overcharm | Golden Apple |
|
||||||
|
| Winded | Feather |
|
||||||
|
|
||||||
|
Fear, Charm, and Taunt retain a source. A drinkable bottle targets its drinker with the player who took the finished
|
||||||
|
bottle from the brewing stand as its brewer; drinking your own control potion has no effect. Splash potions use the
|
||||||
|
thrower as their source and likewise do not control the thrower. Drinkable control potions created without a recorded
|
||||||
|
brewer do nothing safely.
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import net.fretux.ailments.compat.AscendCompat;
|
|||||||
import net.fretux.ailments.config.AilmentsConfig;
|
import net.fretux.ailments.config.AilmentsConfig;
|
||||||
import net.fretux.ailments.registry.ModEffects;
|
import net.fretux.ailments.registry.ModEffects;
|
||||||
import net.fretux.ailments.registry.ModItems;
|
import net.fretux.ailments.registry.ModItems;
|
||||||
|
import net.fretux.ailments.registry.ModPotions;
|
||||||
import net.fretux.ailments.network.AilmentNetwork;
|
import net.fretux.ailments.network.AilmentNetwork;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.event.RegisterCommandsEvent;
|
import net.minecraftforge.event.RegisterCommandsEvent;
|
||||||
@@ -25,6 +26,7 @@ public final class AscendAilments {
|
|||||||
IEventBus modBus = context.getModEventBus();
|
IEventBus modBus = context.getModEventBus();
|
||||||
ModEffects.register(modBus);
|
ModEffects.register(modBus);
|
||||||
ModItems.register(modBus);
|
ModItems.register(modBus);
|
||||||
|
ModPotions.register(modBus);
|
||||||
AilmentNetwork.register();
|
AilmentNetwork.register();
|
||||||
modBus.addListener(this::commonSetup);
|
modBus.addListener(this::commonSetup);
|
||||||
// Gameplay settings belong to the server and are synchronized to multiplayer clients by Forge.
|
// Gameplay settings belong to the server and are synchronized to multiplayer clients by Forge.
|
||||||
@@ -35,6 +37,7 @@ public final class AscendAilments {
|
|||||||
|
|
||||||
private void commonSetup(FMLCommonSetupEvent event) {
|
private void commonSetup(FMLCommonSetupEvent event) {
|
||||||
event.enqueueWork(() -> {
|
event.enqueueWork(() -> {
|
||||||
|
ModPotions.registerBrewingRecipes();
|
||||||
if (AscendCompat.isAscendLoaded())
|
if (AscendCompat.isAscendLoaded())
|
||||||
LOGGER.info("Ascend Arcane integration API available: {}", AscendCompat.validateIntegration());
|
LOGGER.info("Ascend Arcane integration API available: {}", AscendCompat.validateIntegration());
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,9 +19,13 @@ public final class EffectSourceUtil {
|
|||||||
public static final String OVERCHARM = "ascend_ailments.overcharm";
|
public static final String OVERCHARM = "ascend_ailments.overcharm";
|
||||||
|
|
||||||
public static void setSource(LivingEntity target, String ailment, @Nullable LivingEntity source) {
|
public static void setSource(LivingEntity target, String ailment, @Nullable LivingEntity source) {
|
||||||
|
setSourceUuid(target, ailment, source == null ? null : source.getUUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setSourceUuid(LivingEntity target, String ailment, @Nullable UUID sourceId) {
|
||||||
CompoundTag data = target.getPersistentData();
|
CompoundTag data = target.getPersistentData();
|
||||||
if (source == null) data.remove(sourceKey(ailment));
|
if (sourceId == null) data.remove(sourceKey(ailment));
|
||||||
else data.putUUID(sourceKey(ailment), source.getUUID());
|
else data.putUUID(sourceKey(ailment), sourceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable public static UUID getSourceUuid(LivingEntity target, String ailment) {
|
@Nullable public static UUID getSourceUuid(LivingEntity target, String ailment) {
|
||||||
|
|||||||
@@ -7,6 +7,30 @@
|
|||||||
"effect.ascend_ailments.taunt": "Taunt",
|
"effect.ascend_ailments.taunt": "Taunt",
|
||||||
"effect.ascend_ailments.overcharm": "Overcharm",
|
"effect.ascend_ailments.overcharm": "Overcharm",
|
||||||
"effect.ascend_ailments.winded": "Winded",
|
"effect.ascend_ailments.winded": "Winded",
|
||||||
|
"item.minecraft.potion.effect.ascend_ailments.soul_rot": "Potion of Soul Rot",
|
||||||
|
"item.minecraft.potion.effect.ascend_ailments.bleed": "Potion of Bleeding",
|
||||||
|
"item.minecraft.potion.effect.ascend_ailments.fracture": "Potion of Fracture",
|
||||||
|
"item.minecraft.potion.effect.ascend_ailments.fear": "Potion of Fear",
|
||||||
|
"item.minecraft.potion.effect.ascend_ailments.charm": "Potion of Charm",
|
||||||
|
"item.minecraft.potion.effect.ascend_ailments.taunt": "Potion of Taunting",
|
||||||
|
"item.minecraft.potion.effect.ascend_ailments.overcharm": "Potion of Overcharm",
|
||||||
|
"item.minecraft.potion.effect.ascend_ailments.winded": "Potion of Windedness",
|
||||||
|
"item.minecraft.splash_potion.effect.ascend_ailments.soul_rot": "Splash Potion of Soul Rot",
|
||||||
|
"item.minecraft.splash_potion.effect.ascend_ailments.bleed": "Splash Potion of Bleeding",
|
||||||
|
"item.minecraft.splash_potion.effect.ascend_ailments.fracture": "Splash Potion of Fracture",
|
||||||
|
"item.minecraft.splash_potion.effect.ascend_ailments.fear": "Splash Potion of Fear",
|
||||||
|
"item.minecraft.splash_potion.effect.ascend_ailments.charm": "Splash Potion of Charm",
|
||||||
|
"item.minecraft.splash_potion.effect.ascend_ailments.taunt": "Splash Potion of Taunting",
|
||||||
|
"item.minecraft.splash_potion.effect.ascend_ailments.overcharm": "Splash Potion of Overcharm",
|
||||||
|
"item.minecraft.splash_potion.effect.ascend_ailments.winded": "Splash Potion of Windedness",
|
||||||
|
"item.minecraft.lingering_potion.effect.ascend_ailments.soul_rot": "Lingering Potion of Soul Rot",
|
||||||
|
"item.minecraft.lingering_potion.effect.ascend_ailments.bleed": "Lingering Potion of Bleeding",
|
||||||
|
"item.minecraft.lingering_potion.effect.ascend_ailments.fracture": "Lingering Potion of Fracture",
|
||||||
|
"item.minecraft.lingering_potion.effect.ascend_ailments.fear": "Lingering Potion of Fear",
|
||||||
|
"item.minecraft.lingering_potion.effect.ascend_ailments.charm": "Lingering Potion of Charm",
|
||||||
|
"item.minecraft.lingering_potion.effect.ascend_ailments.taunt": "Lingering Potion of Taunting",
|
||||||
|
"item.minecraft.lingering_potion.effect.ascend_ailments.overcharm": "Lingering Potion of Overcharm",
|
||||||
|
"item.minecraft.lingering_potion.effect.ascend_ailments.winded": "Lingering Potion of Windedness",
|
||||||
"item.ascend_ailments.soul_rot_debug_stick": "Soul Rot Debug Stick",
|
"item.ascend_ailments.soul_rot_debug_stick": "Soul Rot Debug Stick",
|
||||||
"item.ascend_ailments.bleed_debug_stick": "Bleed Debug Stick",
|
"item.ascend_ailments.bleed_debug_stick": "Bleed Debug Stick",
|
||||||
"item.ascend_ailments.fracture_debug_stick": "Fracture Debug Stick",
|
"item.ascend_ailments.fracture_debug_stick": "Fracture Debug Stick",
|
||||||
|
|||||||
Reference in New Issue
Block a user