* Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides
27 lines
734 B
C++
27 lines
734 B
C++
#include "stdafx.h"
|
|
|
|
#include "..\..\..\Minecraft.World\net.minecraft.world.level.tile.entity.h"
|
|
#include "..\..\..\Minecraft.World\SharedConstants.h"
|
|
#include "..\..\..\Minecraft.World\net.minecraft.world.item.alchemy.h"
|
|
#include "XUI_Ctrl_BrewProgress.h"
|
|
|
|
int CXuiCtrlBrewProgress::GetValue()
|
|
{
|
|
void* pvUserData;
|
|
this->GetUserData( &pvUserData );
|
|
|
|
if( pvUserData != nullptr )
|
|
{
|
|
BrewingStandTileEntity *pBrewingStandTileEntity = static_cast<BrewingStandTileEntity *>(pvUserData);
|
|
|
|
return pBrewingStandTileEntity->getBrewTime();
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
void CXuiCtrlBrewProgress::GetRange(int *pnRangeMin, int *pnRangeMax)
|
|
{
|
|
*pnRangeMin = 0;
|
|
*pnRangeMax = PotionBrewing::BREWING_TIME_SECONDS * SharedConstants::TICKS_PER_SECOND;
|
|
} |