Skip to content

Commit

Permalink
fix: update waila mobjar integration (#1342)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarva committed Jul 21, 2024
1 parent a1c5e30 commit 1464c3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
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

0 comments on commit 1464c3f

Please sign in to comment.