Commit graph

430 commits

Author SHA1 Message Date
Soggy_Pancake ad1a4ecc68 Merge with upstream 2026-03-14 14:51:06 -07:00
Soggy_Pancake 93321777c7 Create fileTexturePack instances for each found zip file on load 2026-03-14 14:02:22 -07:00
Soggy_Pancake 7fd77ddc55 FileTexturePack is now functional and loads from a zip file in ./resourcepacks 2026-03-14 14:01:45 -07:00
Soggy_Pancake 7b8b75b3c3 Update names of block destruction level icons 2026-03-14 14:00:46 -07:00
Soggy_Pancake b25c8aaf38 Prevent crashes from unsafe cast with dummy function and define generateStitched function in TexturePack.h 2026-03-14 13:59:32 -07:00
Soggy_Pancake 4eaea8dc3f Update all tiles to use their given icon names and register with new name patterns with misc changes 2026-03-14 13:56:35 -07:00
Soggy_Pancake 6635d352dc Update all item icon slots to use current java names 2026-03-14 13:53:16 -07:00
Soggy_Pancake 5f284aa872 New custom icon macros so the item icon name is used instead of needing to update 2 hardcoded strings 2026-03-14 13:51:42 -07:00
Soggy_Pancake 7dfc7e1991 Generate stitched atlas when game retrieves atlas 2026-03-14 13:50:06 -07:00
Soggy_Pancake 8ceaf1ed71 Implement autostitching of terrain and items atlas 2026-03-14 13:48:53 -07:00
Soggy_Pancake 8a2bc70c56 Add hasFile checks and java misc translations 2026-03-14 13:47:27 -07:00
Soggy_Pancake 025e93b582 Add pack texture size check method 2026-03-14 13:43:33 -07:00
Soggy_Pancake 4b2b9094d2 Add misc indexed textures translation map 2026-03-14 13:41:25 -07:00
Soggy_Pancake be4bae8597 Add nice pixel union for modifying pixel data if needed. 2026-03-14 13:33:12 -07:00
Soggy_Pancake 4e91d5ca4c Implement ZipFile and ZipEntry 2026-03-14 13:30:44 -07:00
Soggy_Pancake 976dcc07ef Add bit7z library for loading zip files along with 7zip dll to be copied to build directory. 2026-03-14 13:05:19 -07:00
troglodyte9 4d200a589d
Fixed dangling pointer issue (#1209)
Some checks failed
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Has been cancelled
Nightly Release / Build Windows64 (push) Has been cancelled
2026-03-13 20:32:02 +00:00
rtm516 4e4e4dff0a
Remove all old binka redist files (#1116)
* Remove all old binka redist files

* Delete x64/Debug/Effects.msscmp

* Delete x64/Release/Effects.msscmp
2026-03-13 19:43:37 +00:00
Prakhar Sharma 379434097a
Fix witches' bottle color (#1205)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
* fix: witches' bottle is now the right color

* fix: add condition if item has mutiple layers
2026-03-13 11:41:47 +00:00
Ayush Thoren d131a551bf
Fix mounted minecarts not persisting across world reloads (#979)
* Fix mounted minecarts not persisting across world reloads

Signed-off-by: Ayush Thoren <ayushthoren@gmail.com>

* Apply patch

---------

Signed-off-by: Ayush Thoren <ayushthoren@gmail.com>
2026-03-13 11:16:05 +00:00
MrTheShy ad74d44300
Fix joining servers in split screen, splitscreen fixes (#1031)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
* Fix split-screen join failing when connecting to a remote host via UI

When a non-host client connected to a remote server through the in-game
UI (as opposed to the -ip/-port command line flags), the global variables
g_Win64MultiplayerIP and g_Win64MultiplayerPort were never updated from
their defaults ("127.0.0.1" and the default port). JoinSplitScreen()
relies on these globals to open a second TCP connection for the local
split-screen pad, so it would always attempt to connect to localhost,
failing immediately on any remote session.

Fix: update g_Win64MultiplayerIP and g_Win64MultiplayerPort inside
JoinGame() once the primary connection is established. This ensures
subsequent JoinSplitScreen() calls always reach the correct host
regardless of how the session was joined.

Additionally, guard PushFreeSmallId() against recycling smallIds in the
range [0, XUSER_MAX_COUNT), which are permanently reserved for the
host's local controller slots. Previously, if a host-side local pad
disconnected its smallId could re-enter the free pool and be handed
to an incoming remote client, causing that client's IQNetPlayer slot
to collide with a local pad slot on the non-host machine.

* Fix tutorial popup positioning in split-screen viewports

Replace the manual switch-case that computed viewport origin with the shared GetViewportRect/Fit16x9 helpers (from UISplitScreenHelpers.h). This ensures the tutorial popup is positioned and scaled consistently with the rest of the split-screen UI, fitting a 16:9 box inside each viewport and applying safezone offsets correctly.

Also adds missing default:break to safezone switch statements to silence compiler warnings.

Made-with: Cursor

* Prevent split-screen join when game window is not focused

Add g_KBMInput.IsWindowFocused() guard to the tryJoin condition so that gamepad input from background windows does not accidentally trigger a split-screen player join. This avoids phantom joins when the user is interacting with another application.

* Open debug overlay in fullscreen UI group during split-screen

Pass eUIGroup_Fullscreen to NavigateToScene when opening the debug overlay, so it spans the entire window instead of being confined to a single split-screen viewport. This makes the debug info readable regardless of the current split-screen layout.

* Fix non-host split-screen connections missing world updates

Previously, secondary (non-host) split-screen connections used isPrimaryConnection()
to gate nearly all world update packets, meaning the second local player would never
receive tile updates, entity movement, sounds, particles, explosions, etc.

The fix introduces per-connection tracking of which entities and chunks each
ClientConnection has loaded, and uses that information to decide whether a secondary
connection needs to process a given packet or if the primary connection already
handled it.

New members in ClientConnection:
- m_trackedEntityIds: set of entity IDs this connection has received AddEntity/AddMob/AddPlayer etc. for
- m_visibleChunks: set of chunk coordinates (packed into int64) this connection has marked visible
- Both sets are cleared on close(), respawn (dimension change), and destructor

New helpers:
- findPrimaryConnection(): walks the MultiPlayerLevel connection list to find the connection on the primary pad
- shouldProcessForEntity(id): secondary connection skips the packet only if the primary is already tracking that entity
- shouldProcessForPosition(x, z): secondary connection skips the packet only if the primary already has that chunk visible
- anyOtherConnectionHasChunk(x, z): used when a chunk becomes invisible to avoid hiding it from the level if another connection still needs it
- isTrackingEntity(id): public accessor used by shouldProcessForEntity on the primary connection

Packet handler changes:
- handleMoveEntity, handleMoveEntitySmall, handleSetEntityMotion, handleTakeItemEntity:
  replaced isPrimaryConnection() with shouldProcessForEntity() so secondary
  connections still process movement for entities they know about
- handleExplosion, handleLevelEvent:
  replaced isPrimaryConnection() with shouldProcessForPosition() so block
  destruction and level events fire for the correct connection based on chunks
- handleChunkTilesUpdate, handleBlockRegionUpdate, handleTileUpdate, handleSignUpdate,
  handleTileEntityData, handleTileEvent, handleTileDestruction, handleComplexItemData,
  handleSoundEvent, handleParticleEvent:
  removed the isPrimaryConnection() guard entirely -- these are world-state updates
  that all connections must process regardless of which pad is primary
- handleChunkVisibilityArea / handleChunkVisibility:
  now populate m_visibleChunks; on visibility=false, setChunkVisible(false) is
  only called on the level if no other connection still has that chunk loaded
- handleAddEntity, handleAddExperienceOrb, handleAddPainting, handleAddPlayer,
  handleAddMob: now insert into m_trackedEntityIds on arrival
- handleRemoveEntity: now erases from m_trackedEntityIds on removal
- handleLevelEvent: removed a duplicate levelEvent() call that was always firing
  regardless of the isPrimaryConnection() check above it (latent bug)

MultiPlayerLevel: added friend class ClientConnection to allow access to the
connections list without exposing it publicly.

* Fix fullscreen progress screen swallowing input before load completes

Two issues in UIScene_FullscreenProgress::handleInput:

1. The touchpad/button press that triggers movie skip or input forwarding
   had no guard on m_threadCompleted, so pressing a button during the loading
   phase would fire the skip/send logic before the background thread finished.
   Added the m_threadCompleted check so that path is only reachable once
   the load is actually done.

2. The `handled = true` assignment was missing from that branch, so input
   events were not being consumed and could fall through to other handlers.
   Added it unconditionally at the end of the block.

* Update player count decrement logic in PlatformNetworkManagerStub

Refactor the condition for decrementing the player count in CPlatformNetworkManagerStub::DoWork. The previous check was replaced with a while loop to ensure that the player count is only decremented when there are more than one player and the last player's custom data value is zero. This change improves the handling of player connections in the network manager.

* Refactor safe zone calculations in UI components for consistency

Updated the safe zone calculations across multiple UI components to ensure symmetry in split viewports. Removed unnecessary assignments and added comments for clarity. Modified the repositionHud function to include an additional parameter for better handling of HUD positioning in split-screen scenarios.

* Gui.cpp: fix F3 debug overlay in splitscreen + minor perf cleanup

The F3 debug screen was badly broken in splitscreen: it used the GUI
coordinate space which gets distorted by the splitscreen scaling, so
text appeared stretched, misaligned or completely off-screen depending
on the viewport layout.

Fixed by setting up a dedicated projection matrix using physical pixel
coordinates (g_rScreenWidth / g_rScreenHeight) each time the overlay is
drawn, completely decoupled from whatever transform the HUD is using.
The viewport dimensions are now computed per screen section so the ortho
projection matches the actual pixel area of each player's quadrant.
Version and branch strings are only shown for player 0 (iPad == 0) to
avoid repeating them across every splitscreen pane.

Also removed a few redundant calculations that were being done twice in
the same frame (atan for xRot, health halves, air supply scaled value).
These are minor and have negligible real-world impact; more substantial
per-frame caching work (safe zone calculations etc.) will follow in a
separate commit.
2026-03-13 01:32:18 -05:00
aria 714462b130
Fix background stretching in settings>graphics menu (#1092)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
2026-03-12 16:01:15 +00:00
RatCatcherVr 1cee2136d3
Added LittleBigPlanet Skin Pack (#793)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
Co-authored-by: RatCatcherVr <littlerat111811@gmail.com>
2026-03-12 12:55:50 +00:00
Alezito2008 e140978daf
fix: logo rendering order after closing host options (#907) 2026-03-12 12:52:09 +00:00
Twig6943 1c32d7bc5d
Remove some leftover files (#881) 2026-03-12 12:48:06 +00:00
Matt.T e689562027
Fix SubEntity hitbox hit detection (#1175) 2026-03-12 12:32:27 +00:00
Ayush Thoren bb8ffee0d3
Fix mouse being pulled to the bottom right (#1156)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
Signed-off-by: Ayush Thoren <ayushthoren@gmail.com>
2026-03-12 01:44:32 -05:00
ModMaker101 44fc8a4db2
Fix quiet in-game audio after engine update #897 (#1171) 2026-03-12 01:43:12 -05:00
Marvelco 1036b7368e
Fixed DLC map loading / saving, missing chunks (#1114)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
* fixed all DLC maps

* fixed old saves have overlapping chunks with the new system
2026-03-10 22:04:19 -05:00
Loki a195ac7172
Only single topic PRs, please - CONTRIBUTING.md 2026-03-10 09:37:52 -05:00
la d7596aa28c
Fix issue where visually the HUD shows you have 0 hearts when you dont (#1089)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
* Fix for issue where player is able to stay alive with zero hearts in their healthbar.

* use static cast over c style cast
2026-03-09 22:30:01 -05:00
eh-K c998346312
FIX: Bonus Chests spawn again when loading back in. #982 (#992)
* Fixed bug where Bonus Chests would spawn again when loading back into it.

Fixes #982

Added a check for if the world is new.

Meaning no more additional chests if the world is loaded up again.

* Replace NULL with nullptr for chest check
2026-03-09 22:07:38 -05:00
Marlian 91ae76f132
Fix tamed horses despawning when player moves away (#1057)
Co-authored-by: MCbabel <MCbabel@users.noreply.github.com>
2026-03-09 22:06:38 -05:00
Us3ful"-Dev c90a6bf5ab
Fixed Enderman, monster aggro in creative (#1051)
Fixed endermans by making a invulnerable check
2026-03-09 22:05:56 -05:00
Alezito2008 5f777a7f45
Fix: Prevent clicking disabled checkboxes (#1075) 2026-03-09 22:03:39 -05:00
Marlian 3bcf588fbe
Fix crash when loading saved tutorial worlds (#1001)
writeRuleFile() was missing the schematic file count integer before the schematic entries. The reader in readRuleFile() expected this count, causing a stream misalignment that led to an assertion failure (Unrecognised schematic version) when reloading a saved tutorial world.

The fix writes the count on save and adds backward-compatible reading that detects old saves (without count) via a peek heuristic and falls back to count-less parsing.

Co-authored-by: MCbabel <MCbabel@users.noreply.github.com>
2026-03-09 22:02:39 -05:00
Loki Rautio 58c236ead5 Disable git LFS
It was never even enabled properly to begin with
2026-03-09 20:49:50 -05:00
Loki e6eafda90e
Remove another servers.txt reference 2026-03-09 18:27:02 -05:00
Loki 0fbc8903f3
Update README, remove servers.txt references 2026-03-09 18:26:00 -05:00
la e9dba1fa56
Prevent TNT Minecart exploding with TNT disabled (#1067)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
This set of changes was made to make the code better mimic TU20 based on its disassembly
2026-03-09 16:01:17 -05:00
Tuff CWC fe65ec24f1
Remove dead link from README (#1064) 2026-03-09 15:02:26 -05:00
Loki bda3b1078a
Port over RCE Patches from LCEMP (#1023)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
* LCEMP RCE Fixes WIP

Based on d017bfc30a

* Update to LCEMP's ByteArrayIO version

Fixes compilation since ours was missing some revisions from LCEMP

* Add additional safety checks missed in first pass

* Remove duplicate recipe count check
2026-03-09 06:53:08 -05:00
Loki Rautio a358a3caae Revert accidentally pushed "LCEMP RCE fixes"
This reverts commit d557ca2dfb.
2026-03-09 04:46:56 -05:00
Loki Rautio d557ca2dfb LCEMP RCE fixes
Based on commit d017bfc30a68888bf5c79b23cf5c4f607cf828bf
2026-03-09 04:45:14 -05:00
Loki Rautio 0c4f459904 Always show version overlay, add more info 2026-03-09 03:25:05 -05:00
MrTheShy 7a4f57e3e6
Reject duplicate UIDs on login and remove noisy gdraw debug log (#1013)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
Players joining a server with a UID already in use are now disconnected
instead of the existing player being force-kicked. The previous behaviour
introduced in #767 allowed two clients with the same UID to coexist,
causing invisible players and undefined behaviour.

Also removes a per-frame debug printf in gdraw_SetViewSizeAndWorldScale
that was left in from earlier resolution-fix work.
2026-03-08 23:10:00 -05:00
MrTheShy e2adaa082c
Fix split-screen UI wrong positioning on window resize (#989)
* Fix split-screen UI wrong positioning on window resize

In vertical split at window heights below 1080, ComputeTileScale's min-scale clamp (>= 1.0) prevented the SWF from scaling down to fit, cropping the bottom and causing repositionHud to shift HUD elements downward. Chat and Tooltips additionally applied an offset from ComputeSplitContentOffset that only produced correct values at the 1920x1080 design resolution.

Override the scale for vertical split so the SWF fits the full window height when it is shorter than the movie. Remove the broken content offset from Chat and Tooltips -- the tile crop already positions the content correctly.

* Fix gamma post-process in split-screen

The gamma shader sampled the full backbuffer texture (UV 0..1) into each player's viewport, stretching the entire screen into every split region. Extended the shader constant buffer with per-viewport UV offset and scale so each pass samples only its own portion of the backbuffer.

ComputeViewportForPlayer was hardcoded to top/bottom for 2 players, ignoring the vertical split setting. Rewrote it to read each player's m_iScreenSection directly, which already accounts for the split orientation preference.

Secondary players have no Graphics menu and cannot change gamma. CachePlayerGammas now reads the primary player's setting and applies it uniformly to all viewports.
2026-03-08 22:16:58 -05:00
MozzarellaRat 42164eeb89
Reimplement boat gravity again. (#988) 2026-03-08 21:12:13 -05:00
rtm516 91bf8d44fa
Use the correctly sized icons on 720p (#883)
* Use the correctly sized icons on 720p

* Improve check
2026-03-08 21:05:54 -05:00
MrTheShy af5d5a06d5
Revert the workaround of loading of hd textures (#999)
The previous crash fix forced HD skins at every resolution which made everything blurry at 720p and below because Iggy was downscaling 1080p assets.

The real problem was that 4J loaded the HD skin libraries (skinHD.swf, skinHDHud.swf etc) unconditionally on Win64 but the HD platform skin was only registered above 720p. At 720p or lower Iggy couldnt find platformskinHD.swf and crashed.

Now on Win64 we load both skin sets at startup, HD and non-HD, each with their own registered name so they dont conflict. loadMovie() picks 1080.swf or 720.swf based on actual screen height, and each scene SWF naturally imports the right skin chain. No crash, no blurriness.

4J already had the eLibraryFallback enum slots for this (including eLibraryFallback_Platform) but it was behind a debug-only guard and the platform skin slot was never actually loaded. Removed the guard and added the missing load.
2026-03-08 21:02:48 -05:00