4 Commits

Author SHA1 Message Date
Loki Rautio
fe69d03302 Remove duplicate recipe count check 2026-03-09 05:29:43 -05:00
Loki Rautio
1d610300a8 Add additional safety checks missed in first pass 2026-03-09 05:18:40 -05:00
Loki Rautio
b1277c0e1b Update to LCEMP's ByteArrayIO version
Fixes compilation since ours was missing some revisions from LCEMP
2026-03-09 04:49:47 -05:00
Loki Rautio
164f034b0a LCEMP RCE Fixes WIP
Based on d017bfc30a
2026-03-09 04:46:37 -05:00
2 changed files with 38 additions and 28 deletions

View File

@@ -64,34 +64,28 @@ void MinecartTNT::destroy(DamageSource *source)
double speedSqr = xd * xd + zd * zd;
if (!app.GetGameHostOption(eGameHostOption_TNT) || !source->isExplosion())
if (!source->isExplosion())
{
spawnAtLocation( shared_ptr<ItemInstance>( new ItemInstance(Tile::tnt, 1) ), 0);
spawnAtLocation(std::make_shared<ItemInstance>(Tile::tnt, 1), 0);
}
if (app.GetGameHostOption(eGameHostOption_TNT))
if (source->isFire() || source->isExplosion() || speedSqr >= 0.01f)
{
if (source->isFire() || source->isExplosion() || speedSqr >= 0.01f)
{
explode(speedSqr);
}
explode(speedSqr);
}
}
void MinecartTNT::explode(double speedSqr)
{
if (!app.GetGameHostOption(eGameHostOption_TNT))
{
remove();
return;
}
if (!level->isClientSide)
{
double speed = sqrt(speedSqr);
if (speed > 5) speed = 5;
level->explode(shared_from_this(), x, y, z, (float) (4 + random->nextDouble() * 1.5f * speed), true);
remove();
if (speed > 5.0) speed = 5.0;
if (app.GetGameHostOption(eGameHostOption_TNT))
{
level->explode(shared_from_this(), x, y, z, static_cast<float>(4 + random->nextDouble() * 1.5f * speed), true);
remove();
}
}
}
@@ -128,15 +122,12 @@ void MinecartTNT::handleEntityEvent(byte eventId)
void MinecartTNT::primeFuse()
{
if (app.GetGameHostOption(eGameHostOption_TNT))
{
fuse = 80;
fuse = 80;
if (!level->isClientSide)
{
level->broadcastEntityEvent(shared_from_this(), EVENT_PRIME);
level->playEntitySound(shared_from_this(), eSoundType_RANDOM_FUSE, 1, 1.0f);
}
if (!level->isClientSide)
{
level->broadcastEntityEvent(shared_from_this(), EVENT_PRIME);
level->playEntitySound(shared_from_this(), eSoundType_RANDOM_FUSE, 1, 1.0f);
}
}

View File

@@ -6,10 +6,10 @@
## Introduction
This project contains the source code of Minecraft Legacy Console Edition v1.6.0560.0 (TU19) with some fixes and improvements applied.
This project contains the source code of Minecraft Legacy Console Edition v1.6.0560.0 (TU19) from https://archive.org/details/minecraft-legacy-console-edition-source-code, with some fixes and improvements applied.
## Download
Windows users can download our [Nightly Build](https://github.com/smartcmd/MinecraftConsoles/releases/tag/nightly)! Simply download the `.zip` file and extract it to a folder where you'd like to keep the game. You can set your username in `username.txt` (you'll have to make this file)
Windows users can download our [Nightly Build](https://github.com/smartcmd/MinecraftConsoles/releases/tag/nightly)! Simply download the `.zip` file and extract it to a folder where you'd like to keep the game. You can set your username in `username.txt` (you'll have to make this file) and add servers to connect to in `servers.txt`
## Platform Support
@@ -35,11 +35,30 @@ Basic LAN multiplayer is available on the Windows build
- Other players on the same LAN can discover the session from the in-game Join Game menu
- Game connections use TCP port `25565` by default
- LAN discovery uses UDP port `25566`
- Add servers to your server list with the in-game Add Server button (temp)
- Add servers to your server list with `servers.txt` (temp solution)
- Rename yourself without losing data by keeping your `uid.dat`
Parts of this feature are based on code from [LCEMP](https://github.com/LCEMP/LCEMP) (thanks!)
### servers.txt
To add a server to your game, create the `servers.txt` file in the same directory as you have `Minecraft.Client.exe`. Inside, follow this format:
```
serverip.example.com
25565
The name of your server in UI!
```
For example, here's a valid servers.txt
```
1.1.1.1
25565
Cloudflare's Very Own LCE Server
127.0.0.1
25565
Localhost Test Crap
```
### Launch Arguments
| Argument | Description |
@@ -81,7 +100,7 @@ Minecraft.Client.exe -name Steve -fullscreen
2. Clone the repository.
3. Open the project by double-clicking `MinecraftConsoles.sln`.
4. Make sure `Minecraft.Client` is set as the Startup Project.
5. Set the build configuration to **Debug** (Release is also ok but missing some debug features) and the target platform to **Windows64**, then build and run.
5. Set the build configuration to **Debug** (Release is also OK but has some bugs) and the target platform to **Windows64**, then build and run.
### CMake (Windows x64)