aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/PistonPieceRenderer.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/PistonPieceRenderer.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.Client/PistonPieceRenderer.cpp')
-rw-r--r--Minecraft.Client/PistonPieceRenderer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.Client/PistonPieceRenderer.cpp b/Minecraft.Client/PistonPieceRenderer.cpp
index 0982e69a..c51d2e0f 100644
--- a/Minecraft.Client/PistonPieceRenderer.cpp
+++ b/Minecraft.Client/PistonPieceRenderer.cpp
@@ -12,7 +12,7 @@ ResourceLocation PistonPieceRenderer::SIGN_LOCATION = ResourceLocation(TN_ITEM_S
PistonPieceRenderer::PistonPieceRenderer()
{
- tileRenderer = nullptr;
+ tileRenderer = NULL;
}
void PistonPieceRenderer::render(shared_ptr<TileEntity> _entity, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled)
@@ -21,7 +21,7 @@ void PistonPieceRenderer::render(shared_ptr<TileEntity> _entity, double x, doubl
shared_ptr<PistonPieceEntity> entity = dynamic_pointer_cast<PistonPieceEntity>(_entity);
Tile *tile = Tile::tiles[entity->getId()];
- if (tile != nullptr && entity->getProgress(a) <= 1) // 4J - changed condition from < to <= as our chunk update is async to main thread and so we can have to render these with progress of 1
+ if (tile != NULL && entity->getProgress(a) <= 1) // 4J - changed condition from < to <= as our chunk update is async to main thread and so we can have to render these with progress of 1
{
Tesselator *t = Tesselator::getInstance();
bindTexture(&TextureAtlas::LOCATION_BLOCKS);
@@ -35,7 +35,7 @@ void PistonPieceRenderer::render(shared_ptr<TileEntity> _entity, double x, doubl
t->begin();
- t->offset(static_cast<float>(x) - entity->x + entity->getXOff(a), static_cast<float>(y) - entity->y + entity->getYOff(a), static_cast<float>(z) - entity->z + entity->getZOff(a));
+ t->offset((float) x - entity->x + entity->getXOff(a), (float) y - entity->y + entity->getYOff(a), (float) z - entity->z + entity->getZOff(a));
t->color(1, 1, 1);
if (tile == Tile::pistonExtension && entity->getProgress(a) < 0.5f)
{
@@ -45,11 +45,11 @@ void PistonPieceRenderer::render(shared_ptr<TileEntity> _entity, double x, doubl
else if (entity->isSourcePiston() && !entity->isExtending())
{
// special case for withdrawing the arm back into the base
- Tile::pistonExtension->setOverrideTopTexture(static_cast<PistonBaseTile *>(tile)->getPlatformTexture());
+ Tile::pistonExtension->setOverrideTopTexture(((PistonBaseTile *) tile)->getPlatformTexture());
tileRenderer->tesselatePistonArmNoCulling(Tile::pistonExtension, entity->x, entity->y, entity->z, entity->getProgress(a) < 0.5f, entity->getData());
Tile::pistonExtension->clearOverrideTopTexture();
- t->offset(static_cast<float>(x) - entity->x, static_cast<float>(y) - entity->y, static_cast<float>(z) - entity->z);
+ t->offset((float) x - entity->x, (float) y - entity->y, (float) z - entity->z);
tileRenderer->tesselatePistonBaseForceExtended(tile, entity->x, entity->y, entity->z, entity->getData());
}
else