1
0
Commit Graph

11186 Commits

Author SHA1 Message Date
12xx12
c07ea7b9ab
added const correctness on some functions in cPlayer (#4999)
Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-10-15 20:18:32 +02:00
Tiger Wang
a145980795
Fix Android builds (#4998)
Construct paths relative to the Cuberite sources with PROJECT_SOURCE_DIR, instead of wherever the first CMakeLists.txt file happened to be with CMAKE_SOURCE_DIR.

In Android's case, the latter was in a folder called android/ but that's not the root of the source tree, so any file path built off that root was wrong. This caused file-specific warnings exclusions to fail to apply.
2020-10-15 09:35:44 +00:00
Lukas Pioch
aee4778bf7
Added missing return types and fixed param types (#4996) 2020-10-13 20:59:11 +00:00
12xx12
9419c78609
Remove debug output on PieceStructuresGen.cpp (#4984)
- Remove debug output on PieceStructuresGen.cpp
- Removed Stopwatch import

Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-10-12 13:35:14 +01:00
Alexander Harkness
c8c061edf7
Update comments and code for Load/SaveOneChunk so they match (#4992)
Fixes #4991
2020-10-11 16:14:43 +00:00
NiLSPACE
bca93b17da
Simple end gen (#4973)
* Fixed current end generator

* Implemented new simplified end generation which includes a void between the main island and other islands

* Fixed basic style

* Hopefully fixed clang errors.
2020-10-11 15:44:57 +00:00
12xx12
c080f819d2
Adding Silverfish Spawning Blocks (#4946)
* added breaking, spawning, animation

* checkstyle

* added undocumented API symbols

* added changes suggested by @peterbell10

* added natural ore like generation

* fixed spawning two silverfishes

* fixed clang

* fixed clang try 2

* updated comment
unified offset

* final clang fix

* added spawning for more silverfishes if one was damaged

* fixed spawning on one hit kill

* fixed spawning on one hit kill
fixed spawning by potion damage

* fixed clang

* fixed broken build

* fixed broken build

* I should read the error message properly
fixed build now?

* added small changes suggested by @peterbell10

Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-10-11 15:27:41 +00:00
Lukas Pioch
c8a1cda48c
Corrected invalid syntax for return types in APIDoc (#4989) 2020-10-11 09:44:33 +00:00
12xx12
c0711407e9
Adding more customize options to mob spawners and improving the way to look for surrounding entities (#4955)
* added nearly any customize option

* fixed unnecessary diff
added comments

* removed unnecessary const qualifier

* fixed build

* changed to ForEachEntityInBox

* added docs

* updated lua api description

* checkstyle

* added changes suggested by @peterbell10
And now the player may break the server by setting ridiculous ranges

* updated docs
changed cast to static cast

* fixed clang

* fixed clang on WSSAnvil.cpp

Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-10-10 19:31:44 +00:00
KingCol13
b0b1ccddd1
Anvil fixes (#4976)
* Rewrite to use wiki target/sacrifice terminology.

* Fix negative damages.

* Prevent repairing if output matches target.

* Make target and sacrifice const.

* Pre-PR tidy-up

* Keep m_MaximumCost updated.
2020-10-10 19:23:25 +00:00
12xx12
32ee1708a2
Adding wolf breading and moving breeding functionality to cMonster (#4951)
* added wolf breading

* mpoved breeding to monster

* checkstyle

* fixed my IDE "helping"

* removed magic number
and fixed faster aging

* added flooring to age manipulation

* fixed copiler error

* fixed typo

* moved tps to Defines.h

* removed the TPS constant from the lua API exposure

* added inline constexpr
added explanation

* fixed broken build

* "fixed" build

Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-10-09 20:49:25 +00:00
12xx12
6fd35be67a
added check if the digger is a nullptr (#4981)
Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-10-09 20:12:19 +00:00
12xx12
d3255b3014
Beacon now checks for players in surrounding square (#4972)
* Beacon now check for players in surrounding square not every player

* added proper BoundingBox

Co-authored-by: Alexander Harkness <me@bearbin.net>

* one symbol to change everything
one symbol to break the whole build

Co-authored-by: 12xx12 <12xx12100@gmail.com>
Co-authored-by: Alexander Harkness <me@bearbin.net>
2020-10-09 19:19:22 +00:00
Lukas Pioch
6ddc03db09 Add default value nullptr for parameter a_Digger and added digger to
cWorld:DigBlock in lua api
2020-10-09 18:39:20 +01:00
Bart Ribbers
2ca2a50b47
Include sys/select.h on non-glibc Linux platforms (#4977)
Otherwise fd_set will be unknown for example on Musl libc systems
2020-10-09 13:38:41 +00:00
12xx12
3381c0f6d6
Merged OnBreak with OnPlayerBreak (#4967)
Co-authored-by: 12xx12 <12xx12100@gmail.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-10-08 20:13:44 +01:00
peterbell10
a9031b6bae
Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)
* Fix cmake not adding Werror on clang, and _lots_ of warnings

* WIP: Build fixes

* Cannot make intermediate blockhandler instance

* Tiger's changes

* Fix BitIndex check

* Handle invalid NextState values in cMultiVersionProtocol

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-10-05 10:27:14 +00:00
NiLSPACE
23021dd828
Fixed current end generator (#4968) 2020-10-04 15:12:36 +00:00
Tiger Wang
21068011c6 Remove SetProperty(...cPlayer)
Enchantment table, anvil windows are already opened one per-player.
2020-10-03 16:54:14 +01:00
KingCol13
cd1b507745
Fix instant mining of blocks not being recognised, tweak anti-cheat (#4938)
* Tried to fix a small issue...

Ended up rewriting a bunch of god awful, opaque code with no source
and no sense. Who names a function GetPlayerRelativeBlockHardness???
It's gone now. We're safe again.

* Testing anti-cheat.

* Tidy up debug logging.

* Remove empty member declaration.

* Rewrite GetDigSpeed slightly for better readability.

* GetMiningProgressPerTick now returns 1 when instantly mined. Fixed hasily written typo.

* Comment style and typo fixes.
2020-10-02 20:57:17 +00:00
Alexander Harkness
89fb16fc27
Update issue templates (#4960)
* Update issue templates

* Delete ISSUE_TEMPLATE.md

* Disable blank issues with newfangled issue template method
2020-10-01 23:20:10 +00:00
12xx12
d875059cd5
moved issue template (#4956)
Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-10-01 21:40:33 +00:00
KingCol13
8947147c25
Enchanting table shows detail on hover. Enchanting is deterministic. (#4937)
* Use lapis for enchanting, subtract correct number of levels, ClientHandle now selects from pregenerated list.

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-10-01 22:33:32 +01:00
[IPSA] Chris de Claverie
be841b4769
Add SetBlockMeta warning in documentation (#4943)
+ Add SetBlockMeta warning in documentation

Co-authored-by: pwnOrbitals <c.de-claverie@pm.me>
2020-10-01 11:38:10 +01:00
Tiger Wang
3917b250b0 Revert travis changes 2020-09-30 22:05:17 +01:00
Tiger Wang
7bc8d2ee26 Upgrade squeelylitecpp to 3.1.1 2020-09-30 22:05:17 +01:00
Tiger Wang
f9ac6543ab C++17 stuff 2020-09-30 22:05:17 +01:00
Tiger Wang
429117c1f6 Doors: check power & toggle correctly
* Fixed upper half ignoring its updates
* Fixes #4945
* Fixed doors playing sound effects when they didn't actually toggle
2020-09-28 23:40:19 +01:00
Tiger Wang
c9fbb43ac7
HandleEnchantItem: use a lambda (#4944) 2020-09-28 22:38:10 +00:00
KingCol13
8eca58a1c9
Fortune Drops (#4932)
+ Implemented and standardized all clamped discrete random drops.
+ Changed cItems Add from push_back to emplace_back. Implement fortune for crops.
+ Enabled hoes to be enchanted with efficiency, silk touch and fortune. Made leaves, gravel and crops affected by fortune.

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-09-28 13:41:49 +01:00
KingCol13
32af227fa7
Enchanting consumes lapis, removes correct number of levels (#4934)
* Use lapis for enchanting, subtract correct number of levels.
* Enforced distancing regulation better than our government.

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-09-28 00:51:23 +01:00
[IPSA] Chris de Claverie
9a548b3b3e
Plugin reload <plugin_name> feature (#4942)
+ Add `reload <pluginname>`
* Fixes #365

Co-authored-by: Alexander Harkness <me@bearbin.net>
Co-authored-by: pwnOrbitals <c.de-claverie@pm.me>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-09-27 23:15:03 +01:00
12xx12
410d6c0045
Fixing Mob spawner behaviour (#4930)
* fixed mob spawner failure (whoopsie in the BlockEntity.GetChunkZ())
Style

* fixed spawning behaviour

* fixed saving entity type saving

* checkstyle

* removed debug log

* removed short saving

* Style

Co-authored-by: 12xx12 <12xx12100@gmail.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-09-27 20:02:16 +03:00
Tiger Wang
c158569af3 Remove unused Temporary namespace 2020-09-25 14:51:57 +01:00
Tiger Wang
4519469547 Do not call into things we don't own in destructors
- Remove improper accesses in cChunk destructor
* Fixes #4894
2020-09-25 14:51:16 +01:00
Tiger Wang
10bd15a11e Grass spread: check chunk & light validity correctly 2020-09-25 14:51:16 +01:00
Alexander Harkness
281beba50e
Fix the build. Merge conflict between two PRs (#4936) 2020-09-25 10:59:08 +00:00
KingCol13
a78fd671b2
Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885)
* Removed BiomeDef.h

* Removed ChunkDef.h from Globals.h

* Added to CONTRIBUTORS.

* Re-added empty last line to Globals.h

* Included stddef and StringUtils in BiomeDef.h

* Fixed build tools compiling. It compiles, but at what cost?

* Added include to src/Generating/Trees.h

* Include added in ChunkGeneratorThread.h

* Moved rearranged includes in LineBlockTracer.cpp

* Re-arrange headers in ChunkInterface.cpp

* Included ChunkDef.h in Path.h

* Included ChunkDef.h in NBTChunkSerializer.h

* Rearranged included and added required includes to headers.

* Removed unnecessary included in StringUtils.h.
2020-09-25 09:13:59 +00:00
Tiger Wang
5bd12814db Put phonograph on right part of visual spectrum 2020-09-25 09:07:34 +00:00
Tiger Wang
7574f68a48 BlockEntity: clarify ConvertToPickups behaviour 2020-09-25 09:07:01 +00:00
Tiger Wang
c53a0ba5f6 Unify block entity pickup conversion
- Removed normal BlockHandler knowledge of block entities during conversion
+ Added cBlockEntity::ConvertToPickups that handles it
2020-09-25 09:07:01 +00:00
Tiger Wang
1a60164848 Small cleanup in Jukeboxes
* Fixed creative players not tracking stats, and the code trying to "place" a record when they used one
2020-09-25 09:07:01 +00:00
Tiger Wang
a2ecbf6a2e Fix cItems::AddItemGrid adding empty items 2020-09-25 09:07:01 +00:00
12xx12
b5410c718e
Fix ice behaviour in world (#4927)
+ Added proper ice melting under light influence

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-09-24 13:53:49 +01:00
Tiger Wang
3edcafdf8b TABS OUT OF BED! TABS IN THE CORRIDORS! 2020-09-23 14:34:15 +01:00
Tiger Wang
71b96ab921 Limit fortune level, style fixes 2020-09-23 14:34:15 +01:00
12xx12
a0dd311d02
Added dtEnvitonment to player damage text (#4925)
+ Added dtEnvironment to string conversion
+ Added dtEnvironment to player damage strings
2020-09-22 12:38:55 +01:00
12xx12
51e026a3ae added dtEnvironment to string conversion 2020-09-21 22:58:38 +01:00
Tiger Wang
6183b28f93
Implement redstone quasi-connectivity (#4889) 2020-09-21 20:39:58 +01:00
KrystilizeNevaDies
23bca00831
Implement Dropspenser Hook (#4903)
* Implement Dropspenser Hook

Implemented a hook for dropspensing.
HOOK_DROPSPENSE

When plugin callback returns true then dropspense is cancelled

* Update src/Bindings/PluginManager.h

Co-authored-by: peterbell10 <peterbell10@live.co.uk>

* Create OnDropSpense.lua

* Fix indent

* Forgot include

Forgot to include the plugin manager. Although now im confused why it was working on my end without including the plugin manager

* Update plugins.lua with dropspense

* fix typos

* haha notepad++ go brr

Co-authored-by: peterbell10 <peterbell10@live.co.uk>
2020-09-21 15:31:45 +00:00