Skip to content

Commit

Permalink
nuked hacky tooltip handler
Browse files Browse the repository at this point in the history
  • Loading branch information
MehVahdJukaar committed Aug 6, 2024
1 parent 2547e6c commit 768f8fd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@

import org.jetbrains.annotations.NotNull;

import org.jetbrains.annotations.Nullable;
import org.violetmoon.quark.addons.oddities.inventory.BackpackMenu;
import org.violetmoon.quark.addons.oddities.module.BackpackModule;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.handler.ProxiedItemStackHandler;
import org.violetmoon.zeta.item.IZetaItem;
import org.violetmoon.zeta.item.ZetaItem;
import org.violetmoon.zeta.item.ext.IZetaItemExtensions;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.CreativeTabManager;
Expand All @@ -48,20 +50,21 @@ public class BackpackItem extends DyeableArmorItem implements IZetaItem, IZetaIt
private static final String WORN_TEXTURE = Quark.MOD_ID + ":textures/misc/backpack_worn.png";
private static final String WORN_OVERLAY_TEXTURE = Quark.MOD_ID + ":textures/misc/backpack_worn_overlay.png";

@Nullable
private final ZetaModule module;

public BackpackItem(ZetaModule module) {
public BackpackItem(@Nullable ZetaModule module) {
super(ArmorMaterials.LEATHER, Type.CHESTPLATE,
new Item.Properties()
.stacksTo(1)
.durability(0)
.rarity(Rarity.RARE));

this.module = module;
module.zeta.registry.registerItem(this, "backpack");

if(module.category.isAddon())
module.zeta.requiredModTooltipHandler.map(this, module.category.requiredMod);
if (module == null)return;

module.zeta.registry.registerItem(this, "backpack");

CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.TOOLS_AND_UTILITIES, this, Items.SADDLE, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ public QuarkVerticalSlabBlock(Block parent, ZetaModule module) {

this.module = module;

if(module.category.isAddon())
module.zeta.requiredModTooltipHandler.map(this, module.category.requiredMod);

if(!(parent instanceof SlabBlock))
throw new IllegalArgumentException("Can't rotate a non-slab block into a vertical slab.");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ public WaterPetalBlock(Item base, String regname, @Nullable ZetaModule module, P
return;

module.zeta.registry.registerBlock(this, regname, false);
if(module.category.isAddon())
module.zeta.requiredModTooltipHandler.map(this, module.category.requiredMod);


module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT);
}

Expand Down
1 change: 0 additions & 1 deletion src/main/resources/assets/quark/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@
"quark.misc.bad_saturation3": "Questionable Rations",
"quark.misc.bad_saturation4": "Disgusting Snack",
"quark.misc.bad_saturation5": "Dangerously Tantalizing",
"quark.misc.mod_disabled": "Disabled. Install %s to enable.",
"quark.misc.repaired": "(Was Repaired)",
"quark.misc.celebration": "Celebrating 10 Years of Vazkii's Mods (2021)",
"quark.misc.enchantment_with_actual_level": "%s (%s)",
Expand Down

0 comments on commit 768f8fd

Please sign in to comment.