Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update waila mobjar integration #1342

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import snownee.jade.api.*;
import snownee.jade.api.config.IPluginConfig;
import snownee.jade.impl.EntityAccessorImpl;
import snownee.jade.impl.WailaClientRegistration;

public enum MobJarComponent implements IBlockComponentProvider {
INSTANCE;
Expand All @@ -15,14 +16,14 @@ public enum MobJarComponent implements IBlockComponentProvider {
public void appendTooltip(ITooltip tooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) {
BlockEntity be = blockAccessor.getBlockEntity();
if (be instanceof MobJarTile tile) {
new EntityAccessorImpl.Builder()
Accessor.ClientHandler<Accessor<?>> handler = WailaClientRegistration.INSTANCE.getAccessorHandler(EntityAccessor.class);
EntityAccessor accessor = new EntityAccessorImpl.Builder()
.entity(tile.getEntity())
.level(blockAccessor.getLevel())
.serverConnected(blockAccessor.isServerConnected())
.showDetails(blockAccessor.showDetails())
.build();

// ._gatherComponents(($) -> tooltip);
handler.gatherComponents(accessor, ($) -> tooltip);
tooltip.remove(Identifiers.CORE_MOD_NAME);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import com.hollingsworth.arsnouveau.common.block.tile.SkyBlockTile;
import com.hollingsworth.arsnouveau.setup.registry.ModPotions;
import net.minecraft.world.entity.player.Player;
import snownee.jade.api.BlockAccessor;
import snownee.jade.api.IWailaClientRegistration;
import snownee.jade.api.IWailaPlugin;
import snownee.jade.api.WailaPlugin;
import snownee.jade.api.*;

@WailaPlugin
public class WailaArsNouveauPlugin implements IWailaPlugin {
Expand Down