Commit graph

1568 commits

Author SHA1 Message Date
Syst3ms
bcdd1296c3
Enchantment API (#3641)
* Enchantment API

* Rework EnchantmentHelperMixin

* Fix build

* Fix build again
2024-04-10 19:35:19 +01:00
modmuss
973934d742
Update to Loom 1.6 (#3666)
* Update to Loom 1.6

* Fix gradlew.bat line endings

* Fix build

* Another fix

* Revert change
2024-04-10 19:34:59 +01:00
modmuss50
f7c07d0cf6 Bump version 2024-03-18 09:24:29 +00:00
modmuss50
eb30349a4e Fix accidental typo. 2024-03-18 09:18:44 +00:00
apple502j
df798a89c5 Fix builtin resource pack having wrong ID 2024-03-18 09:17:30 +00:00
modmuss50
95a137205b Bump version 2024-02-25 13:50:14 +00:00
maityyy
09fc25012b
Fire the MOB_CONVERSION event after shearing the mushroom cow (#3612)
* Fire the MOB_CONVERSION event after shearing the mushroom cow

* checkstyle

* Add license header
2024-02-25 13:30:20 +00:00
Fabric Bot
58f8c01215
Translastion updates (#3605)
* New translations en_us.json (Spanish)

* New translations en_us.json (Bulgarian)

* New translations en_us.json (German)

* New translations en_us.json (Greek)

* New translations en_us.json (Finnish)

* New translations en_us.json (Japanese)

* New translations en_us.json (Korean)

* New translations en_us.json (Polish)

* New translations en_us.json (Swedish)

* New translations en_us.json (Turkish)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (Chinese Traditional)

* New translations en_us.json (Vietnamese)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Spanish, Mexico)

* New translations en_us.json (Estonian)

* New translations en_us.json (Tatar)

* New translations en_us.json (French)

* New translations en_us.json (Spanish)

* New translations en_us.json (Polish)

* New translations en_us.json (Russian)

* New translations en_us.json (Ukrainian)

* New translations en_us.json (Chinese Traditional)

* New translations en_us.json (Estonian)

* New translations en_us.json (Russian)

* New translations en_us.json (French)

* New translations en_us.json (Spanish)

* New translations en_us.json (Polish)

* New translations en_us.json (Russian)

* New translations en_us.json (Ukrainian)

* New translations en_us.json (Estonian)

* New translations en_us.json (Dutch)

* New translations en_us.json (Dutch)

* New translations en_us.json (Dutch)

* New translations en_us.json (Finnish)

* New translations en_us.json (Finnish)

* New translations en_us.json (Italian)

* New translations en_us.json (Italian)

* New translations en_us.json (Swedish)

* New translations en_us.json (German)

* New translations en_us.json (German)

* New translations en_us.json (German)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (German)
2024-02-25 13:30:08 +00:00
modmuss
892bf04af7
Setup crowdin (#3604) 2024-02-18 15:23:23 +00:00
modmuss50
1ce3b1e593 Bump version 2024-02-18 13:23:35 +00:00
modmuss
080016e424 Fix teal sign testmod crash by registering the wood type. (#3599)
(cherry picked from commit 98c5af8bcb)
2024-02-18 13:09:54 +00:00
Syst3ms
f9b333cc5c
Improve handling of empty item groups in the creative menu (#3600)
* 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
2024-02-18 13:04:01 +00:00
Syst3ms
c0751a9cc4 Remove unnecessary recreation of identifiers in VillagerTypeHelper.register (#3597) 2024-02-18 13:02:34 +00:00
PepperCode1
e761c6698e
Fluid rendering fixes (#3593)
* 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
2024-02-18 13:00:58 +00:00
modmuss50
6dfc9a786d Bump version 2024-02-12 18:07:18 +00:00
modmuss
b90db5748f
Fix empty data attachments being saved. (#3588)
* Fix empty data attachments being saved.

* Checkstyle
2024-02-12 18:01:13 +00:00
Jochen Jacobs
4e3ec63309
Fix data attachment testmod (#3586)
* fix data attachment testmod: use marker file to determine first/second launch

* fix typos

* one more typo
2024-02-12 15:36:50 +00:00
modmuss
03225c2601 Fix coverage task (#3583)
(cherry picked from commit 3335cde7ee)
2024-02-10 21:25:33 +00:00
modmuss50
2521adacaf Bump version 2024-02-09 17:57:44 +00:00
PepperCode1
6fd945a052
Add Support for Custom ColorResolvers (#3503)
* Add support for custom color resolvers

* Add ColorResolverRegistry

* Fix checkstyle

* Statically initialize all BiomeColorCaches
2024-02-09 14:05:48 +00:00
MrNavaStar
a67ffb5d0a
Add Save Events to Server Lifecycle Events (#3533)
* Add Server Begin Save and Server End Save event

* rename events

* add tests

* pass more params through
2024-02-09 14:05:34 +00:00
Jochen Jacobs
32782cfdc7
Extend Data Attachment API to ProtoChunk (#3548)
* 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
2024-02-09 14:05:03 +00:00
JellySquid
d74054c1e7
Expose a function for querying the non-default fluid renderer (#3558)
* 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>
2024-02-09 14:04:51 +00:00
modmuss50
369cf22d90 Bump version 2024-01-31 19:41:24 +00:00
apple502j
b66dcf78f1
Fix duplicate resource pack names (#3557) 2024-01-31 19:32:38 +00:00
modmuss50
43ddf4264d Bump version 2024-01-28 13:52:52 +00:00
TelepathicGrunt
3e2216cb03
Make chunk sections only convert vanilla air blocks to AIR (#3535)
* Make chunk sections only convert vanilla air blocks to AIR

* angry checkstyles calmed

* Comments added for future reference
2024-01-28 13:32:11 +00:00
apple502j
eabbae365d Fix TAGS_LOADED event not being invoked on client join 2024-01-28 13:00:30 +00:00
ErrorCraft
5c013344f0
Allow FabricCodecDataProvider to access dynamic registries (#3522)
* 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>
2024-01-28 12:56:09 +00:00
apple502j
707e4d1bfd
Refactor resource loader internals (#3473)
* 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>
2024-01-28 12:55:54 +00:00
modmuss50
bb7686d183 Bump version 2024-01-22 18:03:08 +00:00
deirn
2e5ac54849
send c:register packet for play phase instead of config (#3544) 2024-01-22 17:57:22 +00:00
modmuss50
31787236d2 Bump version 2024-01-19 11:19:20 +00:00
PepperCode1
0d29db7657
Add AtlasSourceTypeRegistry (#3504) 2024-01-19 11:14:49 +00:00
Syst3ms
25e1b4769d
Data Attachment API (#3476)
* 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>
2024-01-19 11:14:33 +00:00
modmuss50
502a698e69 Bump version 2024-01-17 18:04:56 +00:00
deirn
bf1eca5483
fix login network addon not properly initialized (#3531) 2024-01-17 17:55:42 +00:00
modmuss50
e572f21602 Bump version 2024-01-15 13:54:42 +00:00
modmuss
a438717a2c Update to loom 1.5 (#3515)
* Update to loom 1.5

* Continue to use the mixin AP for now.

* Bump

(cherry picked from commit 05ec3fa1a9)
2024-01-15 13:41:00 +00:00
Jared
85d85a93b5
Don't tick gametests if the server isn't ticking (#3528)
* Don't tick gametests if the server isn't ticking

* Fix import order
2024-01-15 13:40:07 +00:00
modmuss
d6f2b0841c
Stack aware getFoodComponent (#3520)
* Stack aware `getFoodComponent`

Co-authored-by: Phoupraw <50520903+phoupraw@users.noreply.github.com>

* Back to redirects

---------

Co-authored-by: Phoupraw <50520903+phoupraw@users.noreply.github.com>
2024-01-15 13:39:30 +00:00
Syst3ms
44c0f8c656
Add mob conversion event (#3511)
* Add mob conversion event

* spacing

* use a smarter mixin strategy

* add pig and villager lightning triggers

* tyop

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* handle tadpole -> frog conversion

- update javadoc to clarify the handled cases
- document keepEquipment parameter
- improve mixin handler names

---------

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
2024-01-15 13:39:14 +00:00
modmuss50
a462da68c6 Bump version 2024-01-11 20:47:56 +00:00
modmuss50
7eebb47af6 Exclude meta projects from main maven artifact.
This fixes being unable to depend on it in dev.
2024-01-11 20:46:52 +00:00
modmuss50
0fd1430e85 Bump version 2024-01-11 16:09:20 +00:00
Jason Penilla
679aae3c9a
add fabric-api-bom and fabric-api-catalog (#3487)
* feat: add fabric-api-bom and fabric-api-catalog

* spotlessApply

* Apply suggestions from code review

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>

---------

Co-authored-by: modmuss <modmuss50@gmail.com>
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2024-01-11 15:45:18 +00:00
deirn
b7e14635cf
fix local login query response handler not working (#3495) 2024-01-11 15:45:01 +00:00
ErrorCraft
a21facc05f
Add a system property for a custom output directory for gametest structures (#3509)
* 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>
2024-01-11 15:44:46 +00:00
Jonathan Coates
82b1bb3ec3
Check for the correct BE type in the lookup API (#3510)
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.
2024-01-11 15:44:32 +00:00
deirn
e8434230ce
fix jukebox state getting changed mid-transaction (#3517) 2024-01-11 15:44:19 +00:00