use of cavern.client.gui.GuiRegeneration in project Cavern2 by kegare.
the class RegenerationGuiMessage method process.
@SideOnly(Side.CLIENT)
@Override
public IMessage process(Minecraft mc) {
EnumType actionType = EnumType.values()[type];
boolean isOpen = mc.currentScreen != null && mc.currentScreen instanceof GuiRegeneration;
if (actionType == EnumType.OPEN) {
if (!isOpen) {
mc.displayGuiScreen(new GuiRegeneration());
}
} else if (isOpen) {
((GuiRegeneration) mc.currentScreen).updateProgress(actionType);
}
return null;
}
use of cavern.client.gui.GuiRegeneration in project Cavern2 by kegare.
the class BlockPortalMirageWorlds method openRegeneration.
@SideOnly(Side.CLIENT)
@Override
public void openRegeneration(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side) {
GuiRegeneration regeneration = new GuiRegeneration();
DimensionType type = getDimension(player.getHeldItem(hand));
if (type != null) {
regeneration.dimensions.add(type);
}
FMLClientHandler.instance().showGuiScreen(regeneration);
}
use of cavern.client.gui.GuiRegeneration in project Cavern2 by kegare.
the class BlockPortalCavern method openRegeneration.
@SideOnly(Side.CLIENT)
public void openRegeneration(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side) {
GuiRegeneration regeneration = new GuiRegeneration();
regeneration.dimensions.add(getDimension());
FMLClientHandler.instance().showGuiScreen(regeneration);
}
Aggregations