* Better handling of empty item groups in pagination
Empty/non-displayable item groups are now put after all other groups and only then are they split into pages.
* Serendipitious bugfix
Fixed an issue where empty item groups could get selected when switching pages
* checkstyle
* Fluid rendering fixes
- Fix default overlay block check using TransparentBlock instead of TranslucentBlock
- Fix setBlockTransparency/isBlockTransparent not being thread-safe
- Reuse the same render handler objects for water and lava
* Fix implementation issues
- Fix custom geometry being buffered twice if FluidRenderHandler#renderFluid is invoked directly
- Fix calling FluidRenderHandler.super.renderFluid not using passed arguments to calculate color
- Fix calling FluidRenderHandler.super.renderFluid more than once producing incorrect geometry
- Fix fluids with no handler never receiving water overlay instead of using default behavior
* Add way to render fluid with non-vanilla default
- Fix testmod
* allow data-attachment on ProtoChunks
- moved interfaceInjection from WorldChunk to Chunk
- dataAttachment saving on ProtoChunks in ChunkSerializer
- copy attachment from ProtoChunk to WorldChunk on creation.
- make WrapperProtoChunk wrap attachment calls to WorldChunk
* add test for data-attachment on ProtoChunks, and extend testmod.
* code style and license headers
* fix typos in javadoc
* extend testmod to test setting attachment during worldgen.
* code formatting
* fix testmod: don't crash when feature isn't placed (i.e. on GameTest server)
* add warning when adding persistent attachment to chunk with status EMPTY.
* update javadoc
* update javadoc to reference ServerLivingEntityEvents#MOB_CONVERSION
* Expose a function for querying the non-default fluid renderer
* Do not register default handlers as overrides
* Add @Nullable to getOverride
* Add @Nullable to get
---------
Co-authored-by: modmuss50 <modmuss50@gmail.com>
* Add CompletableFuture to FabricCodecDataProvider
* Deprecate the old method and constructor, and fix the style
* Fix the style for real this time
* Add exceptions to the configure methods
* Apply suggestions from code review
---------
Co-authored-by: modmuss <modmuss50@gmail.com>
* First step toward fixing resource pack grouping
* Placeholder pack and pack dependency
* Various fixes
* Fix wrong variable in serialization code
* Hide packs in PackScreen and DatapackCommand
* Apparently Japanese people aren't alone in having their currency signs used as special chars...
* Inject directly to Pack
* Add temporary logging, fix bug
* Add proper sorting
* Improve logging
* Fix duplicate name registration
* Fix client pack handling
* Fix FMJ
* Stop using interface injection for internal interface
* Delete unused GroupResourcePack
* Move refreshAutoEnabledPacks to util
* Improve logging
* Make a few things private
* Use vanilla metadata serialization logic
* Improve javadoc
* Add junit test
* Some final refactors
* Update ja_jp.json
---------
Co-authored-by: modmuss <modmuss50@gmail.com>
* Data Attachment API
* javadoc
* Remove AttachmentSerializer & independent syncability and persistence
- removed AttachmentSerializer in favor of codecs
- renamed serializability to "persistence"
- made persistence and syncability independent switches
- reworked convenience registry methods to use Suppliers from the get-go
* Move some serialization-related methods to impl
- changed logger name
* rename Attachment to AttachmentType
* Added DefaultedAttachmentType and reworded Javadoc
* add warning in getAttached
* javadoc
* fix defaulted API
* Add unit tests
* remove DefaultedAttachmentType, add helper methods
bikeshedding inbound
* add more unit tests
* add testmod
it works
* stash syncing for a further PR
* missed license header
* address most reviews
* more reviews
* naming convention
* fix tyop
* fix invalid file name error
* simplify API in the absence of sync
It was established that the presence of a codec might be useful for other things than persistence, and while this seems to couple the two, the API can be changed later in a backward-compatible way if need be.
* couple codec with persistence
committing to the change I mentioned previously
* little fixes
* Fix mixins + requests
- Copy attachments on entity copy,& with a customizable flag in the case of player respawn
- Call relevant change-notifying methods when calling setAttached on BEs and chunks
- Change persistence key
- Fix mixin visibility
* Write tests for entity copy
* replace mixin by COPY_FROM event
* missed license header
* more advanced copy mechanics
- attachments require an EntityCopyHandler to be copied across entities
- a copy handler is automatically derived if there's a codec
- updated javadoc for chunk and BE targets
* Revert "more advanced copy mechanics"
This reverts commit 3f53b554fb.
* replaced complicated API by a stern warning
- also handled cross-world entity teleportation
* add gametest
* fix compilation
* flipped boolean
* forgot some more bools to flip
* requests
* fix FMJ
* fix BE mixin and add gametest
* add client player entity copying
* Use new mob conversion event
---------
Co-authored-by: modmuss <modmuss50@gmail.com>
* Add a check for the output directory in the test command
* Fix style and add a run configuration with the output directory set
* Update fabric-gametest-api-v1/build.gradle
---------
Co-authored-by: modmuss <modmuss50@gmail.com>
The block lookup API's registerForBlockEntities method currently just
registers the passed provider for each valid block for that block
entity.
However, in some situations (such as update suppression or a misbehaving
mod), the wrong block entity will be present for one of these blocks.
This means that the (incorrect) block entity will be passed off to the
provider. Providers (especially those registered with
registerForBlockEntity) will often blind-cast the supplied BE, leading
to crashes.
While the wrong BE being present is a bug, we should follow vanilla's
lead and handle this more gracefully. In this case, we just check
whether the correct BE type is present before forwarding it to the
main provider.