diff --git a/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/HD/windowsHD.swf b/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/HD/windowsHD.swf index cd0618b3..cd426fa6 100644 Binary files a/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/HD/windowsHD.swf and b/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/HD/windowsHD.swf differ diff --git a/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/WiiU.swf b/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/WiiU.swf index 11bf53e7..23d30190 100644 Binary files a/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/WiiU.swf and b/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/WiiU.swf differ diff --git a/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/windows.swf b/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/windows.swf index 8f05344e..ed8fe774 100644 Binary files a/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/windows.swf and b/Minecraft.Client/Common/Media/MediaWindows64/Graphics/ControlType/windows.swf differ diff --git a/Minecraft.World/PistonBaseTile.cpp b/Minecraft.World/PistonBaseTile.cpp index c45722de..f708c9e0 100644 --- a/Minecraft.World/PistonBaseTile.cpp +++ b/Minecraft.World/PistonBaseTile.cpp @@ -192,7 +192,7 @@ void PistonBaseTile::checkIfExtend(Level *level, int x, int y, int z) } else if (!extend && isExtended(data)) { - level->setData(x, y, z, facing, UPDATE_CLIENTS); + // level->setData(x, y, z, facing, UPDATE_CLIENTS); level->tileEvent(x, y, z, id, TRIGGER_CONTRACT, facing); } } @@ -382,6 +382,27 @@ bool PistonBaseTile::triggerEvent(Level *level, int x, int y, int z, int param1, applyStructureMove(level, x, y, z, facing, pullDir, isSticky, toMove, toDestroy, false); } + else if (block > 0 && Tile::tiles[block]->getPistonPushReaction() == Material::PUSH_SLIME) + { + std::vector fallbackMove; + std::vector fallbackDestroy; + bool fallbackOk = collectStructure(level, pullDir, + twoX, twoY, twoZ, + x, y, z, + armX, armY, armZ, + true, + fallbackMove, fallbackDestroy); + if (fallbackOk && !fallbackMove.empty()) + { + applyStructureMove(level, x, y, z, facing, pullDir, isSticky, + fallbackMove, fallbackDestroy, false); + } + else + { + stopSharingIfServer(level, armX, armY, armZ); + level->removeTile(armX, armY, armZ); + } + } else { stopSharingIfServer(level, armX, armY, armZ); @@ -623,9 +644,13 @@ bool PistonBaseTile::collectStructure(Level *level, int moveDir, for (int d = 0; d < 6; d++) { if (d == moveDir) continue; - queue.push_back({pos.x + Facing::STEP_X[d], - pos.y + Facing::STEP_Y[d], - pos.z + Facing::STEP_Z[d]}); + int nx = pos.x + Facing::STEP_X[d]; + int ny = pos.y + Facing::STEP_Y[d]; + int nz = pos.z + Facing::STEP_Z[d]; + int neighborBlock = level->getTile(nx, ny, nz); + if (neighborBlock == 0) continue; + if (!isPushable(neighborBlock, level, nx, ny, nz, false)) continue; + queue.push_back({nx, ny, nz}); } } } @@ -652,7 +677,22 @@ void PistonBaseTile::applyStructureMove(Level *level, } int n = (int)toMove.size(); - if (n == 0) return; + int armX = pistonX + Facing::STEP_X[facing]; + int armY = pistonY + Facing::STEP_Y[facing]; + int armZ = pistonZ + Facing::STEP_Z[facing]; + + if (n == 0) + { + if (isExtension) + { + int armData = facing | (sticky ? PistonExtensionTile::STICKY_BIT : 0); + stopSharingIfServer(level, armX, armY, armZ); + level->setTileAndData(armX, armY, armZ, Tile::piston_extension_Id, armData, Tile::UPDATE_NONE); + level->setTileEntity(armX, armY, armZ, + PistonMovingPiece::newMovingPieceEntity(Tile::piston_head_Id, armData, facing, true, false)); + } + return; + } std::vector savedBlocks(n), savedDatas(n); for (int i = 0; i < n; i++) @@ -687,10 +727,6 @@ void PistonBaseTile::applyStructureMove(Level *level, PistonMovingPiece::newMovingPieceEntity(savedBlocks[i], savedDatas[i], facing, isExtension, false)); } - int armX = pistonX + Facing::STEP_X[facing]; - int armY = pistonY + Facing::STEP_Y[facing]; - int armZ = pistonZ + Facing::STEP_Z[facing]; - if (isExtension) { int armData = facing | (sticky ? PistonExtensionTile::STICKY_BIT : 0);