11554 Commits

Author SHA1 Message Date
f9050e6e02
Pulled in upstream commits up-to 3ec51bcb9f9277e955ec400063c88d54e7ae690b 2025-06-12 12:34:38 -04:00
d08a5e932a
Removed more Lua content. 2025-06-12 12:20:23 -04:00
0d51f729eb
Fixed Tests 2025-06-12 11:54:40 -04:00
22dbe42ab4
Updated Submodule links 2025-06-12 10:30:56 -04:00
x12xx12x
3ec51bcb9f
byte buffer refactor (#5486)
* Update ByteBuffer.cpp

* Further improvements

- more constants
- more comments
- using smart pointer for memory

* More Constants in coordinate writing, Fixed too many bits for mask in y

* Changed variable name
2025-01-17 17:16:28 +01:00
Super Ewald
3c1cc4a513
feat: add detached flag to run in foreground with detached stdin (#5592)
* feat: add detached flag to run in foreground with detached stdin

* adjust contributors

* fix code style

* ref: move detached cin check to handleinput

* Update CONTRIBUTORS
2025-01-03 14:45:00 +00:00
Jason N. White
54269d78b2
Update LICENSE, fix license year (#5602)
Signed-off-by: JasonnnW3000 <sufssl04@gmail.com>
2025-01-01 14:20:14 +00:00
CoolPuppyKid
b92dc1cda3
Added Log That Says The Port (#5593)
* added logging that says the port

* fixed my little oversight

* removed useless level.dat
2024-12-10 23:54:19 +00:00
CoolPuppyKid
4b2b02a8ba
Fixed Weird Tp Fail Damage (#5591)
* Fixed Weird Tp Fail Damage

* i added a ; by mistake

* Update CONTRIBUTORS

* fixed my name
2024-12-04 00:22:37 +01:00
peterbell10
05c9e06be1
Remove blocking GetHeight (#4689)
* WIP: Remove blocking GetHeight

* Make CheckBasicStyle.lua happy

* Update comment and style

* Update lua bindings and docs

* Rework chunk loading in GenerateRandomSpawn

Explicitly use chunk stays instead of relying on chunks loaded by
`cSpawnPrepare` to not unload.

* Fix variable shadowing

* Update to C++17

* Add note about empty chunks to IsWeatherWetAtXYZ API docs

* Cleanup, fix some of the remaining merge issues.

---------

Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-11-30 11:16:53 +00:00
Alexander Harkness
c0f6c97dce
Manually specify UTF-8 encoding for Cuberite.rc (#5589) 2024-11-11 14:33:13 +00:00
Angus
5e258c6d95
Move monster speed to monsters.ini (#4500)
* Add walking and running speed to monsters.ini

* Add entry to CONTRIBUTORS

* Add SetRelativeRunSpeed to APIDesc.lua

* Fix typo

* Remove unnecessary cast

Co-Authored-By: peterbell10 <peterbell10@live.co.uk>

* Use relative walk speed as a modifier to base walk and run speeds

* Rename Default to Base in Walk/Run Speeds

* Update docs.

---------

Co-authored-by: peterbell10 <peterbell10@live.co.uk>
Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-11-10 11:28:39 +00:00
x12xx12x
44cb43f13c
Fix Block Entity Placement in Generation (#5060)
* block area in chunk desc now handles block entities
some minor changes
block entities validate and correct their position when put into the world

* fixed checkstyle

* Fixed Build

* Removed Empty File

---------

Co-authored-by: 12xx12 <12xx12100@gmail.com>
Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-11-09 23:07:11 +00:00
x12xx12x
e17f6906ef
fixes for api changes in embedtls (#5540)
* fixes for api changes in embedtls

* Use mbedtls 2.28.9

* Update mbedtls to point to merged master commit.

* Fix indentation style.

---------

Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-11-08 00:19:47 +00:00
hle0
33b9c5dc6d
Fix cChunkMap issues below with coords below y=0 (#5397)
* return false in cChunkMap::GetBlockTypeMeta if requested height is invalid

* add checks to users of cWorld::GetBlockTypeMeta

* add checks for invalid height to cChunkMap::GetBlock and cChunkMap::GetBlockMeta

* add hle0 to CONTRIBUTORS

* Fix merge conflict with isValidHeight

* Add initialisation contract and fulfil it.

---------

Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-11-07 23:05:47 +00:00
Alexander Harkness
8ca73f1929
Remove simple template-id from constructors for Vector3 template. (#5586)
This was removed from the C++ standard in C++20; annoying warnings are produced by modern C++ compilers.

https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2237
2024-11-07 21:10:44 +01:00
Alexander Harkness
ab62fc3988
Clean up CanBeAt Functions (#5587)
* Use cChunkDef::IsValidHeight for CanBeAt functions, and related helpers.

* Add mixins for SolidSurfaceUnderneat and DirtLikeUnderneath

* Minor fixes after change review.
2024-11-07 21:03:21 +01:00
NiLSPACE
a99c3ec2b8
Added code to export definitions for a lua-language-server (#5475)
* Added code to export definitions for a lua-language-server

* Renamed VSCode -> LLS

* Fixed global variables/functions in APIDump being part of API docs

* Added article explaining how to configure lua-language-server
2024-11-04 22:43:20 +00:00
Filip
fa908f577d
Temp fix for disappearing chunk sections in 1.14 (#5560)
* Temp fix for dissapearing section in 1.13 and 1.14 versions

Previously the value for nonEmptyBlocks in each chunk section was -1. This was probably set with the intention to set it to the max value. However, the game also interprets the value as signed. meaning when a block is placed the value is incremented to 0.  But when the nonEmptyBlocks value is 0 the game treats that section as empty and stops rendering blocks in it. 

This patch makes sure that the value sent is 4096, the amount of blocks in any section. This will probably lead to the inverse bug where the game will treat empty sections as non-empty.

* Use named constant for section size rather than magic number.

---------

Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-11-04 10:01:31 +01:00
Ash
d82a6afd9e
Overhaul endian handling in ByteBuffer and FastNBT (#5543)
* Overhaul endian handling in ByteBuffer and FastNBT

Rather than juggling "swapped" and "unswapped" versions of integers, different library functions, #defines, etc., simply always read everything byte-by-byte.

This works regardless of host CPU endian, got optimised down to either a normal load or a byteswap on every compiler I tested - only 1 instruction on most CPU architectures.

This commit introduces a "Bytes" array type to keep endian-sensitive data seperate from host data, alongside the needed C++ template machinery for it to work seamlessly. This approach is a little bit safer as well since you get length- and type-checking for most callsites.

* Remove remaining references to old-style endianness conversion, remove functions themselves.

---------

Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-11-03 16:33:40 +01:00
NiLSPACE
b31cfb4c36
Make biomal composition gen respect the shapegen when placing bedrock (#5579) 2024-11-03 12:08:21 +00:00
Alexander Harkness
4b90000b8c
Update Cuberite Root CA Cert - ISRG X1 Root now used.
IdenTrust cross-signature has expired, so the root has changed.     https://blog.cloudflare.com/upcoming-lets-encrypt-certificate-chain-change-and-impact-for-cloudflare-customers/
2024-11-01 23:23:52 +00:00
sleirsgoevy
7e4abd7dd0
Fix player respawn for 1.8 clients (#5535)
1.8 clients seem to dislike "resurrecting" a dead player entity, doing
so results in the player entering a glitched state where its nickname
is displayed on the feet and they can't be attacked by melee. Destroying
and recreating the client-side entity at respawn time seems to fix the
glitch, and does not seem to affect more modern clients.
2024-11-01 22:20:13 +00:00
mjagdis
4e3b272af7
Save changed maps every 5 minutes (#5557)
* Save maps every 5 minutes

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* Only save maps with changes

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* Maps created with non-default values are immediately dirty

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* Apply suggestions from code review

* Fix spacing for clang-tidy

---------

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-11-01 22:19:34 +00:00
mjagdis
352134ba9e
Convert double to ints with floor rather than truncating (#5572)
Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
2024-11-01 22:18:50 +00:00
mjagdis
2bafab7233
Fix access to uninitialized space (#5576)
* Fix access to uninitialized space

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* Same fix to other noise generate functions

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* Skip the last Cell.Move

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* Add comments

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

---------

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
2024-11-01 22:17:27 +00:00
mjagdis
65b7040c5e
Make wall banners actually placeable (#5574)
Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
2024-11-01 22:16:53 +00:00
Victor
0325de7dac
Uninitialised value fix (#5570) 2024-09-08 23:18:28 +02:00
mjagdis
5f4d2f004b
The second value in Rotation is pitch not roll (#5573)
Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
2024-07-02 23:51:03 +02:00
mjagdis
b7de59de89
Preserve banner names across place and pick up (#5565)
* Preserve banner names across place and pick up

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* Update src/BlockEntities/BannerEntity.h

---------

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-06-30 20:09:42 +02:00
mjagdis
c6c32bc2ed
Send metadata for item frames (#5568)
Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
2024-06-30 12:12:03 +00:00
beb62977de
Added Continuous Integration using Woodpecker-CI's docker container
Some checks failed
ci/woodpecker/manual/woodpecker.json Pipeline failed
ci/woodpecker/push/woodpecker.json Pipeline was successful
2024-06-19 16:04:49 -04:00
mjagdis
a66a67c2ab
Set TCP_NODELAY on connections (#5558)
* Set TCP_NODELAY on connections

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* Windows wants a char *  not a void * :-(

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* And clang objects to old style casts

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

---------

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
2024-05-31 14:04:51 +03:00
NiLSPACE
64e97c8d16
Fixed dumpinfo plugin not finding Info.lua file if the plugin folder and name don't match (#5563)
Co-authored-by: Niels <niels.breuker@outlook.com>
2024-05-27 10:42:07 +02:00
mjagdis
81d40127c1
Fix filename template for saved maps (#5556)
* Fix filename template for saved maps

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

* First patch - added to CONTRIBUTORS

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>

---------

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
2024-05-12 22:10:38 +00:00
Mat
09859af405
cibuild.sh: enable verbose ccache output 2024-05-13 00:14:53 +03:00
NiLSPACE
884e3e97a6
Added extra possible Info.lua parameter that describes the dependencies (#5554) 2024-04-10 19:52:31 +02:00
NiLSPACE
cc6459bf0e
Moved end generator back to 3d perlin noise (#5552)
* Moved end generator back to 3d perlin noise

* Replaced magic numbers where constants are available

* Use auto instead of NOISE_DATATYPE
Fixed redeclaration of distanceFromSpawn variable
Renamed EndGenIslandFlatness optoin to EndGenIslandThickness
2024-04-09 15:11:26 +02:00
Mattes D
ed0b090383 Plugin InfoDump: Fall back to gPluginInfo if g_PluginInfo not found. 2024-03-20 12:35:13 +01:00
Mattes D
5fd7cc3646 Plugin InfoReg: Read the info from param 2024-03-17 21:12:43 +01:00
Mattes D
bc4975a864 Re-enable -rdynamic so that Lua modules can load Lua API from exe.
This fixes debugging Lua plugins from ZeroBraneStudio on Linux.
2024-03-15 00:24:05 +01:00
Mattes D
7b8f6eb951 Reverted moving Lua to C++. 2024-03-15 00:24:05 +01:00
Mattes D
cc6a866aa6 Fix build under clang-15. 2024-03-14 15:48:38 +01:00
Mattes D
6aec10feab Enable build under newer clang versions. 2024-03-14 08:47:20 +01:00
Mattes D
4f5a9327c2 Fixed UrlClientTest's Github CA. 2024-03-13 23:40:20 +01:00
26ef03a2dd
Added test_block.png to test texture tendering of blocks. 2024-02-19 07:05:49 -05:00
a9bc6895ed
Reorganized client code to be ready for isometrics
Preparing the namespacing for multi-dementional/isometric renderers
and the like. Just some fancy formatting for the moment.
2024-02-19 07:04:11 -05:00
639e867fd4
Improved client checking for blocks before trying to mesh nothing. also more cChunkDef inclusions. 2024-02-15 07:46:09 -05:00
85c6edf829
Removal of client LocalVoxel to use cChunkDef
Now uses more server code, more of the indexing was corrected to work
with this somewhat.
The variables for positions, cube, voxels were all renamed to be more
clear with their expressions.
The stuff in the greedy mesher to do with AxisIterator was improved to
be more iterator like in the use, and the variables surrounding them
such as the iterator use themselves and the south_ and east_ names were
cleared up from "down" and "side".

Overral this was a big refactor and mostly a rename fest, looks nice so
far.

oh yea, debug if()s to help cut down on chat spam.
2024-02-15 07:31:02 -05:00
3a666b2480
Changed client code to use the array indexing functions provided by server 2024-02-15 06:39:20 -05:00