diff --git a/src/main/java/com/acethewildfire/acesbs/AcesBS.java b/src/main/java/com/acethewildfire/acesbs/AcesBS.java index aacaeec..431bfd2 100644 --- a/src/main/java/com/acethewildfire/acesbs/AcesBS.java +++ b/src/main/java/com/acethewildfire/acesbs/AcesBS.java @@ -5,6 +5,7 @@ import com.acethewildfire.acesbs.component.ModDataComponentTypes; import com.acethewildfire.acesbs.effect.ModEffects; import com.acethewildfire.acesbs.item.ModItemGroups; import com.acethewildfire.acesbs.item.ModItems; +import com.acethewildfire.acesbs.potion.ModPotions; import com.acethewildfire.acesbs.sounds.ModSounds; import com.acethewildfire.acesbs.util.HammerUsageEvent; import com.acethewildfire.acesbs.util.UpdateRecipies; @@ -13,7 +14,10 @@ import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.event.player.AttackEntityCallback; import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents; +import net.fabricmc.fabric.api.registry.FabricBrewingRecipeRegistryBuilder; import net.fabricmc.fabric.api.renderer.v1.Renderer; +import net.minecraft.item.Items; +import net.minecraft.potion.Potions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -44,5 +48,10 @@ public class AcesBS implements ModInitializer { PlayerBlockBreakEvents.BEFORE.register(new HammerUsageEvent()); AttackEntityCallback.EVENT.register(new YouMonsterEvent()); + + FabricBrewingRecipeRegistryBuilder.BUILD.register(builder -> { + builder.registerPotionRecipe(Potions.AWKWARD, ModItems.LEMON, ModPotions.LEMON); + builder.registerPotionRecipe(Potions.AWKWARD, Items.SAND, ModPotions.BLINDNESS); + }); } } \ No newline at end of file diff --git a/src/main/java/com/acethewildfire/acesbs/effect/LemonEffect.java b/src/main/java/com/acethewildfire/acesbs/effect/LemonEffect.java index 3668a58..195405d 100644 --- a/src/main/java/com/acethewildfire/acesbs/effect/LemonEffect.java +++ b/src/main/java/com/acethewildfire/acesbs/effect/LemonEffect.java @@ -1,9 +1,14 @@ package com.acethewildfire.acesbs.effect; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.BackgroundRenderer; +import net.minecraft.client.render.RenderTickCounter; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectCategory; +import static net.minecraft.client.render.BackgroundRenderer.applyFog; + public class LemonEffect extends StatusEffect { public LemonEffect(StatusEffectCategory category, int color) { super(category, color); diff --git a/src/main/java/com/acethewildfire/acesbs/item/ModItems.java b/src/main/java/com/acethewildfire/acesbs/item/ModItems.java index 2efaa98..46bb435 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/ModItems.java +++ b/src/main/java/com/acethewildfire/acesbs/item/ModItems.java @@ -5,6 +5,7 @@ import com.acethewildfire.acesbs.item.custom.HammerItem; import com.acethewildfire.acesbs.item.custom.ModArmorItem; import com.acethewildfire.acesbs.item.custom.OracleLemon; import com.acethewildfire.acesbs.item.custom.Wand; +import com.acethewildfire.acesbs.potion.ModPotions; import com.acethewildfire.acesbs.sounds.ModSounds; import net.minecraft.client.gui.screen.Screen; import net.minecraft.component.DataComponentTypes; @@ -24,8 +25,7 @@ import net.minecraft.util.Identifier; import java.util.List; public class ModItems { - private static final RegistryEntry BLINDNESS = registerPotion("blindness", new Potion(new StatusEffectInstance(StatusEffects.BLINDNESS, 200))); - public static final Item ORACLE_LEMON = registerItem("oracle_lemon", new OracleLemon(new Item.Settings().component(DataComponentTypes.POTION_CONTENTS, new PotionContentsComponent(BLINDNESS)))); + public static final Item ORACLE_LEMON = registerItem("oracle_lemon", new OracleLemon(new Item.Settings().component(DataComponentTypes.POTION_CONTENTS, new PotionContentsComponent(ModPotions.LEMON)))); public static final Item WAND = registerItem("wand", new Wand(new Item.Settings().maxDamage(32))); public static final Item RAW_ENTROPY = registerItem("raw_entropy", new Item(new Item.Settings())); public static final Item STABLE_ENTROPY = registerItem("stable_entropy", new Item(new Item.Settings())); @@ -122,10 +122,6 @@ public class ModItems { return Registry.register(Registries.ITEM, Identifier.of(AcesBS.MOD_ID, name), item); } - private static RegistryEntry registerPotion(String name, Potion potion){ - return Registry.registerReference(Registries.POTION, Identifier.of(AcesBS.MOD_ID, name), potion); - } - public static void registerModItems() { AcesBS.LOGGER.info("Registering Mod Items for " + AcesBS.MOD_ID); diff --git a/src/main/java/com/acethewildfire/acesbs/potion/ModPotions.java b/src/main/java/com/acethewildfire/acesbs/potion/ModPotions.java new file mode 100644 index 0000000..ecdfd94 --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/potion/ModPotions.java @@ -0,0 +1,25 @@ +package com.acethewildfire.acesbs.potion; + +import com.acethewildfire.acesbs.AcesBS; +import com.acethewildfire.acesbs.effect.ModEffects; +import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.potion.Potion; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.util.Identifier; + +public class ModPotions { + + public static final RegistryEntry BLINDNESS = registerPotion("blindness", new Potion(new StatusEffectInstance(StatusEffects.BLINDNESS, 1200, 0))); + public static final RegistryEntry LEMON = registerPotion("lemon", new Potion(new StatusEffectInstance(ModEffects.LEMON, 1200, 0))); + + private static RegistryEntry registerPotion(String name, Potion potion){ + return Registry.registerReference(Registries.POTION, Identifier.of(AcesBS.MOD_ID, name), potion); + } + + public static void registerPotions(){ + AcesBS.LOGGER.info("Registering Mod Potions for " + AcesBS.MOD_ID); + } +} diff --git a/src/main/resources/assets/acesbs/lang/en_us.json b/src/main/resources/assets/acesbs/lang/en_us.json index ed41b62..7bf1f7e 100644 --- a/src/main/resources/assets/acesbs/lang/en_us.json +++ b/src/main/resources/assets/acesbs/lang/en_us.json @@ -14,10 +14,10 @@ "item.minecraft.tipped_arrow.effect.blindness": "Arrow of Blindness", "effect.acesbs.lemon": "Puckered", - "item.acesbs.potion.effect.lemon": "Potion of Puckered", - "item.acesbs.splash_potion.effect.lemon": "Splash Potion of Puckered", - "item.acesbs.lingering_potion.effect.lemon": "Lingering Potion of Puckered", - "item.acesbs.tipped_arrow.effect.lemon": "Arrow of Puckered", + "item.minecraft.potion.effect.lemon": "Potion of Puckered", + "item.minecraft.splash_potion.effect.lemon": "Splash Potion of Puckered", + "item.minecraft.lingering_potion.effect.lemon": "Lingering Potion of Puckered", + "item.minecraft.tipped_arrow.effect.lemon": "Arrow of Puckered", "item.acesbs.prisma_steel": "Prisma Steel", "item.acesbs.prisma_steel_sword": "Prisma Steel Sword",