ae2 auto crafting now working ootb
This commit is contained in:
parent
592270813a
commit
e51c31c779
4 changed files with 42 additions and 0 deletions
7
CHANGELOG.md
Normal file
7
CHANGELOG.md
Normal 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
|
|
@ -17,6 +17,7 @@ expertise reset after installing this mod.
|
|||
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
|
||||
|
||||
## Changes
|
||||
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
"MixinCrystalBuddingConfig",
|
||||
"MixinEnchantmentEntry",
|
||||
"MixinExpertisesGuiConfig",
|
||||
"MixinPlayerResearchesData",
|
||||
"MixinStageManager",
|
||||
"MixinUnidentifiedRelicFragmentsConfig",
|
||||
"MixinVaultAltarBlock",
|
||||
|
|
Loading…
Reference in a new issue