can i have uhhhhhh labels

This commit is contained in:
Boblet 2026-03-16 16:39:07 +01:00
parent 59d5db4f66
commit 25271de81c
3 changed files with 32 additions and 7 deletions

View File

@ -1,6 +1,8 @@
## Changed
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
* Hoppers and buckets can now be made out of steel
* RoR gauges now show the lowest and highest configured value on the actual gauge
## Fixed
* Fixed size 15 dual kerosene thruster not rendering at all
* Fixed size 15 dual kerosene thruster not rendering at all
* Fixed HUD/jetpack toggle popup not working at all on multiplayer servers

View File

@ -5,12 +5,15 @@ import com.hbm.handler.ArmorModHandler;
import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.items.armor.ItemModShield;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.PlayerInformPacket;
import com.hbm.tileentity.IGUIProvider;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
@ -86,9 +89,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
this.enableBackpack = !this.enableBackpack;
if(this.enableBackpack)
MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "Jetpack ON", MainRegistry.proxy.ID_JETPACK);
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "Jetpack ON", MainRegistry.proxy.ID_JETPACK, 1000), (EntityPlayerMP) player);
else
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Jetpack OFF", MainRegistry.proxy.ID_JETPACK);
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.RED + "Jetpack OFF", MainRegistry.proxy.ID_JETPACK, 1000), (EntityPlayerMP) player);
}
}
if (key == EnumKeybind.TOGGLE_MAGNET){
@ -96,9 +99,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
this.enableMagnet = !this.enableMagnet;
if(this.enableMagnet)
MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "Magnet ON", MainRegistry.proxy.ID_MAGNET);
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "Magnet ON", MainRegistry.proxy.ID_MAGNET, 1000), (EntityPlayerMP) player);
else
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Magnet OFF", MainRegistry.proxy.ID_MAGNET);
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "Magnet ON", MainRegistry.proxy.ID_MAGNET, 1000), (EntityPlayerMP) player);
}
}
if(key == EnumKeybind.TOGGLE_HEAD) {
@ -107,9 +110,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
this.enableHUD = !this.enableHUD;
if(this.enableHUD)
MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD);
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD, 1000), (EntityPlayerMP) player);
else
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "HUD OFF", MainRegistry.proxy.ID_HUD);
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD, 1000), (EntityPlayerMP) player);
}
}

View File

@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge.GaugeUnit;
import com.hbm.util.BobMathUtil;
import com.hbm.util.ColorUtil;
import net.minecraft.client.Minecraft;
@ -71,6 +72,25 @@ public class RenderRBMKGauge extends TileEntitySpecialRenderer {
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
int height = font.FONT_HEIGHT;
double lineScale = 0.0025D;
String lineLower = unit.min <= 10_000 ? unit.min + "" : BobMathUtil.getShortNumber(unit.min);
String lineUpper = unit.max <= 10_000 ? unit.max + "" : BobMathUtil.getShortNumber(unit.max);
for(int j = 0; j < 2; j++) {
GL11.glPushMatrix();
GL11.glTranslated(0, 0.4375, -0.125);
GL11.glRotated(10 + j * 50, -1, 0, 0);
GL11.glTranslated(0, -0.4375, 0.125);
GL11.glTranslated(0.032, 0.4375, 0.125);
GL11.glScaled(lineScale, -lineScale, lineScale);
GL11.glNormal3f(0.0F, 0.0F, -1.0F);
GL11.glRotatef(90, 0, 1, 0);
font.drawString(j == 0 ? lineLower : lineUpper, 0, -height / 2, 0x000000);
GL11.glPopMatrix();
}
if(unit.label != null && !unit.label.isEmpty()) {
GL11.glTranslated(0.01, 0.3125, 0);