1
0
Fork 0
Commit Graph

74 Commits

Author SHA1 Message Date
x12xx12x 3ff57559e3
ItemHandler initialisation is a constant expression (#5344)
* Transition to non-pointer item handler
* That is my destructor - I decide when I leave this world
* I declare your destruction private and you final
2021-12-01 23:31:10 +00:00
Tiger Wang 16aeb84cd3
Fix potential destruction crashes (#5095)
* Fix potential destruction crashes

* Fix destructors accessing destroyted objects
* Fix cPlayer not destroying windows (Destroyed never called)
* Tentatively fixes #4608, fixes #3236, fixes #3262
- Remove cEntity::Destroyed() and replace with cEntity::OnRemoveFromWorld()

* Add missing call to OnRemoveFromWorld
2021-01-02 13:50:34 +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
Mat fce548139b
Inventory changes (#4561)
Co-Authored-By: peterbell10 <peterbell10@live.co.uk>
2020-03-28 13:52:40 +00:00
peterbell10 f0c735e846
A player's inventory is always opened by its owner. (#4176)
Fixes #4093

Window updates are only broadcast to players in the m_OpenedBy list. Normally players are added after sending a window open packet but no packet is sent for a player's inventory. This meant broadcasts were never sent for the inventory window.
2018-01-28 17:24:59 +00:00
peterbell10 a72891fbb0
cWindow: Fix slot area priority when double click stacking. (#4086)
Fixes #4084
2018-01-15 11:35:27 +00:00
peterbell10 757231cc6e
Add the fmt library (#4065)
* Replaces AppendVPrintf with fmt::sprintf
* fmt::ArgList now used as a type safe alternative to varargs.
* Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu.
* Adds FLOG functions to log with fmt's native formatting style.
2018-01-03 17:41:16 +00:00
peterbell10 e225b7f826 Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
LogicParrot 49c443896d Revert "Replace ItemCallbacks with lambdas (#3948)"
This reverts commit 496c337cdf.
2017-09-02 08:50:23 +01:00
peterbell10 496c337cdf Replace ItemCallbacks with lambdas (#3948) 2017-09-01 13:04:50 +02:00
peterbell10 41d016cf5b Handle middle mouse drag (#3847) 2017-07-13 15:43:48 +02:00
Mattes D fb4c3fc4d9 Changed cLuaWindow callbacks to use cLuaState::cCallback. 2016-06-27 20:51:50 +02:00
Mattes D e3d34d9917 Revert "Lua callback" 2016-03-21 09:58:15 +01:00
Mattes D af200dfaae Changed cLuaWindow callbacks to use cLuaState::cCallback. 2016-03-17 19:29:03 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Mathias 89f3dec7ac Updated old forum links 2016-01-31 02:25:03 +02:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Mattes D 97beb2a350 Fixed custom recipes result clientside bug.
Fixes #2345.
2015-07-26 13:30:25 +02:00
Tiger Wang 1632d5f8f1 Fixes #2003 2015-05-18 15:43:24 +01:00
Mattes D e08e932e7a Narrowed WindowID to use only 7 bits.
Ref.: http://forum.mc-server.org/showthread.php?tid=1876
2015-04-21 23:29:50 +02:00
Howaner 1f94c318c5 Readded old DistributeStackToAreas() comment. 2015-01-25 00:40:59 +01:00
Howaner 8277e1ec4e C++11 and function rename. 2014-12-17 19:14:01 +01:00
Howaner 8591935a4b Implemented vanilla-like shift click.
This fixes many visual bugs.
2014-12-13 18:49:11 +01:00
Howaner b6fd400276 Own classes for all windows. 2014-12-13 15:06:55 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tiger Wang b5a2c6667a Improved furnaces
* Fixed progress bar on 1.8
* Fixed bugs
* Improved code
* Fixes #1068
* Fixes #1070
2014-10-03 21:32:41 +01:00
Tiger Wang d1814d2d67 Merge remote-tracking branch 'origin/master' into chestcarts
Conflicts:
	src/Entities/Minecart.cpp
2014-09-27 18:40:00 +01:00
Tiger Wang 3e74113427 Implemented Chest Minecarts 2014-09-12 23:18:02 +01:00
Howaner c7044fa1dd 1.8: Fixed inventory open packet. 2014-09-11 23:17:27 +02:00
Hownaer 0f1fd33123 Enchanting table improvements. 2014-08-28 01:21:54 +02:00
Howaner 556fc908ae Renamed functions and added beacon json saving. 2014-07-31 12:13:11 +02:00
Howaner 89b1bbdc5f Added beacon. 2014-07-30 21:59:35 +02:00
Tiger Wang 3385ed56b8 Merge remote-tracking branch 'origin/master' into portals
Conflicts:
	src/Chunk.cpp
	src/Entities/Player.cpp
	src/Root.cpp
	src/World.cpp
2014-07-22 10:24:28 +01:00
madmaxoft 93d29555e5 Style: Normalized to no spaces before closing parenthesis. 2014-07-21 17:40:43 +02:00
Tiger Wang 37140ae578 Merge branch 'master' into portals
Conflicts:
	src/Blocks/WorldInterface.h
	src/ClientHandle.cpp
	src/ClientHandle.h
	src/Entities/Player.cpp
	src/Entities/Player.h
	src/Generating/FinishGen.cpp
	src/Protocol/Protocol.h
	src/Protocol/Protocol125.cpp
	src/Protocol/Protocol125.h
	src/Protocol/Protocol16x.cpp
	src/Protocol/Protocol16x.h
	src/Protocol/Protocol17x.cpp
	src/Protocol/Protocol17x.h
	src/Protocol/ProtocolRecognizer.cpp
	src/Protocol/ProtocolRecognizer.h
	src/Root.h
	src/World.cpp
2014-07-18 20:10:51 +01:00
madmaxoft d0cc9aedb3 More trailing whitespace fixes. 2014-07-17 23:16:54 +02:00
madmaxoft 5e198c6730 Basic style fixes. 2014-07-17 22:50:58 +02:00
madmaxoft 2423fbf2ef Normalized comments.
This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-17 22:15:34 +02:00
Howaner d529971e27 Changed BroadcastSoundEffect function to take floating pos. 2014-07-13 02:08:02 +02:00
Tiger Wang 5f72cdac38 Merge pull request #1154 from mc-server/trappedchests
Implemented trapped chests & others
2014-07-12 23:24:32 +01:00
Tiger Wang e71e432633 Suggestions and bug fix
* Fixed hoppers pushing/pulling to/from (trapped)chests that do not form
a double-chest with the chest type directly connected to said hopper;
thank you, @madmaxoft
2014-07-12 22:06:25 +01:00
Tiger Wang 9e44b0aae1 Implemented trapped chests & others
+ Added trapped chests
* Fixed a bunch of bugs in the redstone simulator concerning wires and
repeaters
* Other potential bugfixes
2014-07-06 23:50:22 +01:00
Howaner 9d7a59012c Added drop window action. 2014-07-06 00:40:59 +02:00
Mattes D 39fff19955 Merge pull request #1138 from mc-server/enderchest
Properly implemented enderchests
2014-07-02 22:59:21 +02:00
Howaner 64e6667435 Only fixes the server crash. 2014-07-01 20:34:50 +02:00
Howaner 64f6ddf1e2 Fix server-crash with non-existing items. 2014-07-01 14:47:49 +02:00
Tiger Wang dde641ce83 Properly implemented enderchests 2014-06-29 11:36:38 +01:00
Tiger Wang bfa8aaf41b Merge branch 'master' into portals
Conflicts:
	src/ClientHandle.cpp
	src/Entities/Player.cpp
	src/Entities/Player.h
	src/Protocol/Protocol125.cpp
	src/Protocol/Protocol17x.cpp
2014-06-10 20:51:22 +01:00
Tiger Wang 74cd4f5521 Suggestions 2014-06-04 18:59:56 +01:00
Julian Laubstein 7e2effb2d8 Changed the m_slotarea position 2014-05-19 15:46:36 +02:00