Commit Graph

134 Commits

Author SHA1 Message Date
asofold f7b2c017fd GPLv3 headers.
Time for java template?
2018-08-26 11:41:01 +02:00
asofold b422d077db Brewing stand, cauldron, hopper, end portal frame. 2018-08-26 11:35:18 +02:00
asofold a142df024b Dragon egg. 2018-08-26 10:45:17 +02:00
asofold fd679c842f Deop. 2018-08-26 10:27:48 +02:00
asofold cc98d2dbce Add GPLv3 header. 2018-08-25 12:04:16 +02:00
asofold fbd8f6a02d Add end rod (1.13). 2018-08-25 11:57:20 +02:00
asofold 6e2d611e9b 1.13 - add more blocks. 2018-08-24 23:53:09 +02:00
asofold d7aa96880e Prepare cocoa beans and/or end rod. 2018-08-24 12:34:54 +02:00
asofold 9d37763264 More blocks added, adjustments for initialization.
Chests are treated as single chests always, so there is a little
potential for interaction getting through (blockinteract.visible).

Snow is just treated as before, data-based height adjustment (to be
added as a model, as Bukkit supports getting the level in a generic way,
same for water).
2018-08-24 12:24:34 +02:00
asofold cbc5d3b4aa Add missing GPLv3 headers. 2018-08-24 00:02:14 +02:00
asofold 0a77c07b21 Add shulker boxes and (leveled) snow.
Leveled one block height could be done in a generic way via Bukkit, once
needed.
2018-08-22 23:34:32 +02:00
asofold 58d17aa057 Add fence gate. 2018-08-22 22:58:02 +02:00
asofold 371f7079c8 Only demand the used interface here. 2018-08-22 22:39:37 +02:00
asofold c4423de353 Fences / coblestone wall. 2018-08-22 22:38:28 +02:00
asofold 4a7fd059dd Add BukkitThinFence. Remove unneeded flag.
(Configurability is another step.)
2018-08-22 09:43:37 +02:00
asofold b89c3af589 Explicit height flag for grass path. Bukkit model for stairs. 2018-08-21 13:19:01 +02:00
asofold 56f1a37969 [BLEEDING][BREAKING] Swift way in to Bukkit shape models (slabs first).
Remains warnings, registry debugging output without checking config.
2018-08-21 11:45:15 +02:00
asofold 54c022f74d Prepare MCAccessBukkitModern (1.13). 2018-08-21 00:02:05 +02:00
asofold 07368361e2 More smart block setup (first batch).
* Initialize fully solid (in terms of shape + passable) blocks
explicitly with full bounds and solid flags.
* Use MaterialUtil#addBlocks and BridgeMaterial#getAllBlocks where
appropriate.
* MCAccessBukkit(Base): don't touch fully solid nor fully passable ones.
2018-08-20 21:48:36 +02:00
asofold 62df128efd [BLEEDING][BREAKING] MC 1.13 Material changes, first batch.
First batch:
* Initialize blocks somehow, so no errors nor missing blocks happen
during startup.

Possibly Missing:
* There might be references of removed/renamed material (blocks/items)
throughout the code.
* Some blocks may behave different now/then.

Missing:
* Block#getData may not reflect (all?) properties anymore.
* Block shape getting is missing. Block shapes are now (potentially)
more complex to process. Concept might be to keep a double array for the
rough bounds, and add an (optional +- null) array of arrays for sub
shapes, if present (IBlockCacheNode). So a first rough update is more
simple/compatible.
2018-08-20 12:37:51 +02:00
asofold 82f50dda71 Put Material.isTransparent into a method for later distinction. 2018-08-13 09:23:51 +02:00
asofold 82d6f94230 [BLEEDING][BREAKING][BROKEN] Continue data registry + API. (+)
Likely incomplete/broken somewhere.

Implement/extend/use/fix new data caches and factories.
(+) Fixes related to recent commits (e.g. log listener exceptions
properly, fight.wrongturn).

Missing:
* Debug logging (registry), consider a registry log file.
* Proper naming/tags for listeners.
* Consistency: ICheckData should probably be used with
removeData(CheckType)? Registration is arbitrary though.
* Consistency: clearData() vs clearData(CheckType.ALL) - should check
type related data be ICheckData only ?
* Data expiration stages and PlayerOfflineData - impact on memory...
* (...)

