ae2 auto crafting now working ootb

This commit is contained in:
alterNERDtive 2023-06-19 12:11:48 +02:00
parent 592270813a
commit e51c31c779
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1
4 changed files with 42 additions and 0 deletions

7
CHANGELOG.md Normal file
View file

@ -0,0 +1,7 @@
# devel
* fixed AE2 auto crafting needing NBT editing
# 3.10.1.0
initial release for The Vault 3.10.1

View file

@ -17,6 +17,7 @@ expertise reset after installing this mod.
crafting) crafting)
* Fake players can put Vault Rocks on the Altar again * Fake players can put Vault Rocks on the Altar again
* Relic fragments \#5 are now equally as likely to drop as the others * 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
## Changes ## Changes

View file

@ -0,0 +1,33 @@
package tv.alterNERD.VaultModTweaks.integration.mixin;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import iskallia.vault.init.ModConfigs;
import iskallia.vault.research.ResearchTree;
import iskallia.vault.research.type.Research;
import iskallia.vault.world.data.PlayerResearchesData;
@Mixin(PlayerResearchesData.class)
public class MixinPlayerResearchesData {
@Shadow
private final Map<UUID, ResearchTree> playerMap = new HashMap<UUID, ResearchTree>();
@Overwrite(remap = false)
public ResearchTree getResearches(UUID uuid) {
return this.playerMap.computeIfAbsent(uuid, id -> {
ResearchTree tree = ResearchTree.empty();
if (id.equals(UUID.fromString("41c82c87-7afb-4024-ba57-13d2c99cae77"))) {
for (Research research : ModConfigs.RESEARCHES.getAll()) {
tree.research(research);
}
}
return tree;
});
}
}

View file

@ -8,6 +8,7 @@
"MixinCrystalBuddingConfig", "MixinCrystalBuddingConfig",
"MixinEnchantmentEntry", "MixinEnchantmentEntry",
"MixinExpertisesGuiConfig", "MixinExpertisesGuiConfig",
"MixinPlayerResearchesData",
"MixinStageManager", "MixinStageManager",
"MixinUnidentifiedRelicFragmentsConfig", "MixinUnidentifiedRelicFragmentsConfig",
"MixinVaultAltarBlock", "MixinVaultAltarBlock",