Class ClientRegistryImpl

java.lang.Object
me.desht.pneumaticcraft.client.ClientRegistryImpl
All Implemented Interfaces:
IClientRegistry

public class ClientRegistryImpl extends Object implements IClientRegistry
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final HashMap<net.minecraft.resources.ResourceLocation,IAssemblyRenderOverriding>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    drawPressureGauge(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.gui.Font fontRenderer, float minPressure, float maxPressure, float dangerPressure, float minWorkingPressure, float currentPressure, int xPos, int yPos)
    Draw a Pressure Gauge in GUI context, the same as in many PneumaticCraft machine GUI's.
    getAnimatedStat(net.minecraft.client.gui.screens.Screen gui, int backgroundColor)
    Creates a GuiAnimatedStat without icon.
    getAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.resources.ResourceLocation iconTexture, int backgroundColor)
    Creates a GuiAnimatedStat which uses a texture location as static icon.
    getAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.world.item.ItemStack iconStack, int backgroundColor)
    Creates a GuiAnimatedStat which uses an itemstack as static icon.
     
    void
    registerRenderOverride(net.minecraftforge.registries.IForgeRegistryEntry<?> entry, IAssemblyRenderOverriding renderOverride)
    Register some custom item rendering behaviour for an item when held in an Assembly machine.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • getInstance

      public static ClientRegistryImpl getInstance()
    • getAnimatedStat

      public IGuiAnimatedStat getAnimatedStat(net.minecraft.client.gui.screens.Screen gui, int backgroundColor)
      Description copied from interface: IClientRegistry
      Creates a GuiAnimatedStat without icon.
      Specified by:
      getAnimatedStat in interface IClientRegistry
      Parameters:
      gui - the owning GUI screen
      backgroundColor - background color for the stat in ARGB format
      Returns:
      a new stat widget
    • getAnimatedStat

      public IGuiAnimatedStat getAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.world.item.ItemStack iconStack, int backgroundColor)
      Description copied from interface: IClientRegistry
      Creates a GuiAnimatedStat which uses an itemstack as static icon.
      Specified by:
      getAnimatedStat in interface IClientRegistry
      Parameters:
      gui - the owning GUI screen
      iconStack - an itemstack to use as the stat widget's icon
      backgroundColor - background color for the stat in ARGB format
      Returns:
      a new stat widget
    • getAnimatedStat

      public IGuiAnimatedStat getAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.resources.ResourceLocation iconTexture, int backgroundColor)
      Description copied from interface: IClientRegistry
      Creates a GuiAnimatedStat which uses a texture location as static icon.
      Specified by:
      getAnimatedStat in interface IClientRegistry
      Parameters:
      gui - the owning GUI screen
      iconTexture - a texture to use as the stat widget's icon
      backgroundColor - background color for the stat in ARGB format
      Returns:
      a new stat widget
    • drawPressureGauge

      public void drawPressureGauge(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.gui.Font fontRenderer, float minPressure, float maxPressure, float dangerPressure, float minWorkingPressure, float currentPressure, int xPos, int yPos)
      Description copied from interface: IClientRegistry
      Draw a Pressure Gauge in GUI context, the same as in many PneumaticCraft machine GUI's.
      Specified by:
      drawPressureGauge in interface IClientRegistry
      Parameters:
      matrixStack - the matrix stack
      fontRenderer - fontrenderer used to draw the numbers of the pressure gauge.
      minPressure - The minimal pressure that needs to be displayed (this is -1 in most applications).
      maxPressure - The maximal pressure that needs to be rendered (see PressureTier for standard pressure thresholds)
      dangerPressure - The transition pressure from green to red (see PressureTier for standard pressure thresholds)
      minWorkingPressure - The transition pressure from yellow to green (varies per machine).
      currentPressure - The pressure that the needle should point to.
      xPos - x position of the gauge.
      yPos - y position of the gauge.
    • registerRenderOverride

      public void registerRenderOverride(@Nonnull net.minecraftforge.registries.IForgeRegistryEntry<?> entry, @Nonnull IAssemblyRenderOverriding renderOverride)
      Description copied from interface: IClientRegistry
      Register some custom item rendering behaviour for an item when held in an Assembly machine.
      Specified by:
      registerRenderOverride in interface IClientRegistry
      Parameters:
      entry - a Forge registry entry, which should be an item
      renderOverride - customized rendering behaviour for that item