Further:
* WorldData inheritance issue: implement passing on changes to children.
(Current line of thought: rather extend IWorldDataManager to allow
change default+inherited only.)
* Shrink exposed API - uncertain: rather have a registration context
object or expose individual methods for factory registration and
grouping types?
* (...)
* Planned breakage: Project + package organization redone: move stuff
where it is best for having an API (components -> split to top level or
name it api, utilities ... parts belong into API, and the like...,
possibly split project further: commons, api(+-bukkit), core/checks,
plugin-bukkit).
2018-04-02 01:25:10 +02:00
asofold 30902ec352 [BROKEN] Data storage overhaul (basics). (+)
(SAFETY COMMIT)

Largely breaking change.
* Interfaces in front of data types (and 'managers'), some interfaces
removed.
* Data and configuration fetching.
* Check activation checking (config flags, isEnabled, hasBypass).
* CheckType (activation checks, factories removed).
* Lots of collateral signature changes, including IPlayerData.

The (I)WorldDataManager stores per-world data (+ per world per check
type).
* Raw configurations.
* Typical flags: check activation, debug, lag adaption.
* Generic data, such as check configurations or per world check data.

The (I)PlayerDataManager stores per player data.
* Check Data.
* Typical flags: debug
* Exemption
* Check data (and config cache).
* Further mappings and later OfflinePlayerData.
* The registration interface will allow defining, how instances are
handled for registered types (factory, proxy, what on world change, what
on logout, global removal handler, per player removal handler).

(I)PlayerData is intended to be/become the central access point.
* External interface is IPlayerData now.
* Per player debug flags, exemptions.
* Fetching configuration and data: local cache, relaying fetching to
registered factories and proxy-registries/storage (e.g. fetching
configuration from per world storage).

Other fixes/changes:
(+) Extend the debug player command (set true/false, reset to world
default, arbitrary check types).
(+) PlayerData maintains a currentWorldIdentifier (to be used instead of
ChatData in future).
(+) The WorldConfigProvider getAll implementation returns a
LinkedHashSet now, avoiding duplicates.
(+) Move DefaultGenericInstanceRegistry to NCPCore.
(+) Thread-safety considerations for DefaultGenericInstanceRegistry.
(+) Don't log errors on hasBypass checking. TBD: Instead intercept
during listener methods (or even as a feature within the listener node:
e.g. @ThreadContext(primaryThread=true, skipOffContext=true,
cancelOffContext=true).
(+) Add fight.wrongturn permissions to plugin.yml.
(+) Missing GPLv3 headers.

Broken/Missing:
* WorldData inheritance from default: propagate all changes done
directly to the default config to children (all worlds that don't have
an explicit world_config.yml set) - possibly add an OverrideState or
similar, (NONE, FROM_DEFAULT, EXPLICIT) and don't override EXPLICIT if
coming from the default. Calling override on the default WorldData is
not to be confused with calling override for WorldDataManager (override
for all worlds as EXPLICIT).
* Organize overriding for special circumstances (version dependent
activation  and the like). Might want to add registered override
handlers to be called on reload automatically.
* Store generic per check type per world data in the WorldDataManager,
such as configurations and per-world check data. TBD: Factories, cleanup
(!).
* Most efficient referencing (IWorldCheckTypeNode, IHandle<something>?).
* All the registry stuff (see PlayerData).
* Use interfaces for auto registry (and a flag within
RegistrationContext?) - world unload, world change, player join / leave.
* (Data expiration handling including transition to IOfflinePlayerData,
because now data is a little heavier.)
* Further details.
2018-02-26 12:15:53 +01:00
asofold 58ee2d2f9d Remove warning message of cbreflect up to 1.12.2. 2018-01-04 23:47:58 +01:00
md_5 df3344409b Fix server version detection logic 2017-12-21 14:00:27 +11:00
asofold af44f13fbd [BREAKING] BlockCache: rename getTypeId to getType. 2017-12-18 01:19:49 +01:00
asofold ce98d2aa54 [BLEEDING] Fix native access modules. 2017-12-18 01:14:23 +01:00
asofold 7fb960275d [BLIND] Use MinecraftServer.getVersion, if no version was detected. 2017-12-16 16:51:46 +01:00
asofold 7c5d67b1d4 Fixes and adjustments with String ids.
* Start renaming methods internally (getType for getting Material) -
unfinished.
* Temporary fix for the NCPCompatbukkit/cbreflect module: fetch NMS
blocks by id until we have a mapping and/or something efficient and
future proof in place.
2017-12-16 16:14:41 +01:00
md_5 1e988f24a0 Fix import location 2017-12-06 21:45:58 +11:00
md_5 3a111dc4a5 Remove Block IDs 2017-12-06 16:55:29 +11:00
asofold afe080f1c2 Use cancel.dead as id instead of canceldead. 2017-05-31 21:00:42 +02:00
asofold b38cb4da99 Passable: Prepare fixes. Remove legacy code and options.
New
* Define a couple of default lists for axis order.
* Allow setting axis order via a list.

Removed
* Configuration option to disable ray-tracing.
* Configuration option 'blockchangeonly' - there may be an equivalent
later on, where checking accounts for the entire bounding box(es).
* Legacy code option (things have stabilized and axis order switching
should fix false positives).

Random
* Accidentally commit FastConsume (whitespace).
2017-05-04 13:17:36 +02:00
asofold def24ac1f1 Headers missed. 2017-04-11 00:06:35 +02:00
asofold 9a4b3f6f91 [BLEEDING][BREAKING] Store PlayerData by UUID, use a PlayerTickListener.
Instead of maps for each individual purpose, and the rather expensive
TickListener adding and removing, player specific task will be done via
one PlayerTickListener that can be registered with the TickTask. Thus
PlayerData has the access methods requestUpdateInventory and
requestPlayerSetBack, and so on, later more. For the
DataManager.playerData map it'll be UUID first now.

Consequently some calls have been altered to prefer passing Player or
UUID for PlayerData getting.
2017-04-08 15:47:06 +02:00
asofold 0cd0d508d1 [BREAKING] Add UUID to PlayerData creation. Outlook on data.
Breaks: DataManager.getPlayerData(String, boolean) has been removed, new
methods added to do the same without boolean or with UUID passed extra.

Following changes may repeatedly/randomly break PlayerData and check
data access (unless you use CheckType.getDataFactory), this may not
follow directly, but more or less soon. Even Later, CheckType will get
broken too :), in favor of class instances with dynamic registration
ability.

