From 5a0f299223091016e2ef57f40f89b685ab5bcb4f Mon Sep 17 00:00:00 2001 From: SammySemicolon <69329424+SammySemicolon@users.noreply.github.com> Date: Fri, 12 Jan 2024 02:13:15 +0100 Subject: [PATCH] Going to eep with bf pawesome --- .../block/SpiritCrucibleRenderer.java | 2 +- .../CrucibleAccelerationData.java | 95 ++++++++++---- .../spirit_crucible/CrucibleTuning.java | 121 ++++++++++-------- .../SpiritCrucibleCoreBlockEntity.java | 17 +-- .../SpiritCatalyzerCoreBlockEntity.java | 3 +- .../catalyzer_augment/WarpingEngineItem.java | 2 +- .../java/com/sammy/malum/data/MalumLang.java | 2 +- .../registry/common/item/ItemRegistry.java | 24 ++-- 8 files changed, 159 insertions(+), 107 deletions(-) diff --git a/src/main/java/com/sammy/malum/client/renderer/block/SpiritCrucibleRenderer.java b/src/main/java/com/sammy/malum/client/renderer/block/SpiritCrucibleRenderer.java index 6469e38fd..147a6f319 100644 --- a/src/main/java/com/sammy/malum/client/renderer/block/SpiritCrucibleRenderer.java +++ b/src/main/java/com/sammy/malum/client/renderer/block/SpiritCrucibleRenderer.java @@ -124,7 +124,7 @@ public void render(SpiritCrucibleCoreBlockEntity blockEntityIn, float partialTic poseStack.mulPose(Axis.YP.rotationDegrees(180f)); for (int i = 0; i < validValues.size(); i++) { CrucibleTuning.CrucibleTuningType tuningType = validValues.get(i); - String dataPrint = tuningType.statDisplayFunction.apply(blockEntityIn); + String dataPrint = tuningType.statDisplayFunction.apply(blockEntityIn.getAccelerationData()); boolean important = tuningType.equals(blockEntityIn.tuningType); MutableComponent dataText = Component.literal(" <" + dataPrint + ">"); MutableComponent text = Component.translatable(tuningType.translation()); diff --git a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/CrucibleAccelerationData.java b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/CrucibleAccelerationData.java index ba2eda42b..2072cb906 100644 --- a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/CrucibleAccelerationData.java +++ b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/CrucibleAccelerationData.java @@ -18,14 +18,16 @@ public class CrucibleAccelerationData { public final List positions = new ArrayList<>(); public final List accelerators = new ArrayList<>(); - public final float processingSpeed; - public final float damageChance; + public final TunedValue processingSpeed; + public final TunedValue damageChance; - public final float bonusYieldChance; - public final float fuelUsageRate; - public final float chainFocusingChance; - public final float damageAbsorptionChance; - public final float restorationChance; + public final TunedValue bonusYieldChance; + public final TunedValue fuelUsageRate; + public final TunedValue chainFocusingChance; + public final TunedValue damageAbsorptionChance; + public final TunedValue restorationChance; + + public float globalAttributeModifier; public static CrucibleAccelerationData createData(ICatalyzerAccelerationTarget target, int lookupRange, Level level, BlockPos pos) { Collection nearbyAccelerators = BlockHelper.getBlockEntities(ICrucibleAccelerator.class, level, pos, lookupRange); @@ -46,33 +48,42 @@ public static CrucibleAccelerationData createData(ICatalyzerAccelerationTarget t } } } - return new CrucibleAccelerationData(target, typeCount, validAccelerators); + final CrucibleAccelerationData data = new CrucibleAccelerationData(target, typeCount, validAccelerators); + data.globalAttributeModifier = target.getAccelerationData() != null ? target.getAccelerationData().globalAttributeModifier : 0; + return data; } public CrucibleAccelerationData(ICatalyzerAccelerationTarget target, Map typeCount, Collection accelerators) { final List augments = Stream.concat(accelerators.stream().map(ICrucibleAccelerator::getAugmentType), target.getAugmentTypes().stream()).filter(Optional::isPresent).map(Optional::get).toList(); - CrucibleTuning tuning = new CrucibleTuning(target.getTuningType()); - this.processingSpeed = (1 + typeCount.entrySet().stream().map((entry) -> entry.getKey().getAcceleration(entry.getValue())).reduce(Float::sum).orElse(0f) - + augments.stream().map(AbstractAugmentItem::getSpeedIncrease).reduce(Float::sum).orElse(0f)) * tuning.speedIncreaseMultiplier.getMultiplier(); - this.damageChance = Mth.clamp((typeCount.entrySet().stream().map((entry) -> entry.getKey().getExtraDamageRollChance(entry.getValue())).reduce(Float::sum).orElse(0f) - + augments.stream().map(AbstractAugmentItem::getDamageChanceIncrease).reduce(Float::sum).orElse(0f)) * tuning.damageChanceMultiplier.getMultiplier(), 0, 0.99f); - - this.bonusYieldChance = augments.stream().map(AbstractAugmentItem::getBonusYieldChanceIncrease).reduce(Float::sum).orElse(0f) * tuning.bonusYieldChanceMultiplier.getMultiplier(); - this.fuelUsageRate = (1 + augments.stream().map(AbstractAugmentItem::getFuelUsageRateIncrease).reduce(Float::sum).orElse(0f)) * tuning.fuelEfficiencyIncreaseMultiplier.getMultiplier(); - this.chainFocusingChance = augments.stream().map(AbstractAugmentItem::getInstantCompletionChance).reduce(Float::sum).orElse(0f) * tuning.chainFocusingChanceMultiplier.getMultiplier(); - this.damageAbsorptionChance = augments.stream().map(AbstractAugmentItem::getCompleteDamageNegationChance).reduce(Float::sum).orElse(0f) * tuning.damageAbsorptionChanceMultiplier.getMultiplier(); - this.restorationChance = augments.stream().map(AbstractAugmentItem::getRestorationChance).reduce(Float::sum).orElse(0f) * tuning.restorationChanceMultiplier.getMultiplier(); + CrucibleTuning tuning = new CrucibleTuning(target); + this.processingSpeed = tuning.processingSpeedMultiplier.createTunedValue( + (1 + typeCount.entrySet().stream().map((entry) -> entry.getKey().getAcceleration(entry.getValue())).reduce(Float::sum).orElse(0f) + + augments.stream().map(AbstractAugmentItem::getSpeedIncrease).reduce(Float::sum).orElse(0f)) * tuning.processingSpeedMultiplier.getMultiplier()); + this.damageChance = tuning.damageChanceMultiplier.createTunedValue( + Mth.clamp((typeCount.entrySet().stream().map((entry) -> entry.getKey().getExtraDamageRollChance(entry.getValue())).reduce(Float::sum).orElse(0f) + + augments.stream().map(AbstractAugmentItem::getDamageChanceIncrease).reduce(Float::sum).orElse(0f)) * tuning.damageChanceMultiplier.getMultiplier(), 0, 0.99f)); + + this.bonusYieldChance = tuning.bonusYieldChanceMultiplier.createTunedValue( + augments.stream().map(AbstractAugmentItem::getBonusYieldChanceIncrease).reduce(Float::sum).orElse(0f) * tuning.bonusYieldChanceMultiplier.getMultiplier()); + this.fuelUsageRate = tuning.fuelUsageRate.createTunedValue( + 1 + augments.stream().map(AbstractAugmentItem::getFuelUsageRateIncrease).reduce(Float::sum).orElse(0f) * tuning.fuelUsageRate.getMultiplier()); + this.chainFocusingChance = tuning.chainFocusingChanceMultiplier.createTunedValue( + augments.stream().map(AbstractAugmentItem::getInstantCompletionChance).reduce(Float::sum).orElse(0f) * tuning.chainFocusingChanceMultiplier.getMultiplier()); + this.damageAbsorptionChance = tuning.damageAbsorptionChanceMultiplier.createTunedValue( + augments.stream().map(AbstractAugmentItem::getCompleteDamageNegationChance).reduce(Float::sum).orElse(0f) * tuning.damageAbsorptionChanceMultiplier.getMultiplier()); + this.restorationChance = tuning.restorationChanceMultiplier.createTunedValue( + augments.stream().map(AbstractAugmentItem::getRestorationChance).reduce(Float::sum).orElse(0f) * tuning.restorationChanceMultiplier.getMultiplier()); accelerators.forEach(this::addAccelerator); } public CrucibleAccelerationData() { - this.processingSpeed = 1; - this.damageChance = 0; - this.bonusYieldChance = 0; - this.fuelUsageRate = 1; - this.chainFocusingChance = 0; - this.damageAbsorptionChance = 0; - this.restorationChance = 0; + this.processingSpeed = new DefaultedTunedValue(1); + this.damageChance = new DefaultedTunedValue(0); + this.bonusYieldChance = new DefaultedTunedValue(0); + this.fuelUsageRate = new DefaultedTunedValue(1); + this.chainFocusingChance = new DefaultedTunedValue(0); + this.damageAbsorptionChance = new DefaultedTunedValue(0); + this.restorationChance = new DefaultedTunedValue(0); } private void addAccelerator(ICrucibleAccelerator crucibleAccelerator) { @@ -89,6 +100,7 @@ public void save(CompoundTag compound) { BlockHelper.saveBlockPos(acceleratorTag, position, "accelerator_" + i + "_"); } } + acceleratorTag.putFloat("globalAttributeModifier", globalAttributeModifier); compound.put("acceleratorData", acceleratorTag); } @@ -110,10 +122,39 @@ public static CrucibleAccelerationData load(Level level, ICatalyzerAccelerationT BlockHelper.updateState(level, pos); } } - return new CrucibleAccelerationData(target, typeCount, accelerators); + final CrucibleAccelerationData data = new CrucibleAccelerationData(target, typeCount, accelerators); + data.globalAttributeModifier = acceleratorTag.getFloat("globalAttributeModifier"); + return data; } else { return DEFAULT; } } + + public static class TunedValue { + public final CrucibleTuning.TuningModifier tuning; + protected final float baseValue; + + public TunedValue(CrucibleTuning.TuningModifier tuning, float baseValue) { + this.tuning = tuning; + this.baseValue = baseValue; + } + + public float getValue(CrucibleAccelerationData accelerationData) { + if (tuning.tuningType.equals(CrucibleTuning.CrucibleTuningType.CHAIN_FOCUSING_CHANCE)) { + return baseValue; + } + return baseValue * tuning.getMultiplierScalar(accelerationData.globalAttributeModifier); + } + } + public static class DefaultedTunedValue extends TunedValue { + public DefaultedTunedValue(float baseValue) { + super(null, baseValue); + } + + @Override + public float getValue(CrucibleAccelerationData accelerationData) { + return baseValue; + } + } } diff --git a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/CrucibleTuning.java b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/CrucibleTuning.java index c71f2d1d1..a519675c8 100644 --- a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/CrucibleTuning.java +++ b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/CrucibleTuning.java @@ -6,45 +6,47 @@ public class CrucibleTuning { public final CrucibleTuningType buffedStat; - public final TunedValue speedIncreaseMultiplier; - public final InverseTunedValue fuelEfficiencyIncreaseMultiplier; - public final InverseTunedValue damageChanceMultiplier; - public final TunedValue bonusYieldChanceMultiplier; - public final TunedValue chainFocusingChanceMultiplier; - public final TunedValue damageAbsorptionChanceMultiplier; - public final TunedValue restorationChanceMultiplier; - - public CrucibleTuning(CrucibleTuningType buffedStat) { - this.buffedStat = buffedStat; - this.speedIncreaseMultiplier = new TunedValue(CrucibleTuningType.PROCESSING_SPEED, buffedStat); - this.fuelEfficiencyIncreaseMultiplier = new InverseTunedValue(CrucibleTuningType.FUEL_USAGE_RATE, buffedStat); - this.damageChanceMultiplier = new InverseTunedValue(CrucibleTuningType.INSTABILITY, buffedStat); - this.bonusYieldChanceMultiplier = new TunedValue(CrucibleTuningType.FORTUNE_CHANCE, buffedStat); - this.chainFocusingChanceMultiplier = new TunedValue(CrucibleTuningType.CHAIN_FOCUSING_CHANCE, buffedStat); - this.damageAbsorptionChanceMultiplier = new TunedValue(CrucibleTuningType.SHIELDING_CHANCE, buffedStat); - this.restorationChanceMultiplier = new TunedValue(CrucibleTuningType.RESTORATION_CHANCE, buffedStat); + public final Map values = new HashMap<>(); + + public final TuningModifier processingSpeedMultiplier; + public final InverseTuningModifier fuelUsageRate; + public final InverseTuningModifier damageChanceMultiplier; + public final TuningModifier bonusYieldChanceMultiplier; + public final TuningModifier chainFocusingChanceMultiplier; + public final TuningModifier damageAbsorptionChanceMultiplier; + public final TuningModifier restorationChanceMultiplier; + + public CrucibleTuning(ICatalyzerAccelerationTarget target) { + this.buffedStat = target.getTuningType(); + this.processingSpeedMultiplier = new TuningModifier(CrucibleTuningType.PROCESSING_SPEED, target); + this.fuelUsageRate = new InverseTuningModifier(CrucibleTuningType.FUEL_USAGE_RATE, target); + this.damageChanceMultiplier = new InverseTuningModifier(CrucibleTuningType.INSTABILITY, target); + this.bonusYieldChanceMultiplier = new TuningModifier(CrucibleTuningType.FORTUNE_CHANCE, target); + this.chainFocusingChanceMultiplier = new TuningModifier(CrucibleTuningType.CHAIN_FOCUSING_CHANCE, target); + this.damageAbsorptionChanceMultiplier = new TuningModifier(CrucibleTuningType.SHIELDING_CHANCE, target); + this.restorationChanceMultiplier = new TuningModifier(CrucibleTuningType.RESTORATION_CHANCE, target); } public enum CrucibleTuningType { NONE(null, null), PROCESSING_SPEED(d -> d.processingSpeed), FUEL_USAGE_RATE(d -> d.fuelUsageRate), - INSTABILITY(d -> d.damageChance > 0, d -> String.format("%.2f", d.getAccelerationData().damageChance - d.getWexingEngineInfluence() * 0.15f)), + INSTABILITY(d -> d.damageChance), FORTUNE_CHANCE(d -> d.bonusYieldChance), CHAIN_FOCUSING_CHANCE(d -> d.chainFocusingChance), SHIELDING_CHANCE(d -> d.damageAbsorptionChance), RESTORATION_CHANCE(d -> d.restorationChance); public final Predicate isValueValid; - public final Function statDisplayFunction; + public final Function statDisplayFunction; - CrucibleTuningType(Predicate isValueValid, Function statDisplayFunction) { + CrucibleTuningType(Function valueGetter) { + this(d -> valueGetter.apply(d).getValue(d) > 0, d -> String.format("%.2f", valueGetter.apply(d).getValue(d))); + } + CrucibleTuningType(Predicate isValueValid, Function statDisplayFunction) { this.isValueValid = isValueValid; this.statDisplayFunction = statDisplayFunction; } - CrucibleTuningType(Function valueGetter) { - this(d -> valueGetter.apply(d) > 0, d -> String.format("%.2f", valueGetter.apply(d.getAccelerationData()))); - } public static List getValidValues(CrucibleAccelerationData data) { List validValues = new ArrayList<>(); @@ -71,76 +73,83 @@ public String translation() { } } - public enum AppliedTuning { - BUFF(TunedValue::getPositiveMultiplier), - DEBUFF(TunedValue::getNegativeMultiplier), - NONE(TunedValue::getBaseValue); + public enum AppliedTuningType { + BUFF(TuningModifier::getPositiveMultiplier), + DEBUFF(TuningModifier::getNegativeMultiplier), + NONE(TuningModifier::getDefaultMultiplier); - public final Function multiplierGetter; + public final Function multiplierGetter; - AppliedTuning(Function multiplierGetter) { + AppliedTuningType(Function multiplierGetter) { this.multiplierGetter = multiplierGetter; } } - public static class TunedValue { + public static class TuningModifier { public final CrucibleTuningType tuningType; - public final AppliedTuning appliedTuning; + public final AppliedTuningType appliedTuningType; - public TunedValue(CrucibleTuningType tuningType, AppliedTuning appliedTuning) { + public TuningModifier(CrucibleTuningType tuningType, AppliedTuningType appliedTuningType) { this.tuningType = tuningType; - this.appliedTuning = appliedTuning; + this.appliedTuningType = appliedTuningType; } - public TunedValue(CrucibleTuningType tuningType, CrucibleTuningType buffedStat) { + public TuningModifier(CrucibleTuningType tuningType, ICatalyzerAccelerationTarget target) { this.tuningType = tuningType; - this.appliedTuning = buffedStat.equals(CrucibleTuningType.NONE) ? AppliedTuning.NONE : tuningType.equals(buffedStat) ? AppliedTuning.BUFF : AppliedTuning.DEBUFF; + this.appliedTuningType = target.getTuningType().equals(CrucibleTuningType.NONE) ? AppliedTuningType.NONE : tuningType.equals(target.getTuningType()) ? AppliedTuningType.BUFF : AppliedTuningType.DEBUFF; + } + + public CrucibleAccelerationData.TunedValue createTunedValue(float value) { + return new CrucibleAccelerationData.TunedValue(this, value); } public float getMultiplier() { - switch (appliedTuning) { - case NONE -> { - return getBaseValue(); - } - case BUFF -> { - return getPositiveMultiplier(); - } - case DEBUFF -> { - return getNegativeMultiplier(); - } - default -> throw new NullPointerException("Tuned Value Tuning Type is somehow null."); + float value = getDefaultMultiplier(); + switch (appliedTuningType) { + case BUFF -> value = getPositiveMultiplier(); + case DEBUFF -> value = getNegativeMultiplier(); } + return value; + } + + protected float getMultiplierScalar(float attributeMultiplier) { + return 1+attributeMultiplier; } - protected float getBaseValue() { + private float getDefaultMultiplier() { return 1f; } - protected float getPositiveMultiplier() { + float getPositiveMultiplier() { return 1.2f; } - protected float getNegativeMultiplier() { + float getNegativeMultiplier() { return 0.9f; } } - public static class InverseTunedValue extends TunedValue { - public InverseTunedValue(CrucibleTuningType tuningType, AppliedTuning appliedTuning) { - super(tuningType, appliedTuning); + public static class InverseTuningModifier extends TuningModifier { + public InverseTuningModifier(CrucibleTuningType tuningType, AppliedTuningType appliedTuningType) { + super(tuningType, appliedTuningType); } - public InverseTunedValue(CrucibleTuningType tuningType, CrucibleTuningType buffedStat) { - super(tuningType, buffedStat); + public InverseTuningModifier(CrucibleTuningType tuningType, ICatalyzerAccelerationTarget target) { + super(tuningType, target); + } + + @Override + protected float getMultiplierScalar(float attributeMultiplier) { + return 1-attributeMultiplier; } @Override - protected float getPositiveMultiplier() { + float getPositiveMultiplier() { return 0.8f; } @Override - protected float getNegativeMultiplier() { + float getNegativeMultiplier() { return 1.1f; } } diff --git a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/SpiritCrucibleCoreBlockEntity.java b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/SpiritCrucibleCoreBlockEntity.java index a6cfa277c..d45ae0491 100644 --- a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/SpiritCrucibleCoreBlockEntity.java +++ b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/SpiritCrucibleCoreBlockEntity.java @@ -245,7 +245,7 @@ public void tick() { } } } - float speed = acceleratorData.processingSpeed; + float speed = acceleratorData.processingSpeed.getValue(acceleratorData); if (level instanceof ServerLevel) { if (recipe != null) { boolean needsRecalibration = !acceleratorData.accelerators.stream().allMatch(ICrucibleAccelerator::canContinueAccelerating); @@ -273,17 +273,18 @@ public void craft() { ItemStack outputStack = recipe.output.copy(); Vec3 itemPos = getItemPos(); final RandomSource random = level.random; - float bonusYieldChance = acceleratorData.bonusYieldChance; - float instantCompletionChance = acceleratorData.chainFocusingChance; - float completeDamageNegationChance = acceleratorData.damageAbsorptionChance; - float restorationChance = acceleratorData.restorationChance; + float processingSpeed = acceleratorData.processingSpeed.getValue(acceleratorData); + float damageChance = acceleratorData.damageChance.getValue(acceleratorData); + float bonusYieldChance = acceleratorData.bonusYieldChance.getValue(acceleratorData); + float instantCompletionChance = acceleratorData.chainFocusingChance.getValue(acceleratorData); + float completeDamageNegationChance = acceleratorData.damageAbsorptionChance.getValue(acceleratorData); + float restorationChance = acceleratorData.restorationChance.getValue(acceleratorData); if (random.nextFloat() < restorationChance) { stack.setDamageValue(Math.max(stack.getDamageValue()-recipe.durabilityCost*2, 0)); } if (completeDamageNegationChance == 0 || random.nextFloat() < completeDamageNegationChance) { if (recipe.durabilityCost != 0 && stack.isDamageableItem()) { int durabilityCost = recipe.durabilityCost; - float damageChance = acceleratorData.damageChance - wexingEngineInfluence * 0.15f; if (damageChance > 0 && random.nextFloat() < damageChance) { durabilityCost *= 2; } @@ -314,11 +315,11 @@ public void craft() { level.addFreshEntity(new ItemEntity(level, itemPos.x, itemPos.y, itemPos.z, outputStack.copy())); } final boolean instantCompletion = instantCompletionChance > 0 && random.nextFloat() < instantCompletionChance; - progress = instantCompletion ? recipe.time - 10 * acceleratorData.processingSpeed : 0; + progress = instantCompletion ? recipe.time - 10 * processingSpeed : 0; if (instantCompletion) { level.playSound(null, worldPosition, SoundRegistry.WARPING_ENGINE_REVERBERATES.get(), SoundSource.BLOCKS, 1.5f, 1f + random.nextFloat() * 0.25f); } - wexingEngineInfluence = instantCompletion ? wexingEngineInfluence + 1 : 0; + acceleratorData.globalAttributeModifier = instantCompletion ? acceleratorData.globalAttributeModifier + 0.2f : 0; recipe = SpiritFocusingRecipe.getRecipe(level, stack, spiritInventory.nonEmptyItemStacks); level.playSound(null, worldPosition, SoundRegistry.CRUCIBLE_CRAFT.get(), SoundSource.BLOCKS, 1, 0.75f + random.nextFloat() * 0.5f); BlockHelper.updateAndNotifyState(level, worldPosition); diff --git a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/catalyzer/SpiritCatalyzerCoreBlockEntity.java b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/catalyzer/SpiritCatalyzerCoreBlockEntity.java index 65f21bd0d..3e5d414dd 100644 --- a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/catalyzer/SpiritCatalyzerCoreBlockEntity.java +++ b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/catalyzer/SpiritCatalyzerCoreBlockEntity.java @@ -130,7 +130,8 @@ public void onBreak(@Nullable Player player) { public void tick() { if (target != null && target.canBeAccelerated()) { if (burnTicks > 0) { - float ratio = target.getAccelerationData().fuelUsageRate; + CrucibleAccelerationData data = target.getAccelerationData(); + float ratio = data.fuelUsageRate.getValue(data); if (ratio > 0) { burnTicks -= ratio; } diff --git a/src/main/java/com/sammy/malum/common/item/catalyzer_augment/WarpingEngineItem.java b/src/main/java/com/sammy/malum/common/item/catalyzer_augment/WarpingEngineItem.java index 412678345..3031a2e6f 100644 --- a/src/main/java/com/sammy/malum/common/item/catalyzer_augment/WarpingEngineItem.java +++ b/src/main/java/com/sammy/malum/common/item/catalyzer_augment/WarpingEngineItem.java @@ -9,7 +9,7 @@ public WarpingEngineItem(Properties pProperties) { @Override public float getInstantCompletionChance() { - return 0.07f; + return 0.06f; } @Override diff --git a/src/main/java/com/sammy/malum/data/MalumLang.java b/src/main/java/com/sammy/malum/data/MalumLang.java index 47c2d9a9f..7f10ad0bc 100644 --- a/src/main/java/com/sammy/malum/data/MalumLang.java +++ b/src/main/java/com/sammy/malum/data/MalumLang.java @@ -377,7 +377,7 @@ protected void addTranslations() { addSimpleEntryHeader("warping_engine", "Warping Engine", "Unstable contraption"); addPages("warping_engine", "I have created something cursed. This machine named the Warping Engine is a rather hard to explain piece of engineering, but in short, each time the crucible finishes a focusing cycle the engine has a chance to nearly instantly bring about the completion of the next cycle.", - "This strange effect takes quite a toll on the stability and fuel requirements of the focusing process, however, it appears that repeatedly chained activations of the Warping Engine " + italic("drastically") + " improve stability."); + "Furthermore, chained activations of the warping engine provide a stacking benefit to " + italic("all") + "other attributes. Unfortunately, this complex behavior takes quite a toll on the stability and fuel requirements of the focusing process."); addSimpleEntryHeader("prismatic_focus_lens", "Prismatic Focus Lens", "Stabilising"); addPages("prismatic_focus_lens", diff --git a/src/main/java/com/sammy/malum/registry/common/item/ItemRegistry.java b/src/main/java/com/sammy/malum/registry/common/item/ItemRegistry.java index e61e11a79..afbddbec5 100644 --- a/src/main/java/com/sammy/malum/registry/common/item/ItemRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/item/ItemRegistry.java @@ -445,41 +445,41 @@ public static RegistryObject register(String name, Item.Prop public static final RegistryObject TUNING_FORK = register("tuning_fork", GEAR_PROPERTIES(), Item::new); public static final RegistryObject CRACKED_IRON_IMPETUS = register("cracked_iron_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject IRON_IMPETUS = register("iron_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_IRON_IMPETUS)); + public static final RegistryObject IRON_IMPETUS = register("iron_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_IRON_IMPETUS)); public static final RegistryObject IRON_NODE = register("iron_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_COPPER_IMPETUS = register("cracked_copper_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject COPPER_IMPETUS = register("copper_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_COPPER_IMPETUS)); + public static final RegistryObject COPPER_IMPETUS = register("copper_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_COPPER_IMPETUS)); public static final RegistryObject COPPER_NODE = register("copper_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_GOLD_IMPETUS = register("cracked_gold_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject GOLD_IMPETUS = register("gold_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_GOLD_IMPETUS)); + public static final RegistryObject GOLD_IMPETUS = register("gold_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_GOLD_IMPETUS)); public static final RegistryObject GOLD_NODE = register("gold_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_LEAD_IMPETUS = register("cracked_lead_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject LEAD_IMPETUS = register("lead_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_LEAD_IMPETUS)); + public static final RegistryObject LEAD_IMPETUS = register("lead_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_LEAD_IMPETUS)); public static final RegistryObject LEAD_NODE = register("lead_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_SILVER_IMPETUS = register("cracked_silver_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject SILVER_IMPETUS = register("silver_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_SILVER_IMPETUS)); + public static final RegistryObject SILVER_IMPETUS = register("silver_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_SILVER_IMPETUS)); public static final RegistryObject SILVER_NODE = register("silver_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_ALUMINUM_IMPETUS = register("cracked_aluminum_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject ALUMINUM_IMPETUS = register("aluminum_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_ALUMINUM_IMPETUS)); + public static final RegistryObject ALUMINUM_IMPETUS = register("aluminum_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_ALUMINUM_IMPETUS)); public static final RegistryObject ALUMINUM_NODE = register("aluminum_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_NICKEL_IMPETUS = register("cracked_nickel_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject NICKEL_IMPETUS = register("nickel_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_NICKEL_IMPETUS)); + public static final RegistryObject NICKEL_IMPETUS = register("nickel_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_NICKEL_IMPETUS)); public static final RegistryObject NICKEL_NODE = register("nickel_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_URANIUM_IMPETUS = register("cracked_uranium_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject URANIUM_IMPETUS = register("uranium_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_URANIUM_IMPETUS)); + public static final RegistryObject URANIUM_IMPETUS = register("uranium_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_URANIUM_IMPETUS)); public static final RegistryObject URANIUM_NODE = register("uranium_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_OSMIUM_IMPETUS = register("cracked_osmium_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject OSMIUM_IMPETUS = register("osmium_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_OSMIUM_IMPETUS)); + public static final RegistryObject OSMIUM_IMPETUS = register("osmium_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_OSMIUM_IMPETUS)); public static final RegistryObject OSMIUM_NODE = register("osmium_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_ZINC_IMPETUS = register("cracked_zinc_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject ZINC_IMPETUS = register("zinc_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_ZINC_IMPETUS)); + public static final RegistryObject ZINC_IMPETUS = register("zinc_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_ZINC_IMPETUS)); public static final RegistryObject ZINC_NODE = register("zinc_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_TIN_IMPETUS = register("cracked_tin_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject TIN_IMPETUS = register("tin_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_TIN_IMPETUS)); + public static final RegistryObject TIN_IMPETUS = register("tin_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_TIN_IMPETUS)); public static final RegistryObject TIN_NODE = register("tin_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); public static final RegistryObject CRACKED_ALCHEMICAL_IMPETUS = register("cracked_alchemical_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); - public static final RegistryObject ALCHEMICAL_IMPETUS = register("alchemical_impetus", METALLURGIC_PROPERTIES().durability(100), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_ALCHEMICAL_IMPETUS)); + public static final RegistryObject ALCHEMICAL_IMPETUS = register("alchemical_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_ALCHEMICAL_IMPETUS)); //endregion //region ether