Remove stack hud its annoying, and I have better ideas

This commit is contained in:
modmuss50 2020-07-25 00:01:15 +01:00
parent 0106b00add
commit ec7935570f
2 changed files with 0 additions and 22 deletions

View file

@ -47,7 +47,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.hud.StackInfoHUD;
import reborncore.client.multiblock.MultiblockRenderer;
import reborncore.common.util.ItemUtils;
import reborncore.mixin.client.AccessorModelPredicateProviderRegistry;
@ -142,8 +141,6 @@ public class TechRebornClient implements ClientModInitializer {
GuiBase.wrenchStack = new ItemStack(TRContent.WRENCH);
GuiBase.fluidCellProvider = DynamicCellItem::getCellWithFluid;
StackInfoHUD.registerElement(new FrequencyTransmitterItem.StackInfoFreqTransmitter());
Arrays.stream(TRContent.Cables.values()).forEach(cable -> BlockRenderLayerMap.INSTANCE.putBlock(cable.block, RenderLayer.getCutout()));
BlockRenderLayerMap.INSTANCE.putBlock(TRContent.Machine.LAMP_INCANDESCENT.block, RenderLayer.getCutout());

View file

@ -40,7 +40,6 @@ import net.minecraft.util.dynamic.GlobalPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.World;
import reborncore.client.hud.StackInfoElement;
import reborncore.common.chunkloading.ChunkLoaderManager;
import reborncore.common.util.ChatUtils;
import techreborn.TechReborn;
@ -131,22 +130,4 @@ public class FrequencyTransmitterItem extends Item {
private static Identifier getDimName(RegistryKey<World> dimensionRegistryKey){
return dimensionRegistryKey.getValue();
}
public static class StackInfoFreqTransmitter extends StackInfoElement {
public StackInfoFreqTransmitter() {
super(TRContent.FREQUENCY_TRANSMITTER);
}
@Override
public Text getText(ItemStack stack) {
Formatting gold = Formatting.GOLD;
Formatting grey = Formatting.GRAY;
if (!(stack.getItem() instanceof FrequencyTransmitterItem)) {
return LiteralText.EMPTY;
}
return getPos(stack)
.map((Function<GlobalPos, Text>) globalPos -> new LiteralText(grey + "X: " + gold + globalPos.getPos().getX() + grey + " Y: " + gold + globalPos.getPos().getY() + grey + " Z: " + gold + globalPos.getPos().getZ() + grey + " Dim: " + gold + getDimName(globalPos.getDimension()).toString()))
.orElse(new TranslatableText("techreborn.message.noCoordsSet").formatted(Formatting.GRAY));
}
}
}