Skip to content

Commit

Permalink
show long function names in popup
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeRNG committed Nov 3, 2023
1 parent 7123dfe commit bd8ac78
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/dev/dfonline/codeclient/dev/ChestPeeker.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import dev.dfonline.codeclient.hypercube.item.Scope;
import dev.dfonline.codeclient.location.Dev;
import net.minecraft.block.Blocks;
import net.minecraft.block.entity.SignBlockEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.nbt.NbtCompound;
Expand Down Expand Up @@ -105,6 +106,12 @@ public static <T extends PacketListener> boolean handlePacket(Packet<T> packet)

public static List<Text> getOverlayText() {
if(!Config.getConfig().ChestPeeker) return null;
if(CodeClient.MC.crosshairTarget instanceof BlockHitResult block) { // TODO: this shouldn't be in ChestPeeker
if(CodeClient.MC.world.getBlockEntity(block.getBlockPos()) instanceof SignBlockEntity sign) {
Text name = sign.getFrontText().getMessage(1,false);
if(CodeClient.MC.textRenderer.getWidth(name) > 90) return List.of(name);
}
}
if (CodeClient.location instanceof Dev && currentBlock != null && items != null) {
ArrayList<Text> texts = new ArrayList<>();
if(items.isEmpty()) {
Expand Down

0 comments on commit bd8ac78

Please sign in to comment.