Commit graph

1668 commits

Author SHA1 Message Date
triphora
06e0e251a9
Implement a version of FabricDefaultAttributeRegistry#register that takes a DefaultAttributeContainer (#2589)
Refer to https://github.com/orgs/FabricMC/discussions/2587 for motivations :)
2022-11-07 18:30:06 +00:00
Technici4n
12bfe4ea1a
Add a block appearance API (#2579)
* Add block appearance API

* Add class javadoc for FabricBlock and FabricBlockState

* Address reviews

* Remove OverrideOnly from getAppearance

* Fix javadoc issues
2022-11-07 18:29:51 +00:00
Technici4n
a1d87cb885
Add AFTER_DEATH and ALLOW_DAMAGE events; generalise ALLOW_DEATH to living entities (#2573)
* Add AFTER_DEATH and ALLOW_DAMAGE events; generalise ALLOW_DEATH to living entities

* Make class final and constructor private

* player -> entity; clarify where ALLOW_DAMAGE is fired

* Also deprecate the old AllowDeath funcint
2022-11-07 18:29:39 +00:00
modmuss50
f75bcd18f3
22w44a (#2632)
Co-authored-by: Sebastian Hartte <shartte@users.noreply.github.com>
2022-11-03 13:48:27 +00:00
modmuss50
f5429c1aa0 Bump version 2022-10-28 20:23:27 +01:00
modmuss50
65727739fb Rename FabricDataGenerator.create to createPack 2022-10-28 20:13:56 +01:00
apple502j
9e19b0e12c
Resource Loader: use Text for display name (#2613) 2022-10-28 20:07:59 +01:00
apple502j
6ede1da9e0
Message API: update javadoc for 22w42a (#2605) 2022-10-28 18:26:52 +01:00
apple502j
51f6ee1127
Link to JOML/Jetbrains Annotations, update Guava link (#2614)
* Link to JOML, update Guava link

* Also add Jetbrains Annotations
2022-10-28 18:25:40 +01:00
apple502j
28e2c05fc9
1.19.3 resource loader changes (#2611)
* Fix CLIENT_RESOURCE_PACK_PROVIDER registration

* Mark FabricModResourcePack as always stable

* Fix warnings

* Fix use of deprecated loader API

* Fix yet another ResourcePack closing issue

* Make ResourceManagerHelper NonExtendable

* fix checkstyle
2022-10-28 18:25:08 +01:00
apple502j
33c37e23ce
22w42a RegSync changes (#2608)
* Fix DynamicRegistrySetupCallback, add EndDynamicRegistrySetupCallback

`DynamicRegistrySetupCallback` did not work as intended because the injection
was too late. This moves the injection point to `RegistryLoader`, just before it
is loaded.

`EndDynamicRegistrySetupCallback` is a new event triggered when the loading is
finished. This has access to the combined DRM, allowing context-aware modification.

This also replaces `System.out.println` use in testmod.

* Remove useless force-init of BiomeKeys

* Remove now-unnecessary DynamicRegistryManagerMixin

* Fix crash in testmod

This caveat needs proper documentation.

* Add note to javadoc

* Mark impl as internal

* Remove EndDynamicRegistrySetupCallback

* Fix testmod checkstyle issues

* Add automated event call check

* Fix test

* Update javadoc

* Add `@see`

* Re-run actions
2022-10-28 18:24:56 +01:00
modmuss50
11ba9c3b22
22w43a (#2610)
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
2022-10-26 20:48:38 +01:00
modmuss50
75e98211bd
22w42a 🐫 (#2599)
Co-authored-by: shartte <shartte@users.noreply.github.com>
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-10-22 20:38:33 +01:00
modmuss50
c9f64f5a6e Bump version 2022-10-18 14:00:15 +01:00
Salvatore Peluso
6064db2ac8
Add way to specify the PathNodeType for a block, add missing tests in content registries testmod. (#2519)
* Added LandPathNodeTypesRegistry.

* Added test for LandPathNodeTypesRegistry.

* Added block state to PathNodeTypeProvider.getPathNodeType.

* Made LandPathNodeTypesRegistry final, removed unnecessary NotNull.

* Changed putIfAbsent with put to align with other registries.

* Cleanup.

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>

* Removed unused import.

* Added possibility to specify the node type of block if the block is found in a neighbor position, improved documentation.

* Merged mixins cleanup.

* Changed CAPTURE_FAILEXCEPTION into CAPTURE_FAILHARD

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

* Specified some nullables, changed 2 parameter names.

* Added missing content registries tests, changed NODE_TYPES map to IdentityHashMap, improved docs.

* Moved PathNodeTypeProvider inside LandPathNodeTypesRegistry.

* Registry revised to make it possible to distinguish between blocks with dynamic and static node types, reduced LandPathNodeMakerMixin priority, applied suggested docs improvements.

* Changed INVOKE with shift, with INVOKE_ASSIGN.

* Merged all LandPathNodeTypesRegistry utility methods used to check the registration type into a single one.

* Inverted if sequence in LandPathNodeTypesRegistry.getPathNodeType, improved docs.

* Sealed PathNodeTypeProvider and made public, cleaned and simplified LandPathNodeTypesRegistry by removing useless mechanics.

* Improved docs.

* Improved docs (2).

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
2022-10-18 13:52:44 +01:00
Dalsu
70efcffe17
Create ko_kr translations for resource-loader and item-groups (#2591)
* Create ko_kr.json

* Create ko_kr.json
2022-10-18 13:51:36 +01:00
Yoosk
2146d97a24
Create pl_pl translation for resource-loader (#2590) 2022-10-18 13:51:28 +01:00
modmuss50
e2e7b8dd55 Bump versions 2022-10-16 15:44:09 +01:00
Technici4n
c0ae659db2
Skip adding out-of-bound sprites to SpriteFinderImpl (#2584) 2022-10-16 15:13:42 +01:00
Salvatore Peluso
0c4b8d3c28
Added it_it language. (#2581) 2022-10-16 15:11:56 +01:00
AlphaMode
aaaf9d3396
Change test LSHIFT keybind to RSHIFT (#2580) 2022-10-16 15:11:43 +01:00
Juuz
4dc4bb12a1
Update Finnish translation for resource loader (#2578) 2022-10-16 15:11:32 +01:00
Luligabi1
c2dd502822
Added Brazilian Portuguese translations (#2569) 2022-10-16 15:10:59 +01:00
altrisi
1a8f933a16
Create es_es translations for resource-loader and item-groups (#2568)
* Create `es_es` language file for `resource-loader`

* Create `es_es` language file for `item-groups`
2022-10-16 15:10:45 +01:00
Julienraptor01
4d7dbc2b02
French translation update (#2565)
* Update fr_fr.json

* Add creative tab page
2022-10-16 15:10:31 +01:00
apple502j
aae9039dc3
Resource conditions: support all tags (#2564)
* Resource conditions: support all tags

* Minor improvements; deprecate old methods

* Fix build?

* Add more tests, throw on null condition

* Add more javadoc

* Javadoc fixes
2022-10-16 15:10:20 +01:00
Jonathan Coates
c4f28df547
Add Sound API to allow sound instances to play custom audio streams (#2558)
* Allow sound instances to play custom audio streams

Adds a new interface FabricSoundInstance, which is injected into
vanilla's SoundInstance interface.

When loading an audio stream, the SoundSystem now calls
FabricSoundInstance.getAudioStream, allowing mods to provide their
own audio streams.

* Some post-review cleanup

 - Manually add the client sources as an interface injection source set,
   allowing us to put everything in the src/client dir (<3 modmuss50).

 - Apply some formatting changes from apple502j.

* Document the empty sound and its usage in sounds.json

* Fix one remaining @literal -> @code

* Fix checkstyle issues
2022-10-16 15:09:44 +01:00
Jonathan Coates
704e47e9d7
Create parent directory when writing test report (#2554)
* Create parent directory when writing test report

* Change access modifier to package-private

* Add a wee bit of documentation
2022-10-16 15:08:44 +01:00
modmuss50
bd290a2e19 Bump version.
Following last min merge.
2022-09-25 16:17:45 +01:00
modmuss50
73145abb31
Support namespaced armor textures. Fixes #96 (#2542) 2022-09-25 16:16:50 +01:00
modmuss50
ddcd25cd9e Bump versions. 2022-09-25 15:04:16 +01:00
Technici4n
a29562c81b
Fix @SafeVarargs warnings in Resource Conditions and ColorProviderRegistry (#2547) 2022-09-25 14:47:00 +01:00
modmuss50
c6af733cfb
Cleanup incorrect mixin shadow annotations/access 2022-09-25 14:46:29 +01:00
modmuss50
79adfe0a0e
Update Loom, Yarn, Checkstyle (#2538) 2022-09-25 14:46:02 +01:00
modmuss50
b598f4acf2
Add DataGeneratorEntrypoint.getEffectiveModId (#2534) 2022-09-25 14:45:43 +01:00
modmuss50
33ffe9ecd9
Add ServerEntityEvents.EquipmentChange event (#2533) 2022-09-25 14:45:29 +01:00
apple502j
93d8cb82e8
Fix many javadoc issues (#2526)
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-09-25 14:45:12 +01:00
J. Fronny
03bf91853d
ModNioResourcePack: don't extend AbstractFileResourcePack (#2509) 2022-09-25 14:44:52 +01:00
mineblock11
0b73465810
FabricLanguageProvider - Data Generation API (#2451)
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
2022-09-25 14:44:35 +01:00
modmuss50
a37366baa3 Bump versions. 2022-09-11 15:26:04 +01:00
modmuss50
624e468e8a Revert "Add LandPathNodeTypesRegistry (#2437)"
This reverts commit 6a999b8eb9.
2022-09-11 15:02:15 +01:00
Technici4n
8f88597368
Transfer API improvements 4 (#2375)
* Transfer API improvements 4

* Actually copy the nbt in `copyOrCreateNbt`

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

* Add SingleFluidStorage.withFixedCapacity

* Remove unneeded iterator() overrides

* Add temporary workaround for bottle sounds

* Address review comments

* Change parameter name from compound to nbt

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
2022-09-11 14:20:47 +01:00
wafflecoffee
2b0146fe54
Update Modrinth plugin version (#2082)
* Update Modrinth plugin version from 1.1.0 to 2.4.3

* Fix checkVersion task
2022-09-11 14:19:21 +01:00
apple502j
4e8ca3fd38
Item Group API: refactor & add more javadoc (#2518)
* Item Group API: add more javadoc

* Code refactor
2022-09-11 14:17:50 +01:00
Benonardo
726b65209a
Fix crash when replacing SimpleRegistry contents (#2504)
* Fix crash when replacing SimpleRegistry contents

* Called .value() two more times
2022-09-11 14:16:32 +01:00
2ndDerivative
763dcebeb6
Added doc to SculkSensorRegistry (#2490)
* Added line to Doc to prevent misconception

Added line because people probably want to use their GameEvent for the Warden too.

* Update SculkSensorFrequencyRegistry.java
2022-09-11 14:15:53 +01:00
apple502j
0dd10df6d4
Refactor Dimension API and fix a bug (#2486)
* Refactor dimension API to use less static var

* Refactor test code

* Fix end spawn platform generation with non-player teleport

* Fix wrong cast

* Add and refactor tests

* Fix spotless

* Mark impl as internal
2022-09-11 14:15:00 +01:00
Salvatore Peluso
6a999b8eb9
Add LandPathNodeTypesRegistry (#2437)
* Added LandPathNodeTypesRegistry.

* Added test for LandPathNodeTypesRegistry.

* Added block state to PathNodeTypeProvider.getPathNodeType.

* Made LandPathNodeTypesRegistry final, removed unnecessary NotNull.

* Changed putIfAbsent with put to align with other registries.

* Cleanup.

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>

* Removed unused import.

* Added possibility to specify the node type of block if the block is found in a neighbor position, improved documentation.

* Merged mixins cleanup.

* Changed CAPTURE_FAILEXCEPTION into CAPTURE_FAILHARD

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

* Specified some nullables, changed 2 parameter names.

* Added missing content registries tests, changed NODE_TYPES map to IdentityHashMap, improved docs.

* Moved PathNodeTypeProvider inside LandPathNodeTypesRegistry.

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
2022-09-11 14:14:45 +01:00
apple502j
1cc24b1b0e Add overwriting screen handler factory (#2373)
This adds `FabricScreenHandlerFactory` (interface-injected to `NamedScreenHandlerFactory`).

This also fixes a crash when passing `SimpleNamedScreenHandlerFactory` that wraps a `ExtendedScreenHandlerFactory`. The mixin now un-wraps the factory.
2022-09-11 14:09:29 +01:00
Juuz
056269f0d8
Add publish checkstyle report action (#2514) 2022-09-09 12:45:06 +01:00