mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-24 10:54:33 +00:00
can i have uhhhhhh labels
This commit is contained in:
parent
59d5db4f66
commit
25271de81c
@ -1,6 +1,8 @@
|
|||||||
## Changed
|
## Changed
|
||||||
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
|
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
|
||||||
* Hoppers and buckets can now be made out of steel
|
* 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
|
||||||
* 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
|
||||||
@ -5,12 +5,15 @@ import com.hbm.handler.ArmorModHandler;
|
|||||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||||
import com.hbm.items.armor.ItemModShield;
|
import com.hbm.items.armor.ItemModShield;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
import com.hbm.packet.toclient.PlayerInformPacket;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
@ -86,9 +89,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
|||||||
this.enableBackpack = !this.enableBackpack;
|
this.enableBackpack = !this.enableBackpack;
|
||||||
|
|
||||||
if(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
|
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){
|
if (key == EnumKeybind.TOGGLE_MAGNET){
|
||||||
@ -96,9 +99,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
|||||||
this.enableMagnet = !this.enableMagnet;
|
this.enableMagnet = !this.enableMagnet;
|
||||||
|
|
||||||
if(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
|
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) {
|
if(key == EnumKeybind.TOGGLE_HEAD) {
|
||||||
@ -107,9 +110,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
|||||||
this.enableHUD = !this.enableHUD;
|
this.enableHUD = !this.enableHUD;
|
||||||
|
|
||||||
if(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
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
|
|||||||
import com.hbm.main.ResourceManager;
|
import com.hbm.main.ResourceManager;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge.GaugeUnit;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge.GaugeUnit;
|
||||||
|
import com.hbm.util.BobMathUtil;
|
||||||
import com.hbm.util.ColorUtil;
|
import com.hbm.util.ColorUtil;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@ -71,6 +72,25 @@ public class RenderRBMKGauge extends TileEntitySpecialRenderer {
|
|||||||
|
|
||||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||||
int height = font.FONT_HEIGHT;
|
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()) {
|
if(unit.label != null && !unit.label.isEmpty()) {
|
||||||
|
|
||||||
GL11.glTranslated(0.01, 0.3125, 0);
|
GL11.glTranslated(0.01, 0.3125, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user