Skip to content

Commit

Permalink
feat!: deprecate GemVillagers, TreasureGems, and MoreMobHeads
Browse files Browse the repository at this point in the history
GemVillagers and TreasureGems are gone from VanillaTweaks so there's nothing
to update them from anymore.

MoreMobHeads is getting too unwieldy to implement as a plugin and using the
datapack isn't a performance hit because it is just loot tables.
  • Loading branch information
Machine-Maker committed Aug 14, 2024
1 parent a00cfbc commit 6963c16
Show file tree
Hide file tree
Showing 15 changed files with 358 additions and 772 deletions.
84 changes: 0 additions & 84 deletions scripts/gem_villagers.py

This file was deleted.

110 changes: 0 additions & 110 deletions scripts/more_mob_heads.py

This file was deleted.

87 changes: 0 additions & 87 deletions scripts/treasure_gems.py

This file was deleted.

9 changes: 4 additions & 5 deletions scripts/wandering_trades.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ def run():
sell_tag: Compound = nbt["sell"]
heads.append({
"maxUses": int(nbt["maxUses"]),
"secondaryCost": str(nbt["buyB"]["id"]),
"headCount": int(sell_tag["Count"]),
"name": str(sell_tag["tag"]["display"]["Name"]),
"uuid": str(array_to_uuid(sell_tag["tag"]["SkullOwner"]["Id"])),
"texture": sell_tag["tag"]["SkullOwner"]["Properties"]["textures"][0]["Value"]
"secondaryCost": str(nbt["buyB"]["id"]) if "buyB" in nbt else None,
"headCount": int(sell_tag["count"]),
"name": str(sell_tag["components"]["minecraft:item_name"]),
"texture": sell_tag["components"]["minecraft:profile"]["properties"][0]["value"]
})
with open("../src/main/resources/data/wandering_trades.json", "w") as out:
out.write(dumps(heads, ensure_ascii=False, indent=2) + "\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
Expand Down Expand Up @@ -59,7 +58,7 @@ public class GemVillagers extends ModuleBase {

@Override
protected Class<? extends ModuleLifecycle> lifecycle() {
return ModuleLifecycle.Empty.class;
return Lifecycle.class;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package me.machinemaker.papertweaks.modules.hermitcraft.gemvillagers;

import jakarta.inject.Inject;
import java.util.Set;
import me.machinemaker.papertweaks.modules.ModuleCommand;
import me.machinemaker.papertweaks.modules.ModuleConfig;
import me.machinemaker.papertweaks.modules.ModuleLifecycle;
import me.machinemaker.papertweaks.modules.ModuleListener;
import me.machinemaker.papertweaks.modules.ModuleRecipe;
import org.bukkit.plugin.java.JavaPlugin;

class Lifecycle extends ModuleLifecycle {

@Inject
protected Lifecycle(final JavaPlugin plugin, final Set<ModuleCommand> commands, final Set<ModuleListener> listeners, final Set<ModuleConfig> configs, final Set<ModuleRecipe<?>> moduleRecipes) {
super(plugin, commands, listeners, configs, moduleRecipes);
}

@Override
public void onEnable() {
GemVillagers.LOGGER.error("Please disable GemVillagers. GemVillagers is deprecated and won't be updated or supported in 1.21+. It may be removed in future versions.");
super.onEnable();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package me.machinemaker.papertweaks.modules.hermitcraft.treasuregems;

import jakarta.inject.Inject;
import java.util.Set;
import me.machinemaker.papertweaks.modules.ModuleCommand;
import me.machinemaker.papertweaks.modules.ModuleConfig;
import me.machinemaker.papertweaks.modules.ModuleLifecycle;
import me.machinemaker.papertweaks.modules.ModuleListener;
import me.machinemaker.papertweaks.modules.ModuleRecipe;
import org.bukkit.plugin.java.JavaPlugin;

class Lifecycle extends ModuleLifecycle {

@Inject
protected Lifecycle(final JavaPlugin plugin, final Set<ModuleCommand> commands, final Set<ModuleListener> listeners, final Set<ModuleConfig> configs, final Set<ModuleRecipe<?>> moduleRecipes) {
super(plugin, commands, listeners, configs, moduleRecipes);
}

@Override
public void onEnable() {
TreasureGems.LOGGER.error("Please disable TreasureGems. TreasureGems is deprecated and won't be updated or supported in 1.21+. It may be removed in future versions.");
super.onEnable();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -81,7 +80,7 @@ public class TreasureGems extends ModuleBase {

@Override
protected Class<? extends ModuleLifecycle> lifecycle() {
return ModuleLifecycle.Empty.class;
return Lifecycle.class;
}

@Override
Expand Down
Loading

0 comments on commit 6963c16

Please sign in to comment.