Preserve drink containers and include reviewed Arrakis terrain prevention

This commit is contained in:
unimatrixgit 2026-12-06 14:59:06 +01:00
commit f4f7e34902

View file

@ -26,7 +26,9 @@ class RegionalCookingMerge implements Opcodes {
else if(args[2].endsWith("kaitain.class"))addLivestock(old);
else throw new IllegalArgumentException("Unknown PlanetMobs profile");
}
case TERRAIN+"DuneTerrain$PlanetChunkGenerator" -> copy(old,donor,"placeOasisTree");
case TERRAIN+"DuneTerrain$PlanetChunkGenerator" -> copy(old,donor,
"placeOasisTree","generateNoise","placeSpiceDeposits","placeRandomSpicePatch");
case TERRAIN+"SpiceDepositProvenance" -> copy(old,donor,"capture","populate","hostSand");
default -> throw new IllegalArgumentException("Unexpected target "+old.name);
}
var writer=new ClassWriter(reader,0);
@ -84,7 +86,7 @@ class RegionalCookingMerge implements Opcodes {
for (String name : names) {
var method = unique(donor, name);
var prior = old.methods.stream().filter(m -> m.name.equals(name) && m.desc.equals(method.desc)).findFirst();
if (prior.isEmpty() && !Set.of("hydrationRestoration", "regionalCookbook", "regionalRecipe", "applyRegionalIcon").contains(name)) {
if (prior.isEmpty() && !Set.of("hydrationRestoration", "regionalCookbook", "regionalRecipe", "applyRegionalIcon", "hostSand").contains(name)) {
throw new IllegalArgumentException("Missing retained method " + name);
}
prior.ifPresent(old.methods::remove);