Zach DeCook
68fc28857f
Concrete mixing ( #4096 )
...
Adds a block handler for concrete powder and implements hardening to concrete.
Concrete powder turns into concrete when:
* It is next to water when it receives a block update
* It falls onto a water block (even with Physics SandInstantFall=1)
2018-01-03 16:33:31 +00:00
Alexander Harkness
6309c6a97f
improve rain simulation ( #4017 )
...
* Uses vanilla logic to decide which blocks rain falls through.
* Rain falls infinitely above the world, and stops at y=0.
* Entities will now be extinguished if they are under rain-blocking
blocks, and fire will now be extinguished by rain similarly.
* Create IsWeatherWetAtXYZ to identify wetness at a particular location.
* Use new code for enderman rain detection.
* Fixes issue #916
* Disable warnings for global constructors in the fire simulator.
2017-12-26 21:25:57 +00:00
Alexander Harkness
705deea205
Water bottles are drinkable potions ( #4114 )
...
Water bottles are now drinkable potions
Fixes #4111
Also update outdated mcwiki references
2017-12-26 20:27:24 +00:00
bibo38
532731e6f4
Fixed Clang 5.0 compile errors ( #4085 )
...
* Fixed Clang 5.0 compile errors
* Fixed wrong comment
* Only disable warnings in Clang 5 or higher
* Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning
* Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork
2017-12-21 11:36:58 +00:00
Fabian
0dd172b80f
Store Health as a float ( #4073 )
...
* Fix #4024
* Fix clang error
* Add comment
* Fix behaviour
* Save Health as float
* Changed m_Health to float
* Remove redundant static_cast
* Fix casts
2017-11-22 13:47:52 +00:00
peterbell10
0bacda3269
Implement horse inventory ( #4053 )
...
* Implement horse inventory
* Fix sign conversions
* Add API doc for ItemCategory::IsHorseArmor
* Improve HandleOpenHorseInventory comment and style fixes.
2017-10-21 17:56:09 +01:00
peterbell10
744cdb726d
Fix minecart deceleration ( #4059 )
2017-10-21 17:53:24 +01:00
Lane Kolbly
30c8470a52
Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors ( #3959 )
...
* Made BroadcastSoundEffect take vector parameters.
* Added docs for new vectored methods
* Removed old code
* Fixed lua warnings
* Made old BroadcastSoundEffect not an override.
* m_Block to m_BlockPos, used Vector3d constructor where prettier.
* a_Block to a_BlockPos
* Changed thunderbolt a_Block to a_BlockPos
2017-09-19 15:12:54 +01:00
Lukas Pioch
c5f590d460
Removed UTF-8 BOM ( #4033 )
2017-09-19 10:34:08 +02:00
peterbell10
307e7aaff5
Fix switch warnings ( #4013 )
...
* Fix switch warnings
* Fix a variety of -Wswitch and -Wswitch-enum warnings
* Remove unneeded -Wno-error flags
* Reorganise some eMonsterType switches
* Alpha sort eMonsterType cases in WriteMobMetadata
and in cNBTChunkSerializer::AddMonsterEntity
* List all mob types in protocol 1.12 and NBTChunkSerializer
* cStructGenTrees::GetNumTrees: remove switch default
* cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type
2017-09-14 09:48:57 +01:00
Alexander Harkness
a4c07d2f98
Adjust lava damage values ( #4020 )
...
Fixes isue #2925
2017-09-12 09:02:17 +01:00
peterbell10
e225b7f826
Replace ItemCallbacks with lambdas ( #3993 )
2017-09-11 23:20:49 +02:00
Alexander Harkness
4e7325c9e2
Fix crash for players out of the world. Fixes #4006 ( #4007 )
2017-09-10 17:45:18 +01:00
Lane Kolbly
b12f4ef7d5
Made world data paths adjustable, and added API to temporarily disable saving chunks to disk. ( #3912 )
2017-09-07 13:41:16 +01:00
Lane Kolbly
dc294cdc51
Switched player statistic store to save with UUID filenames. ( #4002 )
2017-09-07 11:57:12 +02:00
Alexander Harkness
e33eb529ad
Fire effect now shown for creative and spectator mode players ( #3998 )
...
* Fire effect now shown for creative and spectator mode players
Fixes #3989
* Add documentation for IsFireproof
2017-09-07 09:59:08 +01:00
Lukas Pioch
ed7adef1ca
Updated APIDoc ( #3985 )
2017-09-07 10:33:46 +02:00
Bond-009
104f9e127b
Changed some int parameters to vector parameters ( #3937 )
2017-09-07 10:25:34 +02:00
peterbell10
ef1f371dab
Add cWorld::RemoveEntity and use in cEntity ( #4003 )
...
* Add cWorld::RemoveEntity and use in cEntity
* cEntity: Remove uneeded asserts from Destroy and DoMoveToWorld
2017-09-05 15:11:35 +01:00
LogicParrot
49c443896d
Revert "Replace ItemCallbacks with lambdas ( #3948 )"
...
This reverts commit 496c337cdf
.
2017-09-02 08:50:23 +01:00
Alexander Harkness
700bbdabf5
SetSwimState now takes into account head height
...
This affects m_IsSubmerged and IsSubmerged() for entities of all
types.
Also prevent squids from suffocating in water.
2017-09-01 14:50:02 +01:00
peterbell10
496c337cdf
Replace ItemCallbacks with lambdas ( #3948 )
2017-09-01 13:04:50 +02:00
Tiger Wang
da0778dfaa
Merge pull request #3969 from peterbell10/cuboid
...
cCuboid: restore default copy construct and assign
2017-08-30 15:04:09 +01:00
Lane Kolbly
5d64451f74
Protocol Spawn Position Should Use LastSentPosition ( #3929 )
...
+ Added GetLastSentPos
* Fixed spawn position bug in 1.8.
2017-08-30 15:01:33 +01:00
Lane Kolbly
1f9788a801
Added ShouldSendRespawn parameter to ScheduleMoveToWorld ( #3979 )
2017-08-30 02:35:53 +03:00
peterbell10
3687ef397c
Cleanup Vector3 constructors and Abs
2017-08-28 13:48:07 +01:00
Bond-009
3c8712d871
Gives all entities the default airlevel on creation ( #3942 )
...
* Guardians don't take damage on land
* Squids suffocate on land
2017-08-25 14:44:36 +01:00
peterbell10
f4f2fc7c3d
Add cUUID class ( #3871 )
2017-08-25 13:43:18 +01:00
Lukas Pioch
b55e5f5ad1
Use ref instead of pointer
2017-08-24 14:36:29 +02:00
mathiascode
02775e52c4
Minor changes ( #3909 )
2017-08-24 11:19:40 +02:00
Lane Kolbly
92ac45d27e
Added check to deactivate existing entity effects when new entity effects are added.
2017-08-24 11:19:01 +02:00
Lane Kolbly
af6963f40f
Added check in cEntity::TickBurning for whether the entity is planning to change worlds. ( #3943 )
2017-08-22 15:05:13 +01:00
Bond-009
a262bacc9d
Give arthropods slowness IV when hit with bane of arthropods ( #3932 )
2017-08-21 10:51:26 +02:00
Pablo Beltrán
b18f6637b6
Fully implemented leashes ( #3798 )
2017-08-21 10:46:41 +02:00
Lane Kolbly
f81e6f6b6d
Changed MoveToWorld to ScheduleMoveToWorld in cPlayer::Respawn ( #3922 )
...
* Changed MoveToWorld to ScheduleMoveToWorld
- Removed empty line
2017-08-18 11:40:35 +01:00
Tiger Wang
72d7027861
Merge pull request #3489 from cuberite/EntityOwnership
...
* Changed entity ownership model to use smart pointers
2017-08-18 11:17:56 +01:00
Lane Kolbly
1ec85a2b2c
Add cLuaWindow OnClicked Callback ( #3901 )
2017-08-17 16:27:43 +02:00
Lane Kolbly
4dd2af27e0
Added knockback to arrows, fixed knockback enchantment handling ( #3900 )
...
* Added knockback for arrows, fixed knockback enchantment handling.
2017-08-13 12:40:23 +01:00
Lukas Pioch
743a50014a
Replaced includes with forward declarations
2017-08-13 12:31:10 +01:00
Tiger Wang
4ef47aed62
Changed entity ownership model to use smart pointers
2017-08-07 19:24:16 +01:00
peterbell10
79eb4c3aed
Implement invisibility effect
2017-08-03 15:34:38 +02:00
peterbell10
759618b035
Remove double includes part 2 ( #3890 )
2017-08-03 15:34:19 +02:00
Lukas Pioch
0397535fa7
Removed unused forward declarations ( #3888 )
2017-08-03 15:10:29 +02:00
Lukas Pioch
4691bc5a29
Removed double includes ( #3885 )
2017-08-02 19:57:20 +01:00
peterbell10
0d0323608d
cBlockHandler: take player by ref
2017-08-01 08:21:20 +02:00
peterbell10
8eb5672920
cWorld::SendBlockTo take player by ref
2017-08-01 08:21:20 +02:00
Lane Kolbly
5402b214b3
Check for intersection between placed blocks and entities. ( #3850 )
...
* Check for intersection between placed blocks and entities.
+ Implemented GetPlacementCollisionBox, to permit custom placement collision boxes for blocks.
* Factored block-entity placement checking into another function in cPlayer.
- Removed vector min/max functions
* Use GetWorld to get the world in DoesPlacingBlocksIntersectEntity.
+ Added block height checks, allow different cEntity subclasses to decide whether they will prevent block placement.
2017-07-28 17:59:21 +01:00
Tiger Wang
eb4432bb62
Tentative fix for player-limit race condition ( #3862 )
...
* Attempts to fix #2257
Derived from d233e9843148313c71fbaba96ccff660e47b07b1
* Changed player count type to int
* Clarified certain actions
2017-07-28 17:54:40 +01:00
Lane Kolbly
87af95b67c
Updated armor cover calculation. ( #3858 )
...
* Updated armor damage calculation.
+ Added lua docs, added casts from float to int.
* Changed verbage in docstring and comment.
2017-07-23 10:46:38 +01:00
Lane Kolbly
793acd267f
Changing pickup lifetime and combining semantics, making these adjustable in the lua api. ( #3843 )
2017-07-12 12:13:27 +02:00
Lane Kolbly
647d9082b8
If entity is a player, send relmove packets.
2017-07-12 12:12:56 +02:00
Lane Kolbly
a561886bf3
Implemented draggingitem API.
2017-07-10 05:46:04 +02:00
Lane Kolbly
7c7f85117b
Added armor durability reduction when player is attacked.
2017-07-02 07:45:49 +02:00
Bond-009
cf22bc4e60
Players in creative and spectator aren't affected by cacti ( #3824 )
2017-07-02 07:39:19 +02:00
Mattes D
885d80ccdb
Entity: Replaced a mutexed counter with a std::atomic. ( #3773 )
2017-06-15 16:06:50 +01:00
peterbell10
360d8eade0
FastRandom rewrite ( #3754 )
2017-06-13 21:35:30 +02:00
Lukas Pioch
7922e6addb
Fixes problems with windows:
...
- Changed cPlayer:OpenWindow to accept a ref, tolua adds a nil check
- Close open lua window in destructor, to avoid dangling pointers
2017-06-05 15:14:23 +02:00
Pablo Beltrán
2b699dc749
Avoid pickups to sink into blocks and disappear ( #3739 )
...
* Avoid pickups to sink into blocks and disappear
2017-06-04 06:35:02 +02:00
Pablo Beltrán
8f1e55611e
Fixed exp orb ( #3744 )
...
Fixes #3740
Fixes #2667
2017-06-03 21:10:48 +02:00
Mattes D
0551d78dff
Fixed tracer usage in Entity physics handling. ( #3720 )
2017-05-28 20:56:17 +02:00
Heiko Hund
a0341d561a
Add rank prefix and suffix to player name in chat ( #3730 )
...
Fixes issue #1721
2017-05-27 02:15:56 +01:00
Lukas Pioch
73a3c4e3be
Exported boat
...
- NBT: Added saving / loading of material
- Added the material in the item handler of the boat
- Drop the correct boat if destroyed
- APIDoc: Added desc and functions
2017-05-24 19:02:18 +02:00
Lukas Pioch
e35ac1bfb9
Clang 5.0 fixes
...
- Added override keyword
- Removed inherited member variables
2017-05-21 12:19:06 +02:00
Mattes D
2c3c1f1527
Tracer replacement ( #3704 )
...
* Replaced cTracer usage with cLineBlockTracer.
* Exported new cLineBlockTracer utility functions to Lua API.
2017-05-11 13:34:36 +01:00
Lukas Pioch
7c4576a025
Exported cFallingBlock and cExpOrb ( #3700 )
2017-05-09 14:24:41 +02:00
Lukas Pioch
fb20517435
APIDoc: Documented missing functions and variables. ( #3634 )
2017-04-04 07:53:14 +02:00
Marvin Kopf
dbdcb85346
Added a nullptr check to cEntity::IsA ( #3659 )
...
Fixes #3603
2017-04-01 23:15:08 +02:00
Lukas Pioch
74ee255cae
Detach player from entity / object if he is dead
2017-03-19 09:48:15 +01:00
Bond-009
6fe863c2ad
Fixed cactus detection and zombie pigman sword ( #3584 )
...
Fixes for issues #902 and #2917
2017-02-25 19:14:08 +01:00
Alex
9cb1ad546f
Changed fish launching mechanism ( #3520 )
...
Fish and other fishing loot now correctly fly towards played when reeled in.
2017-02-20 10:03:19 +01:00
mathiascode
dae2adde65
Updated sounds and effect IDs ( #3422 )
2017-02-15 06:05:24 +01:00
Pokechu22
9c2a0bb7b9
Track skin part and main hand preferences ( #3498 )
2017-01-03 21:19:29 +01:00
Fabian Stein
c8b1d8a37d
Fix crash after calling OnTick on removed effect ( #3501 )
2016-12-30 00:06:30 +01:00
Fabian Stein
4170ab62c0
Fixed entity effect ticking ( #3497 )
...
Fixes #3386
2016-12-29 15:21:41 +01:00
mathiascode
efc7fed05b
Updated links and docs ( #3488 )
2016-12-19 17:08:19 +01:00
Mattes D
0e3b3be766
Initial support for the 1.11 protocol.
2016-12-16 00:07:22 +01:00
Mattes D
caa05e7935
Fixed minecart destruction using deallocated memory.
2016-12-15 14:57:48 +01:00
Lukas Pioch
0c10704d1f
Export GetPosition and GetSpeed from cEntity as a copy instead of a pointer to lua.
2016-12-10 13:32:11 +01:00
Marvin Kopf
ff4be64edc
Powered rails can kick-start minecarts ( #3472 )
2016-12-10 09:53:35 +01:00
Mattes D
0bffa29358
Removed ClientHandle.h dependencies from common headers.
2016-11-18 20:00:04 +01:00
mohe2015
32b38fb264
Anticheat fastbreak ( #3411 )
...
Added block hardness checks when breaking blocks.
2016-11-06 19:30:19 +01:00
Lukas Pioch
b088123d18
Added SendMessageRaw for sending json string.
2016-10-21 11:17:39 +02:00
bibo38
cb640ffea4
Spectators added ( #2852 )
2016-10-12 14:38:45 +02:00
LogicParrot
4e33569110
Fixed cProjectileEntity double destroy bug ( #3397 )
2016-10-09 17:22:34 +02:00
sgtbigman
7bcc3535fd
Initialize m_bIsInBed in cPlayer constructor.
...
This fixes an issue where the return value from the IsInBed method of
the cPlayer class in the lua API would not return a boolean value.
2016-10-08 00:58:43 -04:00
Moritz Borcherding
b268db4caa
Use cChunkDef::Height for Y coord comparison where applicable.
2016-09-27 14:32:20 +02:00
LogicParrot
90be4e7efd
Entities now bail out of ticks if destroyed ( #3363 )
2016-09-03 14:31:27 +03:00
LogicParrot
5625598afa
Improve cPlayer::DoMoveToWorld ( #3113 )
2016-09-03 10:39:52 +03:00
LogicParrot
c088f7ff0a
Proper respawn packets on dimension travel
2016-08-29 11:16:06 +03:00
ElNounch
e9d1a942d1
Delay EntityChangedWorld players' callback until Entity fully linked to world ( #3330 )
...
Otherwise, some API calls just don't seem to happen
.gitignore tweak for test executables
2016-08-22 19:43:43 +02:00
LogicParrot
2f11655f00
Fix minecart destruction crash ( #3336 )
2016-08-20 23:12:48 +03:00
LogicParrot
7b3a8a535a
Fixed minecraft with chest destruction crash ( #3335 )
2016-08-20 18:19:54 +03:00
Mattes D
d1dee3c909
Fixed RasPi builds of unit tests.
...
On RasPi with gcc 4.8.2, the asserts wouldn't compile when tests were enabled.
Enforced the assumption that ASSERT code is generated only in Debug builds.
2016-08-04 20:47:53 +02:00
Mathias
e7b4d7a776
Dropped 1.7 support ( #3253 )
2016-07-21 09:47:42 +02:00
Mattes D
8eaa8613da
CMake: Remove needless minimum version specifications.
2016-07-18 22:11:42 +02:00
Mattes D
f8e1df2476
Updated API documentation.
2016-07-18 22:11:40 +02:00
beeduck
db65e11d57
Fixes for boat entities ( #3265 )
...
protocol for vehicles now properly handled, protocol for boat paddles now properly handled, boats can no longer spawn underwater, boats now properly float, boat metadata now properly broadcasted.
2016-07-18 22:10:00 +02:00
Altenius
510614e8ef
Fixed falling block spawning
...
Fixes #3222
2016-07-05 17:10:58 -04:00
Lukas Pioch
9b96c0d18d
Close chest window if minecart is destroyed
2016-06-30 11:08:09 +02:00
Mattes D
fb4c3fc4d9
Changed cLuaWindow callbacks to use cLuaState::cCallback.
2016-06-27 20:51:50 +02:00