Basic direction is to concentrate stuff in PlayerData, getting rid of
all the static data stores, but also making access to shared data
more efficient (e.g. store last world id + name and permission cache in
PlayerData). Access will be more thread safe (only for PlayerData,
permissions cache, likely for fetching check data too, however returned
objects may have their own contracts).
2017-04-08 13:49:39 +02:00
asofold 6a7d56c5ac IEntityAccessVehicle.addPassenger, reduce warnings.
Supposedly just making use of altered internal+external API. No
substantial change.
2017-04-02 20:47:24 +02:00
asofold 30c3a40622 Towards vehicles with multiple passengers. 2017-04-02 18:55:32 +02:00
asofold 0491fa7805 Use getWidth and getHeight for Bukkit entities, once available.
* Simplify MC version string.
2017-04-02 17:23:17 +02:00
asofold a4e106af52 Don't use the pre-1.11 method past 1.11. 2016-12-29 13:26:33 +01:00
asofold 664a01b951 Comment on having ReflectEntity there. 2016-12-29 13:06:37 +01:00
asofold 32c0250530 (Note entity bounding boxes on pre-1.7.10.) 2016-12-27 16:39:32 +01:00
asofold 95b2984ca9 [BLEEDING] Implement isIllegalBounds for cbreflect. 2016-12-27 16:34:39 +01:00
asofold 68eec44f14 [BREAKING] Move LocUtil to utilities.location 2016-12-27 15:28:36 +01:00
asofold 380ed8a185 Log resetting of fastconsume data for the obvious spots. 2016-11-28 22:24:51 +01:00
asofold ea9c5a1b19 FastConsume: disable the instanteat check on reloading the
configuration.
2016-11-26 14:52:47 +01:00
asofold 85460d5cca Comments (simplify/complement some, add headers). 2016-11-23 21:07:53 +01:00
asofold ba5f710c83 Fix pre-checks for getHeight, use fail() rather. 2016-11-22 21:04:59 +01:00
asofold bf32406435 ReflectBlock: fix block shape access for 1.11. 2016-11-22 20:36:08 +01:00
asofold 12ce099eb1 [BLEEDING] Reflection module: access entity bounds/height etc.
This should fix more issues with horse type.
2016-11-22 19:25:13 +01:00