diff --git a/src/main/java/com/aizistral/enigmaticlegacy/EnigmaticLegacy.java b/src/main/java/com/aizistral/enigmaticlegacy/EnigmaticLegacy.java index d35ecb78..0a8cd000 100644 --- a/src/main/java/com/aizistral/enigmaticlegacy/EnigmaticLegacy.java +++ b/src/main/java/com/aizistral/enigmaticlegacy/EnigmaticLegacy.java @@ -437,7 +437,6 @@ private void onServerStarted(ServerStartedEvent event) { /** * Alright boys, it's cleanup time! - * @param event */ public void performCleanup() { diff --git a/src/main/java/com/aizistral/enigmaticlegacy/api/materials/EnigmaticMaterials.java b/src/main/java/com/aizistral/enigmaticlegacy/api/materials/EnigmaticMaterials.java index 7f8b54b4..491090a4 100644 --- a/src/main/java/com/aizistral/enigmaticlegacy/api/materials/EnigmaticMaterials.java +++ b/src/main/java/com/aizistral/enigmaticlegacy/api/materials/EnigmaticMaterials.java @@ -4,6 +4,7 @@ import java.util.Objects; import java.util.function.Supplier; +import com.aizistral.enigmaticlegacy.items.EldritchPan; import com.aizistral.etherium.core.IEtheriumConfig; import net.minecraft.resources.ResourceLocation; @@ -19,8 +20,7 @@ */ public enum EnigmaticMaterials implements Tier { - FORBIDDENAXE(0, 2000, 6.0F, 3.0F, 16, () -> Ingredient.EMPTY), - ENDERSLAYER(0, 2000, 6.0F, 3.0F, 16, () -> Ingredient.of(Blocks.OBSIDIAN)), + ELDRITCH_PAN(0, 4000, 6.0F, 3.0F, 24, EldritchPan::getRepairMaterial), FORBIDDEN_AXE(0, 2000, 6.0F, 3.0F, 16, () -> Ingredient.EMPTY), ENDER_SLAYER(0, 2000, 6.0F, 3.0F, 16, () -> Ingredient.of(Blocks.OBSIDIAN)), ETHERIUM(5, 3000, 8.0F, 5.0F, 32, () -> getEtheriumConfig().getRepairMaterial()), diff --git a/src/main/java/com/aizistral/enigmaticlegacy/effects/GrowingBloodlustEffect.java b/src/main/java/com/aizistral/enigmaticlegacy/effects/GrowingBloodlustEffect.java new file mode 100644 index 00000000..9bd542f2 --- /dev/null +++ b/src/main/java/com/aizistral/enigmaticlegacy/effects/GrowingBloodlustEffect.java @@ -0,0 +1,74 @@ +package com.aizistral.enigmaticlegacy.effects; + +import com.aizistral.enigmaticlegacy.api.generic.SubscribeConfig; +import com.aizistral.omniconfig.Configuration; +import com.aizistral.omniconfig.wrappers.Omniconfig; +import com.aizistral.omniconfig.wrappers.OmniconfigWrapper; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectCategory; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.ai.attributes.AttributeModifier; +import net.minecraft.world.entity.ai.attributes.Attributes; + +public class GrowingBloodlustEffect extends MobEffect { + public static Omniconfig.DoubleParameter damageBoost = null; + public static Omniconfig.DoubleParameter lifestealBoost = null; + public static Omniconfig.DoubleParameter healthLossLimit = null; + public static Omniconfig.IntParameter healthLossTicks = null; + public static Omniconfig.IntParameter ticksPerLevel = null; + + @SubscribeConfig(receiveClient = true) + public static void onConfig(OmniconfigWrapper builder) { + builder.pushPrefix("GrowingBloodlust"); + + if (builder.config.getSidedType() != Configuration.SidedConfigType.CLIENT) { + damageBoost = builder + .comment("Damage boost granted by the Growing Bloodlust, per level of effect.") + .max(100) + .getDouble("DamageBoost", 0.05); + + lifestealBoost = builder + .comment("Lifesteal granted by the Growing Bloodlust, per level of effect.") + .max(100) + .getDouble("LifestealBoost", 0.025); + + healthLossTicks = builder + .comment("How often the player loses 1 HP at level one of Growing Bloodlust, in ticks.") + .getInt("HealthLossTicks", 160); + + healthLossLimit = builder + .comment("How much health Growing Bloodlust leaves the player with, as a fraction of max health.") + .getDouble("HealthLossLimit", 0.3); + + ticksPerLevel = builder + .comment("How lock the The Voracious Pan needs to be held, in ticks, to increase the strength " + + "of the Growing Bloodlust effect by one level.") + .getInt("TicksPerLevel", 300); + } + + builder.popPrefix(); + } + + public GrowingBloodlustEffect() { + super(MobEffectCategory.BENEFICIAL, 0xC30018); + this.addAttributeModifier(Attributes.ATTACK_DAMAGE, "d88f6930-fefb-4bf7-a418-f368458355ff", + damageBoost.getValue(), AttributeModifier.Operation.MULTIPLY_TOTAL); + } + + @Override + public void applyEffectTick(LivingEntity living, int amplifier) { + if (living instanceof ServerPlayer player && !player.isCreative() && !player.isSpectator()) { + if ((player.getHealth() / player.getMaxHealth()) > healthLossLimit.getValue()) { + player.setHealth(player.getHealth() - 1); + } + } + } + + @Override + public boolean isDurationEffectTick(int duration, int amplifier) { + int period = healthLossTicks.getValue() / (1 + amplifier); + return duration % period == 0; + } + +} diff --git a/src/main/java/com/aizistral/enigmaticlegacy/effects/GrowingHungerEffect.java b/src/main/java/com/aizistral/enigmaticlegacy/effects/GrowingHungerEffect.java new file mode 100644 index 00000000..a341ae89 --- /dev/null +++ b/src/main/java/com/aizistral/enigmaticlegacy/effects/GrowingHungerEffect.java @@ -0,0 +1,69 @@ +package com.aizistral.enigmaticlegacy.effects; + +import com.aizistral.enigmaticlegacy.api.generic.SubscribeConfig; +import com.aizistral.omniconfig.Configuration; +import com.aizistral.omniconfig.wrappers.Omniconfig; +import com.aizistral.omniconfig.wrappers.OmniconfigWrapper; +import com.google.common.collect.ImmutableList; +import net.minecraft.resources.ResourceKey; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.damagesource.DamageType; +import net.minecraft.world.damagesource.DamageTypes; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectCategory; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.ai.attributes.Attribute; +import net.minecraft.world.entity.ai.attributes.AttributeModifier; +import net.minecraft.world.entity.ai.attributes.Attributes; + +import java.util.List; +import java.util.Map; + +public class GrowingHungerEffect extends MobEffect { + public static Omniconfig.DoubleParameter damageBoost = null; + public static Omniconfig.DoubleParameter exhaustionGain = null; + public static Omniconfig.IntParameter ticksPerLevel = null; + + @SubscribeConfig(receiveClient = true) + public static void onConfig(OmniconfigWrapper builder) { + builder.pushPrefix("GrowingHunger"); + + if (builder.config.getSidedType() != Configuration.SidedConfigType.CLIENT) { + damageBoost = builder + .comment("Damage boost granted by the Growing Hunger, per level of effect.") + .max(100) + .getDouble("DamageBoost", 0.1); + + exhaustionGain = builder + .comment("Exhaustion applied by Growing Hunger every 4 ticks, per level of effect.") + .getDouble("ExhaustionGain", 0.5); + + ticksPerLevel = builder + .comment("How lock the The Voracious Pan needs to be held, in ticks, to increase the strength " + + "of the Growing Hunger effect by one level.") + .getInt("TicksPerLevel", 300); + } + + builder.popPrefix(); + } + + public GrowingHungerEffect() { + super(MobEffectCategory.BENEFICIAL, 0xBD1BE5); + this.addAttributeModifier(Attributes.ATTACK_DAMAGE, "c281d54f-3277-4e4c-899e-c27f4f697b24", + damageBoost.getValue(), AttributeModifier.Operation.MULTIPLY_TOTAL); + } + + @Override + public void applyEffectTick(LivingEntity living, int amplifier) { + if (living instanceof ServerPlayer player) { + player.causeFoodExhaustion((float) (exhaustionGain.getValue() * (1 + amplifier))); + } + } + + @Override + public boolean isDurationEffectTick(int duration, int amplifier) { + return duration % 4 == 0; + } + +} \ No newline at end of file diff --git a/src/main/java/com/aizistral/enigmaticlegacy/handlers/EnigmaticEventHandler.java b/src/main/java/com/aizistral/enigmaticlegacy/handlers/EnigmaticEventHandler.java index efacb3af..23dce1ec 100644 --- a/src/main/java/com/aizistral/enigmaticlegacy/handlers/EnigmaticEventHandler.java +++ b/src/main/java/com/aizistral/enigmaticlegacy/handlers/EnigmaticEventHandler.java @@ -12,6 +12,13 @@ import java.util.UUID; import java.util.WeakHashMap; +import com.aizistral.enigmaticlegacy.effects.GrowingBloodlustEffect; +import com.aizistral.enigmaticlegacy.effects.GrowingHungerEffect; +import com.aizistral.enigmaticlegacy.items.*; +import com.google.common.collect.ImmutableList; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.item.crafting.SmeltingRecipe; import org.apache.commons.lang3.tuple.Triple; import com.aizistral.enigmaticlegacy.EnigmaticLegacy; @@ -38,27 +45,6 @@ import com.aizistral.enigmaticlegacy.helpers.ItemLoreHelper; import com.aizistral.enigmaticlegacy.helpers.ItemNBTHelper; import com.aizistral.enigmaticlegacy.helpers.PotionHelper; -import com.aizistral.enigmaticlegacy.items.AngelBlessing; -import com.aizistral.enigmaticlegacy.items.AvariceScroll; -import com.aizistral.enigmaticlegacy.items.BerserkEmblem; -import com.aizistral.enigmaticlegacy.items.BlazingCore; -import com.aizistral.enigmaticlegacy.items.CosmicScroll; -import com.aizistral.enigmaticlegacy.items.CursedRing; -import com.aizistral.enigmaticlegacy.items.CursedScroll; -import com.aizistral.enigmaticlegacy.items.EnderSlayer; -import com.aizistral.enigmaticlegacy.items.EnigmaticAmulet; -import com.aizistral.enigmaticlegacy.items.EyeOfNebula; -import com.aizistral.enigmaticlegacy.items.ForbiddenAxe; -import com.aizistral.enigmaticlegacy.items.ForbiddenFruit; -import com.aizistral.enigmaticlegacy.items.HunterGuidebook; -import com.aizistral.enigmaticlegacy.items.InfernalShield; -import com.aizistral.enigmaticlegacy.items.MiningCharm; -import com.aizistral.enigmaticlegacy.items.MonsterCharm; -import com.aizistral.enigmaticlegacy.items.OceanStone; -import com.aizistral.enigmaticlegacy.items.RevelationTome; -import com.aizistral.enigmaticlegacy.items.TheInfinitum; -import com.aizistral.enigmaticlegacy.items.TheTwist; -import com.aizistral.enigmaticlegacy.items.VoidPearl; import com.aizistral.enigmaticlegacy.items.EnigmaticAmulet.AmuletColor; import com.aizistral.enigmaticlegacy.items.generic.ItemSpellstoneCurio; import com.aizistral.enigmaticlegacy.mixin.AccessorAbstractArrowEntity; @@ -293,6 +279,8 @@ import top.theillusivec4.curios.api.type.capability.ICurio.DropRule; import top.theillusivec4.curios.client.gui.CuriosScreen; +import javax.tools.Tool; + /** * Generic event handler of the whole mod. * @author Integral @@ -1012,7 +1000,7 @@ private void syncPlayTime(Player player) { } @SubscribeEvent - public void onPlayerTick(PlayerChangedDimensionEvent event) { + public void onPlayerTravel(PlayerChangedDimensionEvent event) { if (event.getEntity() instanceof ServerPlayer player) { LAST_SOUL_COMPASS_UPDATE.remove(player); @@ -1186,7 +1174,7 @@ public void onPlayerTick(LivingTickEvent event) { } */ - if (player instanceof ServerPlayer) { + if (player instanceof ServerPlayer serverPlayer) { /* * Handler for players' spellstone cooldowns. @@ -1238,6 +1226,38 @@ public void onPlayerTick(LivingTickEvent event) { } } } + + /* + * Handle Growing Hunger application. + */ + + List handItems = ImmutableList.of(player.getMainHandItem()/*, player.getOffhandItem()*/); + + if (handItems.stream().anyMatch(s -> s.is(EnigmaticItems.ELDRITCH_PAN))) { + int currentTicks = EldritchPan.HOLDING_DURATIONS.getOrDefault(player, 0); + + if (SuperpositionHandler.cannotHunger(player)) { + int bloodlustAmplifier = currentTicks / GrowingBloodlustEffect.ticksPerLevel.getValue(); + + bloodlustAmplifier = Math.min(bloodlustAmplifier, 9); + + player.addEffect(new MobEffectInstance(EnigmaticEffects.GROWING_BLOODLUST, + MobEffectInstance.INFINITE_DURATION, bloodlustAmplifier, true, true)); + } else { + int hungerAmplifier = currentTicks / GrowingHungerEffect.ticksPerLevel.getValue(); + + hungerAmplifier = Math.min(hungerAmplifier, 9); + + player.addEffect(new MobEffectInstance(EnigmaticEffects.GROWING_HUNGER, + MobEffectInstance.INFINITE_DURATION, hungerAmplifier, true, true)); + } + + EldritchPan.HOLDING_DURATIONS.put(player, currentTicks + 1); + } else { + EldritchPan.HOLDING_DURATIONS.put(player, 0); + player.removeEffect(EnigmaticEffects.GROWING_HUNGER); + player.removeEffect(EnigmaticEffects.GROWING_BLOODLUST); + } } } @@ -1350,9 +1370,22 @@ public void onConfirmedDeath(LivingDeathEvent event) { SuperpositionHandler.setPersistentInteger(player, "TimesKilledWither", killedWither); } } + + if (event.getSource().getDirectEntity() instanceof ServerPlayer attacker) { + ItemStack weapon = attacker.getMainHandItem(); + + if (weapon.is(EnigmaticItems.ELDRITCH_PAN)) { + ResourceLocation killedType = ForgeRegistries.ENTITY_TYPES.getKey(event.getEntity().getType()); + + if (EldritchPan.addKillIfNotPresent(weapon, killedType)) { + attacker.sendSystemMessage(Component.translatable("message.enigmaticlegacy.eldritch_pan_buff") + .withStyle(ChatFormatting.GOLD)); + } + } + } } - @SubscribeEvent + @SubscribeEvent public void onCurioDrops(DropRulesEvent event) { event.addOverride(stack -> stack.getEnchantmentLevel(EnigmaticEnchantments.ETERNAL_BINDING) > 0, DropRule.ALWAYS_KEEP); @@ -1420,6 +1453,60 @@ private boolean isThereLava(Level world, BlockPos pos) { return false; } +// @OnlyIn(Dist.CLIENT) +// @SubscribeEvent(priority = EventPriority.HIGHEST) +// public void onEarlyTooltip(ItemTooltipEvent event) { +// if (event.getItemStack().is(EnigmaticItems.ELDRITCH_PAN)) { +// List modifierIndexes = new ArrayList<>(); +// +// for (int i = 0; i < event.getToolTip().size(); i++) { +// Component line = event.getToolTip().get(i); +// +// if (line.getContents() instanceof TranslatableContents contents) { +// if (contents.getKey().startsWith("item.modifiers.") +// || contents.getKey().startsWith("attribute.modifier.")) { +// modifierIndexes.add(i); +// } +// } +// } +// +// List modifierIndexesCopy = new ArrayList<>(modifierIndexes); +// +// for (int i = 0; i < modifierIndexesCopy.size(); i++) { +// int prevIndex = i - 1; +// int currentValue = modifierIndexesCopy.get(i); +// +// if (prevIndex < 0) { +// modifierIndexes.add(currentValue - 1); +// continue; +// } +// +// int prevValue = modifierIndexesCopy.get(prevIndex); +// +// if (currentValue - prevValue > 1) { +// modifierIndexes.add(currentValue - 1); +// } +// } +// +// //modifierIndexes.stream().map(event.getToolTip()::get).forEach(event.getToolTip()::remove); +// +// List removedLines = new ArrayList<>(); +// +// try { +// for (int index : modifierIndexes) { +// Component line = event.getToolTip().get(index); +// removedLines.add(line); +// } +// +// for (Component line : removedLines) { +// event.getToolTip().remove(line); +// } +// } catch (Throwable ex) { +// ex.printStackTrace(); +// } +// } +// } + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onLivingDeath(LivingDeathEvent event) { @@ -1834,9 +1921,55 @@ public void onEntityDamaged(LivingDamageEvent event) { } } + if (player.getMainHandItem() != null && player.getMainHandItem().getItem() == EnigmaticItems.ELDRITCH_PAN) { + if (SuperpositionHandler.isTheWorthyOne(player)) { + lifesteal += event.getAmount() * EldritchPan.lifeSteal.getValue(); + } + } + + if (player.hasEffect(EnigmaticEffects.GROWING_BLOODLUST)) { + int amplifier = 1 + player.getEffect(EnigmaticEffects.GROWING_BLOODLUST).getAmplifier(); + lifesteal += event.getAmount() * (GrowingBloodlustEffect.lifestealBoost.getValue() * amplifier); + } + if (lifesteal > 0) { player.heal(lifesteal); } + + float hungersteal = 0F; + + if (player.getMainHandItem() != null && player.getMainHandItem().getItem() == EnigmaticItems.ELDRITCH_PAN) { + if (SuperpositionHandler.isTheWorthyOne(player)) { + hungersteal += EldritchPan.hungerSteal.getValue(); + } + } + + if (hungersteal > 0) { + boolean noHunger = SuperpositionHandler.cannotHunger(player); + + if (event.getEntity() instanceof ServerPlayer victim) { + FoodData victimFood = victim.getFoodData(); + FoodData attackerFood = player.getFoodData(); + + int foodSteal = Math.min((int) Math.ceil(hungersteal), victimFood.getFoodLevel()); + float saturationSteal = Math.min(hungersteal / 5F, victimFood.getSaturationLevel()); + + victimFood.setSaturation(victimFood.getSaturationLevel() - saturationSteal); + victimFood.setFoodLevel(victimFood.getFoodLevel() - foodSteal); + + if (noHunger) { + player.heal((float) foodSteal / 2); + } else { + attackerFood.eat(foodSteal, saturationSteal); + } + } else { + if (noHunger) { + player.heal(hungersteal / 2); + } else { + player.getFoodData().eat((int) Math.ceil(hungersteal), hungersteal / 5F); + } + } + } } } @@ -1978,6 +2111,10 @@ public void onEntityHurt(LivingHurtEvent event) { player.addEffect(new MobEffectInstance(MobEffects.DIG_SLOWDOWN, 300, 3, false, true)); player.addEffect(new MobEffectInstance(MobEffects.BLINDNESS, 100, 3, false, true)); } + } else if (mainhandStack.is(EnigmaticItems.ELDRITCH_PAN)) { + if (!SuperpositionHandler.isTheWorthyOne(player)) { + event.setCanceled(true); + } } else if (mainhandStack.is(EnigmaticItems.ENDER_SLAYER)) { if (SuperpositionHandler.isTheCursedOne(player)) { if (EnigmaticItems.ENDER_SLAYER.isEndDweller(event.getEntity())) { @@ -2135,7 +2272,9 @@ public void onEntityHurt(LivingHurtEvent event) { boolean bypass = false; if (event.getSource().getDirectEntity() == player) - if (player.getMainHandItem().getItem() == EnigmaticItems.THE_TWIST || player.getMainHandItem().getItem() == EnigmaticItems.THE_INFINITUM) { + if (player.getMainHandItem().getItem() == EnigmaticItems.THE_TWIST + || player.getMainHandItem().getItem() == EnigmaticItems.THE_INFINITUM + || player.getMainHandItem().getItem() == EnigmaticItems.ELDRITCH_PAN) { // Don't do worthiness check since event is gonna be canceled for non-worthy already bypass = true; } @@ -2521,6 +2660,37 @@ public void onLivingDrops(LivingDropsEvent event) { @SubscribeEvent(priority = EventPriority.LOWEST) public void onLivingDropsLowest(LivingDropsEvent event) { + Level level = event.getEntity().level(); + + /* + * Eldritch Pan cooking logic. + */ + + if (event.getSource().getDirectEntity() instanceof ServerPlayer player) + if (SuperpositionHandler.isTheWorthyOne(player)) + if (player.getMainHandItem().is(EnigmaticItems.ELDRITCH_PAN) + || player.getOffhandItem().is(EnigmaticItems.ELDRITCH_PAN)) + for (ItemEntity drop : new ArrayList<>(event.getDrops())) { + ItemStack stack = drop.getItem(); + Optional optional = level.getRecipeManager().getRecipeFor( + RecipeType.SMELTING, new SimpleContainer(stack), level); + + optional.ifPresent(recipe -> { + ItemStack result = recipe.getResultItem(level.registryAccess()); + + if (!result.isEmpty()) { + ItemStack cooked = result.copyWithCount(stack.getCount() * result.getCount()); + + event.getDrops().remove(drop); + this.addDrop(event, cooked); + } + }); + } + + /* + * Escape Scroll logic. + */ + if (event.getEntity() instanceof ServerPlayer player) { CompoundTag deathLocation = new CompoundTag(); deathLocation.putDouble("x", player.getX()); @@ -2617,7 +2787,7 @@ public void onLivingDropsLowest(LivingDropsEvent event) { } /* - * Unique drops for Ring of the Seven Curses. + * Ender Slayer XP conversion. */ if (event.isRecentlyHit() && event.getSource() != null && event.getSource().getEntity() instanceof Player && SuperpositionHandler.isTheCursedOne((Player) event.getSource().getEntity())) { diff --git a/src/main/java/com/aizistral/enigmaticlegacy/handlers/SuperpositionHandler.java b/src/main/java/com/aizistral/enigmaticlegacy/handlers/SuperpositionHandler.java index 08f6298a..cfe21b1b 100644 --- a/src/main/java/com/aizistral/enigmaticlegacy/handlers/SuperpositionHandler.java +++ b/src/main/java/com/aizistral/enigmaticlegacy/handlers/SuperpositionHandler.java @@ -44,7 +44,6 @@ import com.aizistral.enigmaticlegacy.api.quack.IProperShieldUser; import com.aizistral.enigmaticlegacy.config.OmniconfigHandler; import com.aizistral.enigmaticlegacy.helpers.AdvancedSpawnLocationHelper; -import com.aizistral.enigmaticlegacy.items.TheAcknowledgment; import com.aizistral.enigmaticlegacy.items.generic.ItemSpellstoneCurio; import com.aizistral.enigmaticlegacy.objects.DimensionalPosition; import com.aizistral.enigmaticlegacy.objects.EnigmaticTransience; @@ -1747,32 +1746,35 @@ public static boolean canUnequipBoundRelics(Player player) { return player.isCreative() || EnigmaticLegacy.SOUL_OF_THE_ARCHITECT.equals(player.getUUID()); } - public static void onDamageSourceBlocking(LivingEntity blocker, ItemStack useItem, DamageSource source, CallbackInfoReturnable info) { + public static boolean onDamageSourceBlocking(LivingEntity blocker, ItemStack useItem, DamageSource source, + CallbackInfoReturnable info) { if (blocker instanceof Player player && useItem != null) { boolean blocking = ((IProperShieldUser)blocker).isActuallyReallyBlocking(); - if (blocking && useItem.getItem() instanceof InfernalShield) { + if (!blocking) + return false; + + if (useItem.getItem() instanceof InfernalShield) { boolean piercingArrow = false; Entity entity = source.getDirectEntity(); - if (entity instanceof AbstractArrow) { - AbstractArrow abstractarrow = (AbstractArrow)entity; - if (abstractarrow.getPierceLevel() > 0) { + if (entity instanceof AbstractArrow arrow) { + if (arrow.getPierceLevel() > 0) { piercingArrow = true; } } piercingArrow = false; // defend against Piercing... for now - if (!source.is(DamageTypeTags.BYPASSES_SHIELD) && ((IProperShieldUser) blocker).isActuallyReallyBlocking() && !piercingArrow) { + if (!source.is(DamageTypeTags.BYPASSES_SHIELD) && !piercingArrow) { Vec3 sourcePos = source.getSourcePosition(); + if (sourcePos != null) { Vec3 lookVec = blocker.getViewVector(1.0F); Vec3 sourceToSelf = sourcePos.vectorTo(blocker.position()).normalize(); sourceToSelf = new Vec3(sourceToSelf.x, 0.0D, sourceToSelf.z); - if (sourceToSelf.dot(lookVec) < 0.0D) { - info.setReturnValue(true); + if (sourceToSelf.dot(lookVec) < 0.0D) { int strength = -1; if (player.hasEffect(EnigmaticEffects.BLAZING_STRENGTH)) { @@ -1800,15 +1802,72 @@ public static void onDamageSourceBlocking(LivingEntity blocker, ItemStack useIte } } - return; + return true; } } } + } else if (useItem.getItem() instanceof EldritchPan) { + Entity projectile = source.getDirectEntity(); + + if (!(projectile instanceof Projectile)) + return false; + + if (!source.is(DamageTypeTags.BYPASSES_SHIELD)) { + Vec3 sourcePos = source.getSourcePosition(); + + if (sourcePos != null) { + Vec3 lookVec = blocker.getViewVector(1.0F); + Vec3 sourceToSelf = sourcePos.vectorTo(blocker.position()).normalize(); + sourceToSelf = new Vec3(sourceToSelf.x, 0.0D, sourceToSelf.z); + + if (sourceToSelf.dot(lookVec) < 0.0D) { + projectile.kill(); + + FoodData data = player.getFoodData(); + data.eat(4, 0.5F); + + player.level().playSound(null, player.getX(), player.getY(), player.getZ(), + SoundEvents.PLAYER_BURP, SoundSource.PLAYERS, 0.5F, + player.level().random.nextFloat() * 0.1F + 0.9F); + + player.gameEvent(GameEvent.EAT); - info.setReturnValue(false); - return; + if (projectile instanceof LargeFireball fireball) { + fireball.explosionPower = 0; + } + + if (player.level() instanceof ServerLevel level) { + Vec3 angle = player.getLookAngle(); + angle.multiply(1, 0, 1).normalize().multiply(0.5, 0.5, 0.5); + + level.sendParticles(new ItemParticleOption(ParticleTypes.ITEM, + new ItemStack(Items.FIRE_CHARGE)), player.getX() + angle.x, + player.getY() + player.getEyeHeight() - 0.1, player.getZ() + angle.z, + 10, 0.3D, 0.3D, 0.3D, 0.03D); + } + + return true; + } + } + } } } + + return false; + } + + public static boolean cannotHunger(@Nullable Player player) { + boolean noHunger = false; + + if (player != null) { + if (EnigmaticItems.FORBIDDEN_FRUIT.haveConsumedFruit(player)) { + noHunger = true; + } else if (player.level().getDifficulty() == Difficulty.PEACEFUL) { + noHunger = true; + } + } + + return noHunger; } public static > void sortByKey(Map map) { diff --git a/src/main/java/com/aizistral/enigmaticlegacy/mixin/MixinLivingEntity.java b/src/main/java/com/aizistral/enigmaticlegacy/mixin/MixinLivingEntity.java index 1f9d6218..a4622f22 100644 --- a/src/main/java/com/aizistral/enigmaticlegacy/mixin/MixinLivingEntity.java +++ b/src/main/java/com/aizistral/enigmaticlegacy/mixin/MixinLivingEntity.java @@ -30,7 +30,9 @@ public MixinLivingEntity(EntityType type, Level world) { @Inject(method = "isDamageSourceBlocked", at = @At("HEAD"), cancellable = true) private void onDamageSourceBlocking(DamageSource source, CallbackInfoReturnable info) { - SuperpositionHandler.onDamageSourceBlocking(((LivingEntity)(Object)this), this.useItem, source, info); + if (SuperpositionHandler.onDamageSourceBlocking(((LivingEntity)(Object)this), this.useItem, source, info)) { + info.setReturnValue(true); + } } @Override diff --git a/src/main/java/com/aizistral/enigmaticlegacy/proxy/ClientProxy.java b/src/main/java/com/aizistral/enigmaticlegacy/proxy/ClientProxy.java index 2b503c03..090b7ffc 100644 --- a/src/main/java/com/aizistral/enigmaticlegacy/proxy/ClientProxy.java +++ b/src/main/java/com/aizistral/enigmaticlegacy/proxy/ClientProxy.java @@ -191,11 +191,16 @@ private , R extends LivingEnt } } + private void registerBlockingProperty(Item item) { + ItemProperties.register(item, new ResourceLocation("blocking"), + (stack, world, entity, seed) -> entity != null && entity.isUsingItem() + && entity.getUseItem() == stack ? 1 : 0); + } + @OnlyIn(Dist.CLIENT) public void onClientSetup(FMLClientSetupEvent event) { - ItemProperties.register(EnigmaticItems.INFERNAL_SHIELD, new ResourceLocation("blocking"), - (stack, world, entity, seed) -> entity != null && entity.isUsingItem() - && entity.getUseItem() == stack ? 1 : 0); + this.registerBlockingProperty(EnigmaticItems.INFERNAL_SHIELD); + this.registerBlockingProperty(EnigmaticItems.ELDRITCH_PAN); ItemProperties.register(EnigmaticItems.THE_INFINITUM, new ResourceLocation(EnigmaticLegacy.MODID, "the_infinitum_open"), (stack, world, entity, seed) -> { if (entity instanceof Player player) { diff --git a/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticEffects.java b/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticEffects.java index b7cd2c44..b5fc760a 100644 --- a/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticEffects.java +++ b/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticEffects.java @@ -19,10 +19,18 @@ public class EnigmaticEffects extends AbstractRegistry { @ObjectHolder(value = MODID + ":molten_heart", registryName = "mob_effect") public static final MoltenHeartEffect MOLTEN_HEART = null; + @ObjectHolder(value = MODID + ":growing_hunger", registryName = "mob_effect") + public static final GrowingHungerEffect GROWING_HUNGER = null; + + @ObjectHolder(value = MODID + ":growing_bloodlust", registryName = "mob_effect") + public static final GrowingBloodlustEffect GROWING_BLOODLUST = null; + private EnigmaticEffects() { super(ForgeRegistries.MOB_EFFECTS); this.register("blazing_strength", BlazingStrengthEffect::new); this.register("molten_heart", MoltenHeartEffect::new); + this.register("growing_hunger", GrowingHungerEffect::new); + this.register("growing_bloodlust", GrowingBloodlustEffect::new); } } diff --git a/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticItems.java b/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticItems.java index a0c96e7f..f84537dc 100644 --- a/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticItems.java +++ b/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticItems.java @@ -435,6 +435,10 @@ public class EnigmaticItems extends AbstractRegistry { @ObjectHolder(value = MODID + ":soul_dust", registryName = "item") public static final Item SOUL_DUST = null; + @ConfigurableItem("Eldritch Frying Pan") + @ObjectHolder(value = MODID + ":eldritch_pan", registryName = "item") + public static final Item ELDRITCH_PAN = null; + private EnigmaticItems() { super(ForgeRegistries.ITEMS); this.register("enigmatic_item", EnigmaticItem::new); @@ -534,6 +538,7 @@ private EnigmaticItems() { this.register("deception_amulet", DeceptionAmulet::new); this.register("the_judgement", TheJudgement::new); this.register("soul_dust", SoulDust::new); + this.register("eldritch_pan", EldritchPan::new); this.register("common_potion", () -> new UltimatePotionBase(Rarity.COMMON, PotionType.COMMON)); this.register("common_potion_splash", () -> new UltimatePotionSplash(Rarity.COMMON, PotionType.COMMON)); diff --git a/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticSounds.java b/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticSounds.java index 3559cf22..39fc784e 100644 --- a/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticSounds.java +++ b/src/main/java/com/aizistral/enigmaticlegacy/registries/EnigmaticSounds.java @@ -37,6 +37,12 @@ public class EnigmaticSounds extends AbstractRegistry { @ObjectHolder(value = MODID + ":misc.uneat", registryName = "sound_event") public static final SoundEvent EAT_REVERSE = null; + @ObjectHolder(value = MODID + ":misc.pan_clang", registryName = "sound_event") + public static final SoundEvent PAN_CLANG = null; + + @ObjectHolder(value = MODID + ":misc.pan_clang_fr", registryName = "sound_event") + public static final SoundEvent PAN_CLANG_FR = null; + private EnigmaticSounds() { super(ForgeRegistries.SOUND_EVENTS); this.register("misc.hhon"); @@ -47,6 +53,8 @@ private EnigmaticSounds() { this.register("misc.learn"); this.register("misc.sword_hit_reject"); this.register("misc.uneat"); + this.register("misc.pan_clang"); + this.register("misc.pan_clang_fr"); } private void register(String name) { diff --git a/src/main/resources/assets/enigmaticlegacy/lang/en_us.json b/src/main/resources/assets/enigmaticlegacy/lang/en_us.json index f9f67c79..acdc6fe6 100644 --- a/src/main/resources/assets/enigmaticlegacy/lang/en_us.json +++ b/src/main/resources/assets/enigmaticlegacy/lang/en_us.json @@ -112,6 +112,7 @@ "item.enigmaticlegacy.deception_amulet": "Amulet of Deception [WIP]", "item.enigmaticlegacy.the_judgement": "The Judgement", "item.enigmaticlegacy.soul_dust": "Soul Dust", + "item.enigmaticlegacy.eldritch_pan": "The Voracious Pan", "block.enigmaticlegacy.big_lamp": "Lamp", "block.enigmaticlegacy.massive_lamp": "Encased Lamp", @@ -123,6 +124,8 @@ "effect.enigmaticlegacy.blazing_strength": "Blazing Might", "effect.enigmaticlegacy.molten_heart": "Molten Heart", + "effect.enigmaticlegacy.growing_hunger": "Growing Hunger", + "effect.enigmaticlegacy.growing_bloodlust": "Growing Bloodlust", "stat.enigmaticlegacy.play_time_with_seven_curses": "Time Played with Seven Curses", "stat.enigmaticlegacy.play_time_without_seven_curses": "Time Played without Seven Curses", @@ -248,6 +251,7 @@ "death.attack.darkness": "%1$s was devoured by darkness", "message.enigmaticlegacy.permadeath": "In attempting the feat, one proves their courage.\nMay your fractured soul at last find rest.", "message.enigmaticlegacy.cursed_sleep": "Seven Curses awaken unspeakable fear and gnawing uncertainty within as you approach the tempting realm of dreams. No hope for the hopeless, no sleep for the sleepless...", + "message.enigmaticlegacy.eldritch_pan_buff": "With the taste of this new soul, The Voracious Pan grows ever stronger.", "message.enigmaticlegacy.gen_sim_complete": "Estimated generation complete in §632768§5 instances; check §6latest.log§5 file to see the results.", "message.enigmaticlegacy.animal_analysis_complete": "Entity registry analysis is complete; check §6latest.log§5 file to see the results.", "message.enigmaticlegacy.voiceover_experimental": "§eHello there! §6Enigmatic Legacy§e developer on the line. Since voiceover is not a common thing for mods to add, I would like you to know that this feature is experimental, and I am actively looking for player feedback on it. Join my §6Discord§e and inform me of your impression once you play with it for some while: §6https://discord.gg/fuWK8ns", @@ -802,7 +806,7 @@ "tooltip.enigmaticlegacy.cursedOnesOnly2": "hold power to obtain and use this item.", "tooltip.enigmaticlegacy.worthyOnesOnly1": "§5The sacrifice neccessary to aquire this item", - "tooltip.enigmaticlegacy.worthyOnesOnly2": "§5is immense - you have to spend §699.5%§5 of your", + "tooltip.enigmaticlegacy.worthyOnesOnly2": "§5is immense - you have to spend §6%s§5 of your", "tooltip.enigmaticlegacy.worthyOnesOnly3": "§5time in the world suffering the §6Seven Curses§5.", "tooltip.enigmaticlegacy.worthyOnesOnly4": "For now, your time measures at:", @@ -1024,6 +1028,24 @@ "tooltip.enigmaticlegacy.theJudgementMode0": "§6Normal", "tooltip.enigmaticlegacy.theJudgementMode1": "§6Clear Drops", + "tooltip.enigmaticlegacy.eldritchPan1": "§5Alteration of the §6Fourth Curse§d:", + "tooltip.enigmaticlegacy.eldritchPan2": "§6- Always deals its full damage.", + "tooltip.enigmaticlegacy.eldritchPan3": "§6%s §dLifesteal", + "tooltip.enigmaticlegacy.eldritchPan4": "§6%s §dHungersteal", + "tooltip.enigmaticlegacy.eldritchPan4_alt": "§6%s §dHungersteal (converts to health)", + "tooltip.enigmaticlegacy.eldritchPan5": "§5Cooks the meat of slain creatures.", + "tooltip.enigmaticlegacy.eldritchPan6": "§5Can be used as a shield, and consume projectiles while blocking.", + "tooltip.enigmaticlegacy.eldritchPan7": "§5Continuosly holding the pan grants a §6Growing Hunger§5 effect,", + "tooltip.enigmaticlegacy.eldritchPan8": "§5which makes you hungrier, but stronger.", + "tooltip.enigmaticlegacy.eldritchPan7_alt": "§5Continuosly holding the pan grants a §6Growing Bloodlust§5 effect,", + "tooltip.enigmaticlegacy.eldritchPan8_alt": "§5which makes you lose health, but grants strength and lifesteal.", + "tooltip.enigmaticlegacy.eldritchPan8p_alt": "§5This effect cannot kill you.", + "tooltip.enigmaticlegacy.eldritchPan9": "§5Each new creature slain with the pan gives it a permanent §6%s", + "tooltip.enigmaticlegacy.eldritchPan10": "§5§dDamage§5 and §6%s §dArmor§5 when held.", + "tooltip.enigmaticlegacy.eldritchPanLore1": "§5Raw and primal hunger given form.", + "tooltip.enigmaticlegacy.eldritchPanKills1": "§dUnique Kills: %s", + "tooltip.enigmaticlegacy.eldritchPanKillsMax": "§6The pan is sated... but you are not.", + "gui.enigmaticlegacy.lore_inscriber": "Write Name & Lore", "gui.enigmaticlegacy.blazing_core_bar_title": "Heat", "gui.enigmaticlegacy.blazing_core_bar_offsetX": "0", @@ -1753,7 +1775,7 @@ "book.enigmaticlegacy.entry.desolation_ring.name": "Burden of Desolation", - "book.enigmaticlegacy.entry.desolation_ring.page.1": "You can scarce comprehend presence imposed upon reality by Heart of the Abyss, but, as you have recently discovered, comprehension is not neccessary for the ability to make use of it. Among few equally wonderful and terrible things that can draw power from it, there is this ring - even more nightmarish, perhaps, than Ring of the Seven Curses, in its", + "book.enigmaticlegacy.entry.desolation_ring.page.1": "You can barely comprehend presence imposed upon reality by Heart of the Abyss, but, as you have recently discovered, comprehension is not neccessary for the ability to make use of it. Among few equally wonderful and terrible things that can draw power from it, there is this ring - even more nightmarish, perhaps, than Ring of the Seven Curses, in its", "book.enigmaticlegacy.entry.desolation_ring.page.2": "unnameable nature.It offers to conveniently fulfill your gnawing desire to set yourself free of neccessity to endlessly slaughter creatures that could once tolerate your presence,", "book.enigmaticlegacy.entry.desolation_ring.page.3": "but have lost such ability soon as you submitted yourself to the burden of Seven Curses... By erasing them from the very existence surrounding you.The cost of such reality-bending power is perilous, however, as should you decide that you desire it - you will be bound to it forevermore. And as you know by now, void can be more unbearable than even most frightening, ever-present threat...", @@ -1826,6 +1848,14 @@ "book.enigmaticlegacy.entry.end_anchor.page.4": "is not the safest of places to traverse, most so when stripped of flesh... You cannot help but wonder what terrible places await those who are mislead by the light of their beacons, and what grisly fate befalls them in there.", + "book.enigmaticlegacy.entry.eldritch_pan.name": "The Voracious Pan", + "book.enigmaticlegacy.entry.eldritch_pan.page.1": "The very bones of the universe, both celestial and eldritch, lay at your fingertips. And yet, you still crave more...Fortunately, the unthinkable nature of Heart of the Abyss can be employed in this pursuit of yours. Less fortunately, another kind of insatiable craving now plagues your mind and body alike.", + "book.enigmaticlegacy.entry.eldritch_pan.page.2": "This boundless hunger demands that you keep hunting for all manner of creature that walk the lands of this, and many other worlds. Consumed by it, you cannot quite tell if this influence fully comes from the artifact that you have forged,", + "book.enigmaticlegacy.entry.eldritch_pan.page.3": "or it has become so deeply engraved in your soul that it will continue haunting you even without it.The maw of The Voracious Pan stays ever-open, leading into what you presume is a stomach belonging to a vast entity of incomprehensible dimensions. Has this being granted you the Heart of the Abyss, or is it merely an entity that shares the same insatiable appetite you suffer from? It might be better not to know.", + "book.enigmaticlegacy.entry.eldritch_pan.page.4": "The promise of The Forbidden Fruit to quench any hunger once and for all is more tempting than ever, but you remain cautious. Things are never quite so simple for a cursed being such as yourself, and once you lose your ability to hunger, some other calamity will surely take its place.Few dare to cross paths with you now. Ones that witnessed flesh torn and consumed, hearts crushed and forgotten, and veins sucked dry of blood", + "book.enigmaticlegacy.entry.eldritch_pan.page.5": "in your never-ending feast, are shaken. Those you struck down have not returned to tell the tales.What, or indeed who, will be your next meal?", + + "book.enigmaticlegacy.landing_text": "In front of you lies the well of great knowledge, a place where some of this world's greatest mysteries belong, scrupulously researched and carefully catalogized.As your journey continues and the world reveals itself to you, you may revisit and behold knowledge you gathered within these pages.", "item.enigmaticlegacy.cosmic_scroll": "The Architect's Favor", diff --git a/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan.json b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan.json new file mode 100644 index 00000000..1ce169b6 --- /dev/null +++ b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan.json @@ -0,0 +1,16 @@ +{ + "overrides": [ + { + "predicate": { + "blocking": 0 + }, + "model": "enigmaticlegacy:item/eldritch_pan_idle" + }, + { + "predicate": { + "blocking": 1 + }, + "model": "enigmaticlegacy:item/eldritch_pan_blocking" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_blocking.json b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_blocking.json new file mode 100644 index 00000000..a3afe0bc --- /dev/null +++ b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_blocking.json @@ -0,0 +1,24 @@ +{ + "loader": "forge:separate_transforms", + "gui_light": "front", + "base": { + "parent": "enigmaticlegacy:item/eldritch_pan_in_inventory" + }, + "perspectives": { + "firstperson_righthand": { + "parent": "enigmaticlegacy:item/eldritch_pan_blocking_in_hand" + }, + "firstperson_lefthand": { + "parent": "enigmaticlegacy:item/eldritch_pan_blocking_in_hand" + }, + "thirdperson_righthand": { + "parent": "enigmaticlegacy:item/eldritch_pan_blocking_in_hand" + }, + "thirdperson_lefthand": { + "parent": "enigmaticlegacy:item/eldritch_pan_blocking_in_hand" + }, + "head": { + "parent": "enigmaticlegacy:item/eldritch_pan_blocking_in_hand" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_blocking_in_hand.json b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_blocking_in_hand.json new file mode 100644 index 00000000..6474b26e --- /dev/null +++ b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_blocking_in_hand.json @@ -0,0 +1,25 @@ +{ + "parent": "enigmaticlegacy:item/eldritch_pan_idle_in_hand", + "display": { + "thirdperson_righthand": { + "rotation": [-92.13, -30.82, -40], + "translation": [1, 4, -2.5], + "scale": [0.85, 0.85, 0.85] + }, + "thirdperson_lefthand": { + "rotation": [-92.13, -30.82, -40], + "translation": [1, 4, -2.5], + "scale": [0.85, 0.85, 0.85] + }, + "firstperson_righthand": { + "rotation": [-98.84, 21.29, 9], + "translation": [-4.5, 1.5, -2.5], + "scale": [0.85, 0.85, 0.85] + }, + "firstperson_lefthand": { + "rotation": [-98.84, 21.29, 9], + "translation": [-4.5, 1.5, -2.5], + "scale": [0.85, 0.85, 0.85] + } + } +} diff --git a/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_idle.json b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_idle.json new file mode 100644 index 00000000..1fe8d0a5 --- /dev/null +++ b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_idle.json @@ -0,0 +1,24 @@ +{ + "loader": "forge:separate_transforms", + "gui_light": "front", + "base": { + "parent": "enigmaticlegacy:item/eldritch_pan_in_inventory" + }, + "perspectives": { + "firstperson_righthand": { + "parent": "enigmaticlegacy:item/eldritch_pan_idle_in_hand" + }, + "firstperson_lefthand": { + "parent": "enigmaticlegacy:item/eldritch_pan_idle_in_hand" + }, + "thirdperson_righthand": { + "parent": "enigmaticlegacy:item/eldritch_pan_idle_in_hand" + }, + "thirdperson_lefthand": { + "parent": "enigmaticlegacy:item/eldritch_pan_idle_in_hand" + }, + "head": { + "parent": "enigmaticlegacy:item/eldritch_pan_idle_in_hand" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_idle_in_hand.json b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_idle_in_hand.json new file mode 100644 index 00000000..e4c0548a --- /dev/null +++ b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_idle_in_hand.json @@ -0,0 +1,244 @@ +{ + "gui_light": "front", + "credit": "Made with Blockbench", + "texture_size": [64, 64], + "textures": { + "0": "enigmaticlegacy:item/eldritch_pan_model", + "particle": "enigmaticlegacy:item/eldritch_pan_model" + }, + "elements": [ + { + "from": [7, 0.25, -2], + "to": [9, 2.25, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0.25, 0]}, + "faces": { + "north": {"uv": [5.25, 13.25, 5.75, 13.75], "texture": "#0"}, + "east": {"uv": [2.75, 13.25, 5.25, 13.75], "texture": "#0"}, + "south": {"uv": [8.25, 13.25, 8.75, 13.75], "texture": "#0"}, + "west": {"uv": [5.75, 13.25, 8.25, 13.75], "texture": "#0"}, + "up": {"uv": [5.75, 13.25, 5.25, 10.75], "texture": "#0"}, + "down": {"uv": [6.25, 10.75, 5.75, 13.25], "texture": "#0"} + } + }, + { + "from": [2, 0, 8], + "to": [14, 2, 20], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [3, 3, 6, 3.5], "texture": "#0"}, + "east": {"uv": [0, 3, 3, 3.5], "texture": "#0"}, + "south": {"uv": [9, 3, 12, 3.5], "texture": "#0"}, + "west": {"uv": [6, 3, 9, 3.5], "texture": "#0"}, + "up": {"uv": [6, 3, 3, 0], "texture": "#0"}, + "down": {"uv": [9, 0, 6, 3], "texture": "#0"} + } + }, + { + "from": [13, 2, 8], + "to": [14, 3, 20], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 1, 8]}, + "faces": { + "north": {"uv": [6.5, 6.75, 6.75, 7], "texture": "#0"}, + "east": {"uv": [3.5, 6.75, 6.5, 7], "texture": "#0"}, + "south": {"uv": [9.75, 6.75, 10, 7], "texture": "#0"}, + "west": {"uv": [6.75, 6.75, 9.75, 7], "texture": "#0"}, + "up": {"uv": [6.75, 6.75, 6.5, 3.75], "texture": "#0"}, + "down": {"uv": [7, 3.75, 6.75, 6.75], "texture": "#0"} + } + }, + { + "from": [3, 7, 16.25], + "to": [13, 7, 19.25], + "rotation": {"angle": 22.5, "axis": "x", "origin": [6, 5, 8.25]}, + "faces": { + "north": {"uv": [7, 6.75, 9.5, 6.75], "texture": "#0"}, + "east": {"uv": [6.25, 6.75, 7, 6.75], "texture": "#0"}, + "south": {"uv": [10.25, 6.75, 12.75, 6.75], "texture": "#0"}, + "west": {"uv": [9.5, 6.75, 10.25, 6.75], "texture": "#0"}, + "up": {"uv": [9.5, 6.75, 7, 6], "texture": "#0"}, + "down": {"uv": [12, 6, 9.5, 6.75], "texture": "#0"} + } + }, + { + "from": [3, 7, 8.75], + "to": [13, 7, 11.75], + "rotation": {"angle": -22.5, "axis": "x", "origin": [6, 5, 19.75]}, + "faces": { + "north": {"uv": [7, 4.25, 9.5, 4.25], "texture": "#0"}, + "east": {"uv": [6.25, 4.25, 7, 4.25], "texture": "#0"}, + "south": {"uv": [10.25, 4.25, 12.75, 4.25], "texture": "#0"}, + "west": {"uv": [9.5, 4.25, 10.25, 4.25], "texture": "#0"}, + "up": {"uv": [9.5, 4.25, 7, 3.5], "texture": "#0"}, + "down": {"uv": [12, 3.5, 9.5, 4.25], "texture": "#0"} + } + }, + { + "from": [10, 7, 9], + "to": [13, 7, 19], + "rotation": {"angle": -22.5, "axis": "z", "origin": [2, 5, 12]}, + "faces": { + "north": {"uv": [5, 6, 5.75, 6], "texture": "#0"}, + "east": {"uv": [2.5, 6, 5, 6], "texture": "#0"}, + "south": {"uv": [8.25, 6, 9, 6], "texture": "#0"}, + "west": {"uv": [5.75, 6, 8.25, 6], "texture": "#0"}, + "up": {"uv": [5.75, 6, 5, 3.5], "texture": "#0"}, + "down": {"uv": [6.5, 3.5, 5.75, 6], "texture": "#0"} + } + }, + { + "from": [2.5, 7, 9], + "to": [5.5, 7, 19], + "rotation": {"angle": 22.5, "axis": "z", "origin": [13.5, 5, 12]}, + "faces": { + "north": {"uv": [3.5, 6, 4.25, 6], "texture": "#0"}, + "east": {"uv": [1, 6, 3.5, 6], "texture": "#0"}, + "south": {"uv": [6.75, 6, 7.5, 6], "texture": "#0"}, + "west": {"uv": [4.25, 6, 6.75, 6], "texture": "#0"}, + "up": {"uv": [4.25, 6, 3.5, 3.5], "texture": "#0"}, + "down": {"uv": [5, 3.5, 4.25, 6], "texture": "#0"} + } + }, + { + "from": [4.75, 5, 7.5], + "to": [7.75, 5, 14.5], + "rotation": {"angle": 22.5, "axis": "x", "origin": [0.75, 3, 6.5]}, + "faces": { + "north": {"uv": [3, 8.75, 3.75, 8.75], "texture": "#0"}, + "east": {"uv": [1.25, 8.75, 3, 8.75], "texture": "#0"}, + "south": {"uv": [5.5, 8.75, 6.25, 8.75], "texture": "#0"}, + "west": {"uv": [3.75, 8.75, 5.5, 8.75], "texture": "#0"}, + "up": {"uv": [3.75, 8.75, 3, 7], "texture": "#0"}, + "down": {"uv": [4.5, 7, 3.75, 8.75], "texture": "#0"} + } + }, + { + "from": [3.75, 4.465, 1.18963], + "to": [7.75, 4.465, 8.18963], + "rotation": {"angle": 0, "axis": "y", "origin": [0.75, 2.465, 0.18963]}, + "faces": { + "north": {"uv": [7, 6, 8, 6], "texture": "#0"}, + "east": {"uv": [5.25, 6, 7, 6], "texture": "#0"}, + "south": {"uv": [9.75, 6, 10.75, 6], "texture": "#0"}, + "west": {"uv": [8, 6, 9.75, 6], "texture": "#0"}, + "up": {"uv": [8, 6, 7, 4.25], "texture": "#0"}, + "down": {"uv": [9, 4.25, 8, 6], "texture": "#0"} + } + }, + { + "from": [2, 2, 8], + "to": [3, 3, 20], + "rotation": {"angle": 0, "axis": "y", "origin": [-4, 1, 8]}, + "faces": { + "north": {"uv": [3, 6.5, 3.25, 6.75], "texture": "#0"}, + "east": {"uv": [0, 6.5, 3, 6.75], "texture": "#0"}, + "south": {"uv": [6.25, 6.5, 6.5, 6.75], "texture": "#0"}, + "west": {"uv": [3.25, 6.5, 6.25, 6.75], "texture": "#0"}, + "up": {"uv": [3.25, 6.5, 3, 3.5], "texture": "#0"}, + "down": {"uv": [3.5, 3.5, 3.25, 6.5], "texture": "#0"} + } + }, + { + "from": [3, 2, 8], + "to": [13, 3, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [-5, 1, 8]}, + "faces": { + "north": {"uv": [4.75, 7.25, 7.25, 7.5], "texture": "#0"}, + "east": {"uv": [4.5, 7.25, 4.75, 7.5], "texture": "#0"}, + "south": {"uv": [7.5, 7.25, 10, 7.5], "texture": "#0"}, + "west": {"uv": [7.25, 7.25, 7.5, 7.5], "texture": "#0"}, + "up": {"uv": [7.25, 7.25, 4.75, 7], "texture": "#0"}, + "down": {"uv": [9.75, 7, 7.25, 7.25], "texture": "#0"} + } + }, + { + "from": [3, 2, 19], + "to": [13, 3, 20], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 1, 8]}, + "faces": { + "north": {"uv": [4.75, 7.75, 7.25, 8], "texture": "#0"}, + "east": {"uv": [4.5, 7.75, 4.75, 8], "texture": "#0"}, + "south": {"uv": [7.5, 7.75, 10, 8], "texture": "#0"}, + "west": {"uv": [7.25, 7.75, 7.5, 8], "texture": "#0"}, + "up": {"uv": [7.25, 7.75, 4.75, 7.5], "texture": "#0"}, + "down": {"uv": [9.75, 7.5, 7.25, 7.75], "texture": "#0"} + } + }, + { + "from": [8, 1.75, 19.25], + "to": [11, 3.75, 21.25], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 1.75, 19.25]}, + "faces": { + "north": {"uv": [0.5, 2, 1.25, 2.5], "texture": "#0"}, + "east": {"uv": [0, 2, 0.5, 2.5], "texture": "#0"}, + "south": {"uv": [1.75, 2, 2.5, 2.5], "texture": "#0"}, + "west": {"uv": [1.25, 2, 1.75, 2.5], "texture": "#0"}, + "up": {"uv": [1.25, 2, 0.5, 1.5], "texture": "#0"}, + "down": {"uv": [2, 1.5, 1.25, 2], "texture": "#0"} + } + }, + { + "from": [1.75, 1.75, 12], + "to": [2.75, 3.75, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [0.75, 1.75, 13]}, + "faces": { + "north": {"uv": [0.75, 4.25, 1, 4.75], "texture": "#0"}, + "east": {"uv": [0, 4.25, 0.75, 4.75], "texture": "#0"}, + "south": {"uv": [1.75, 4.25, 2, 4.75], "texture": "#0"}, + "west": {"uv": [1, 4.25, 1.75, 4.75], "texture": "#0"}, + "up": {"uv": [1, 4.25, 0.75, 3.5], "texture": "#0"}, + "down": {"uv": [1.25, 3.5, 1, 4.25], "texture": "#0"} + } + }, + { + "from": [13.25, 1.75, 10], + "to": [15.25, 3.75, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [12.25, 1.75, 11]}, + "faces": { + "north": {"uv": [1, 1, 1.5, 1.5], "texture": "#0"}, + "east": {"uv": [0, 1, 1, 1.5], "texture": "#0"}, + "south": {"uv": [2.5, 1, 3, 1.5], "texture": "#0"}, + "west": {"uv": [1.5, 1, 2.5, 1.5], "texture": "#0"}, + "up": {"uv": [1.5, 1, 1, 0], "texture": "#0"}, + "down": {"uv": [2, 0, 1.5, 1], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [-95.1, 0, 113], + "translation": [-5.25, 2, 3.5], + "scale": [0.85, 0.85, 0.85] + }, + "thirdperson_lefthand": { + "rotation": [-95.1, 0, 113], + "translation": [-5.25, 2, 3.5], + "scale": [0.85, 0.85, 0.85] + }, + "firstperson_righthand": { + "rotation": [-98.84, 21.29, 128.68], + "translation": [-5.25, 3.5, 3.5], + "scale": [0.85, 0.85, 0.85] + }, + "firstperson_lefthand": { + "rotation": [-98.84, 21.29, 128.68], + "translation": [-5.25, 3.5, 3.5], + "scale": [0.85, 0.85, 0.85] + }, + "ground": { + "translation": [0, 5, 0] + }, + "gui": { + "rotation": [50, 135, 0], + "translation": [-2.5, 1.25, 0], + "scale": [0.79, 0.79, 0.79] + }, + "head": { + "rotation": [-180, -46, -180], + "translation": [3.25, 14.5, 3.25] + }, + "fixed": { + "rotation": [-90, 45, 0], + "translation": [-2, -2.25, -7] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_in_inventory.json b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_in_inventory.json new file mode 100644 index 00000000..ac363bbb --- /dev/null +++ b/src/main/resources/assets/enigmaticlegacy/models/item/eldritch_pan_in_inventory.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enigmaticlegacy:item/eldritch_pan" + } +} diff --git a/src/main/resources/assets/enigmaticlegacy/patchouli_books/the_acknowledgment/en_us/entries/tools/eldritch_pan.json b/src/main/resources/assets/enigmaticlegacy/patchouli_books/the_acknowledgment/en_us/entries/tools/eldritch_pan.json new file mode 100644 index 00000000..c88335f4 --- /dev/null +++ b/src/main/resources/assets/enigmaticlegacy/patchouli_books/the_acknowledgment/en_us/entries/tools/eldritch_pan.json @@ -0,0 +1,38 @@ +{ + "name": "book.enigmaticlegacy.entry.eldritch_pan.name", + "icon": "enigmaticlegacy:eldritch_pan", + "category": "enigmaticlegacy:tools", + "advancement": "enigmaticlegacy:book/tools/eldritch_pan", + "secret": false, + "priority": false, + "read_by_default": false, + "sortnum": 120, + "pages": [ + { + "type": "text", + "text": "book.enigmaticlegacy.entry.eldritch_pan.page.1" + }, + { + "type": "crafting", + "recipe": "enigmaticlegacy:eldritch_pan", + "title": " ", + "text": "book.enigmaticlegacy.entry.eldritch_pan.page.2" + }, + { + "type": "text", + "text": "book.enigmaticlegacy.entry.eldritch_pan.page.3" + }, + { + "type": "text", + "text": "book.enigmaticlegacy.entry.eldritch_pan.page.4" + }, + { + "type": "text", + "text": "book.enigmaticlegacy.entry.eldritch_pan.page.5" + }, + { + "type": "empty", + "draw_filler": false + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enigmaticlegacy/sounds.json b/src/main/resources/assets/enigmaticlegacy/sounds.json index 0dac4475..a026b64b 100644 --- a/src/main/resources/assets/enigmaticlegacy/sounds.json +++ b/src/main/resources/assets/enigmaticlegacy/sounds.json @@ -50,6 +50,28 @@ } ] }, + "misc.pan_clang": { + "sounds": [ + { + "name": "enigmaticlegacy:misc/pan_clang_1", + "stream": false + }, { + "name": "enigmaticlegacy:misc/pan_clang_2", + "stream": false + }, { + "name": "enigmaticlegacy:misc/pan_clang_3", + "stream": false + } + ] + }, + "misc.pan_clang_fr": { + "sounds": [ + { + "name": "enigmaticlegacy:misc/pan_clang_fr", + "stream": false + } + ] + }, "misc.uneat": { "sounds": [ { diff --git a/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_1.ogg b/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_1.ogg new file mode 100644 index 00000000..d29a30a7 Binary files /dev/null and b/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_1.ogg differ diff --git a/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_2.ogg b/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_2.ogg new file mode 100644 index 00000000..e98d9599 Binary files /dev/null and b/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_2.ogg differ diff --git a/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_3.ogg b/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_3.ogg new file mode 100644 index 00000000..50cdd7bf Binary files /dev/null and b/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_3.ogg differ diff --git a/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_fr.ogg b/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_fr.ogg new file mode 100644 index 00000000..c081651c Binary files /dev/null and b/src/main/resources/assets/enigmaticlegacy/sounds/misc/pan_clang_fr.ogg differ diff --git a/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan.png b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan.png new file mode 100644 index 00000000..2592c1f6 Binary files /dev/null and b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan.png differ diff --git a/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan.png.mcmeta b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan.png.mcmeta new file mode 100644 index 00000000..4f27dbe9 --- /dev/null +++ b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan.png.mcmeta @@ -0,0 +1,19 @@ +{ + "animation": { + "frames": [ + {"index": 0, "time": 20}, + {"index": 1, "time": 32}, + {"index": 2, "time": 17}, + {"index": 3, "time": 25}, + {"index": 4, "time": 10}, + {"index": 5, "time": 45}, + {"index": 6, "time": 2}, + {"index": 7, "time": 2}, + {"index": 8, "time": 2}, + {"index": 9, "time": 2}, + {"index": 10, "time": 2}, + {"index": 11, "time": 2} + ], + "frametime": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan_model.png b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan_model.png new file mode 100644 index 00000000..b770f5fd Binary files /dev/null and b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan_model.png differ diff --git a/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan_model.png.mcmeta b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan_model.png.mcmeta new file mode 100644 index 00000000..19e44aaf --- /dev/null +++ b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan_model.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation": { + "frames": [{"index": 0, "time": 96}, 1, 2, 3, 4, 5, 6], + "frametime": 1 + } +} diff --git a/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan_temp.png b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan_temp.png new file mode 100644 index 00000000..53b2566b Binary files /dev/null and b/src/main/resources/assets/enigmaticlegacy/textures/item/eldritch_pan_temp.png differ diff --git a/src/main/resources/assets/enigmaticlegacy/textures/mob_effect/growing_bloodlust.png b/src/main/resources/assets/enigmaticlegacy/textures/mob_effect/growing_bloodlust.png new file mode 100644 index 00000000..f66c7744 Binary files /dev/null and b/src/main/resources/assets/enigmaticlegacy/textures/mob_effect/growing_bloodlust.png differ diff --git a/src/main/resources/assets/enigmaticlegacy/textures/mob_effect/growing_hunger.png b/src/main/resources/assets/enigmaticlegacy/textures/mob_effect/growing_hunger.png new file mode 100644 index 00000000..f3b29e92 Binary files /dev/null and b/src/main/resources/assets/enigmaticlegacy/textures/mob_effect/growing_hunger.png differ diff --git a/src/main/resources/data/enigmaticlegacy/advancements/book/tools/eldritch_pan.json b/src/main/resources/data/enigmaticlegacy/advancements/book/tools/eldritch_pan.json new file mode 100644 index 00000000..a26237dc --- /dev/null +++ b/src/main/resources/data/enigmaticlegacy/advancements/book/tools/eldritch_pan.json @@ -0,0 +1,17 @@ +{ + "parent": "enigmaticlegacy:book/root", + "rewards": {}, + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "enigmaticlegacy:eldritch_pan" + } + } + }, + "requirements": [ + [ + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/data/enigmaticlegacy/advancements/recipes/generic/eldritch_pan.json b/src/main/resources/data/enigmaticlegacy/advancements/recipes/generic/eldritch_pan.json new file mode 100644 index 00000000..13839312 --- /dev/null +++ b/src/main/resources/data/enigmaticlegacy/advancements/recipes/generic/eldritch_pan.json @@ -0,0 +1,50 @@ +{ + "parent": "enigmaticlegacy:recipes/root", + "rewards": { + "recipes": [ + "enigmaticlegacy:eldritch_pan" + ] + }, + "criteria": { + "has_items": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": ["enigmaticlegacy:abyssal_heart"] + } + ] + } + }, + "has_recipe_result": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": ["enigmaticlegacy:eldritch_pan"] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "enigmaticlegacy:eldritch_pan" + } + }, + "is_cursed_one": { + "trigger": "enigmaticlegacy:equip_cursed_ring" + } + }, + "requirements": [ + [ + "has_recipe_result", + "has_the_recipe", + "has_items" + ], + [ + "is_cursed_one", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/data/enigmaticlegacy/recipes/eldritch_pan.json b/src/main/resources/data/enigmaticlegacy/recipes/eldritch_pan.json new file mode 100644 index 00000000..46ee29df --- /dev/null +++ b/src/main/resources/data/enigmaticlegacy/recipes/eldritch_pan.json @@ -0,0 +1,37 @@ +{ + "type": "minecraft:crafting_shaped", + "conditions": [ + { + "type": "enigmaticlegacy:is_enabled", + "item": "enigmaticlegacy:eldritch_pan" + } + ], + "pattern": [ + "ESE", + "IHI", + "TRT" + ], + "key": { + "E": { + "item": "enigmaticlegacy:evil_essence" + }, + "T": { + "item": "minecraft:ghast_tear" + }, + "H": { + "item": "enigmaticlegacy:abyssal_heart" + }, + "I": { + "item": "enigmaticlegacy:evil_ingot" + }, + "S": { + "item": "enigmaticlegacy:void_stone" + }, + "R": { + "item": "enigmaticlegacy:ender_rod" + } + }, + "result": { + "item": "enigmaticlegacy:eldritch_pan" + } +} \ No newline at end of file