added support for reaping jewels
This commit is contained in:
parent
0b3b86b911
commit
5d49c055d1
4 changed files with 87 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
# devel
|
||||
|
||||
*
|
||||
* Added support for Reaping Jewels (you still cannot obtain those without commands or config changes!).
|
||||
|
||||
# 3.10.1.5 (2023-06-27)
|
||||
|
||||
|
|
25
README.md
25
README.md
|
@ -8,20 +8,21 @@ If you do not disable the changes that affect expertises, I recommend a full exp
|
|||
|
||||
## Fixes
|
||||
|
||||
* Removed the “Andersite” “joke”
|
||||
* ~~Removed call to a colour handling event that is called several thousand times per second; gives a noticeable performance boost, but turns jewels and unidentified items white~~ use <https://github.com/radimous/FastVaultGear>
|
||||
* Fake players work with research again (e.g. Routers + Botany Pots, AE2 auto crafting)
|
||||
* Fake players can put Vault Rocks on the Altar again
|
||||
* Relic fragments \#5 are now equally as likely to drop as the others
|
||||
* AE2 auto crafting no longer requires manually giving its fake player all research
|
||||
* Altar Conduit now draws the correct amount of power when connected to AE2
|
||||
* Removed the “Andersite” “joke”.
|
||||
* ~~Removed call to a colour handling event that is called several thousand times per second; gives a noticeable performance boost, but turns jewels and unidentified items white~~ use <https://github.com/radimous/FastVaultGear>.
|
||||
* Fake players work with research again (e.g. Routers + Botany Pots, AE2 auto crafting).
|
||||
* Fake players can put Vault Rocks on the Altar again.
|
||||
* Relic fragments \#5 are now equally as likely to drop as the others.
|
||||
* AE2 auto crafting no longer requires manually giving its fake player all research.
|
||||
* Altar Conduit now draws the correct amount of power when connected to AE2.
|
||||
|
||||
## Changes
|
||||
|
||||
* Removed Emerald cost from Vault Enchanter.
|
||||
* Vault Enchanters offer Fortune 5, Fortunate expertise removed
|
||||
* Jewel cutting has a base 25% chance of failure, Jeweler expertise removed
|
||||
* Budding Crystal (Sky Vaults only) growth time reduced
|
||||
* Altar infusion time (time between redstone signal and the crystal popping off) reduced
|
||||
* Vault Enchanters offer Fortune 5, Fortunate expertise removed.
|
||||
* Jewel cutting has a base 25% chance of failure, Jeweler expertise removed.
|
||||
* Budding Crystal (Sky Vaults only) growth time reduced.
|
||||
* Altar infusion time (time between redstone signal and the crystal popping off) reduced.
|
||||
* Vault Junk Upgrades (Junk Management) tier 1 and 2 buffed
|
||||
* Jewel cutting buffed from 1–10 size reduction to 3–10
|
||||
* Jewel cutting buffed from 1–10 size reduction to 3–10.
|
||||
* Added support for Reaping jewels (you still cannot obtain those without commands or config changes!).
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
/**
|
||||
* Copyright 2023 alterNERDtive.
|
||||
*
|
||||
* This file is part of Vault Mod Tweaks.
|
||||
*
|
||||
* Vault Mod Tweaks is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Vault Mod Tweaks is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Vault Mod Tweaks. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package tv.alterNERD.VaultModTweaks.integration.mixin;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
|
||||
import iskallia.vault.gear.data.VaultGearData;
|
||||
import iskallia.vault.item.tool.ToolType;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
@Mixin(ToolType.class)
|
||||
public abstract class MixinToolType {
|
||||
/**
|
||||
* Accessor mixin for the
|
||||
* {@link iskallia.vault.item.tool.ToolType.PACKED_TO_TYPE} variable.
|
||||
*
|
||||
* @return nothing; this should never be actually called
|
||||
*/
|
||||
@Accessor
|
||||
static Map<Integer, ToolType> getPACKED_TO_TYPE() {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes sure that items with both hammering _and_ reaping are given a
|
||||
* model.
|
||||
*
|
||||
* Sadly there is no way to inject new values into the
|
||||
* {@link iskallia.vault.item.tool.ToolType} Enum, so they will render as
|
||||
* if they did not have reaping.
|
||||
*
|
||||
* @param stack the item in question
|
||||
* @param ci CallBackInfo
|
||||
* @param data local variable
|
||||
* @param packed local variable
|
||||
*/
|
||||
@Inject(
|
||||
method = "of",
|
||||
at = @At("RETURN"),
|
||||
cancellable = true,
|
||||
locals = LocalCapture.CAPTURE_FAILHARD,
|
||||
remap = false
|
||||
)
|
||||
private static void of$return(ItemStack stack, CallbackInfoReturnable<ToolType> ci, VaultGearData data, int packed) {
|
||||
// hammering: 8, reaping: 16
|
||||
if ((packed & 24) == 24) {
|
||||
ci.setReturnValue(getPACKED_TO_TYPE().get(packed - 16));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,6 +11,7 @@
|
|||
"MixinExpertisesGuiConfig",
|
||||
"MixinPlayerResearchesData",
|
||||
"MixinStageManager",
|
||||
"MixinToolType",
|
||||
"MixinUnidentifiedRelicFragmentsConfig",
|
||||
"MixinVaultAltarBlock",
|
||||
"MixinVaultAltarConfig",
|
||||
|
|
Loading…
Reference in a new issue