Skip to content

Commit

Permalink
Sync with Fabric API v0.90.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGlitch76 committed Oct 8, 2023
2 parents ebad84b + 16a9bc7 commit 24f621b
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
* Provides methods for modifying biomes. To create an instance, call
* {@link BiomeModifications#create(Identifier)}.
*
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
*
* @see BiomeModifications
* @deprecated Use Quilt Biome API's {@link org.quiltmc.qsl.worldgen.biome.api.BiomeModification} instead.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
/**
* Allows {@link Biome} properties to be modified.
*
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
*
* @deprecated Use Quilt Biome API's {@link org.quiltmc.qsl.worldgen.biome.api.BiomeModificationContext} instead.
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
*
* <p>Any modifications made to biomes will not be available for use in the demo level.
*
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
*
* @deprecated Use Quilt Biome API's {@link org.quiltmc.qsl.worldgen.biome.api.BiomeModifications} instead.
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
/**
* Provides several convenient biome selectors that can be used with {@link BiomeModifications}.
*
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
*
* @deprecated Use Quilt Biome API's {@link org.quiltmc.qsl.worldgen.biome.api.BiomeSelectors} instead.
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
* <li>Generic post-processing of biomes</li>
* </ol>
*
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
*
* @deprecated Use Quilt Biome API's {@link org.quiltmc.qsl.worldgen.biome.api.ModificationPhase} instead.
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
/**
* API that exposes the internals of Minecraft's nether biome code.
*
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
*
* @deprecated Use Quilt Biome API's {@link org.quiltmc.qsl.worldgen.biome.api.NetherBiomes} instead.
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
/**
* API that exposes some internals of the minecraft default biome source for The End.
*
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
* Because of the volatility of world generation in Minecraft 1.16, this API is marked experimental
* since it is likely to change in future Minecraft versions.
*
* @deprecated Use Quilt Biome API's {@link org.quiltmc.qsl.worldgen.biome.api.TheEndBiomes} instead.
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
* A provider to help with data-generation of dynamic registry objects,
* such as biomes, features, or message types.
*/
@ApiStatus.Experimental
public abstract class FabricDynamicRegistryProvider implements DataProvider {
private static final Logger LOGGER = LoggerFactory.getLogger(FabricDynamicRegistryProvider.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
/**
* This class allows the entries of {@linkplain ItemGroup item groups} to be modified by the events in {@link ItemGroupEvents}.
*/
@ApiStatus.Experimental
public class FabricItemGroupEntries implements ItemGroup.Entries {
private final ItemGroup.DisplayContext context;
private final List<ItemStack> displayStacks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ private LootTableEvents() {
}
});

/**
* This event can be used for post-processing after all loot tables have been loaded and modified by Fabric.
*/
public static final Event<Loaded> ALL_LOADED = EventFactory.createArrayBacked(Loaded.class, listeners -> (resourceManager, lootManager) -> {
for (Loaded listener : listeners) {
listener.onLootTablesLoaded(resourceManager, lootManager);
}
});

public interface Replace {
/**
* Replaces loot tables.
Expand Down Expand Up @@ -117,4 +126,14 @@ public interface Modify {
*/
void modifyLootTable(ResourceManager resourceManager, LootManager lootManager, Identifier id, LootTable.Builder tableBuilder, LootTableSource source);
}

public interface Loaded {
/**
* Called when all loot tables have been loaded and {@link LootTableEvents#REPLACE} and {@link LootTableEvents#MODIFY} have been invoked.
*
* @param resourceManager the server resource manager
* @param lootManager the loot manager
*/
void onLootTablesLoaded(ResourceManager resourceManager, LootManager lootManager);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@ private void applyLootTableEvents(ResourceManager resourceManager, LootManager l
});

this.keyToValue = newTables.build();
LootTableEvents.ALL_LOADED.invoker().onLootTablesLoaded(resourceManager, lootManager);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,13 @@ public void onInitialize() {
tableBuilder.modifyPools(poolBuilder -> poolBuilder.with(ItemEntry.builder(Items.EMERALD)));
}
});

LootTableEvents.ALL_LOADED.register((resourceManager, lootManager) -> {
LootTable blackWoolTable = lootManager.getLootTable(Blocks.BLACK_WOOL.getLootTableId());

if (blackWoolTable == LootTable.EMPTY) {
throw new AssertionError("black wool loot table should not be empty");
}
});
}
}
2 changes: 1 addition & 1 deletion fabric-message-api-v1/src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"quilted_fabric_message_api_v1.mixins.json",
"quilted_fabric_message_api_v1.client.mixins.json"
],
"fabric-api:module-lifecycle": "experimental",
"fabric-api:module-lifecycle": "stable",
"modmenu": {
"badges": [
"library"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
]
},
"mixin": "quilted_fabric_resource_conditions_api_v1.mixins.json",
"fabric-api:module-lifecycle": "experimental",
"fabric-api:module-lifecycle": "stable",
"modmenu": {
"badges": [
"library"
Expand Down
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.parallel=true
fabric.loom.multiProjectOptimisation=true

archivesBaseName=quilted_fabric_api
version=7.3.1
upstream_version=0.89.3
version=7.4.0
upstream_version=0.90.0
minecraft_version=1.20.1
yarn_version=+build.1
loader_version=0.20.2
Expand All @@ -16,7 +16,7 @@ prerelease=false
# The upstream version list. Each quilted module should aim to be compatible with them
fabric-api-base-version=0.4.30
fabric-api-lookup-api-v1-version=1.6.35
fabric-biome-api-v1-version=13.0.11
fabric-biome-api-v1-version=13.0.12
fabric-block-api-v1-version=1.0.10
fabric-block-view-api-v2-version=1.0.0
fabric-blockrenderlayer-v1-version=1.1.40
Expand All @@ -26,21 +26,21 @@ fabric-commands-v0-version=0.2.50
fabric-containers-v0-version=0.1.63
fabric-content-registries-v0-version=4.0.10
fabric-crash-report-info-v1-version=0.2.18
fabric-data-generation-api-v1-version=12.3.1
fabric-data-generation-api-v1-version=12.3.2
fabric-dimensions-v1-version=2.1.53
fabric-entity-events-v1-version=1.5.22
fabric-events-interaction-v0-version=0.6.1
fabric-events-lifecycle-v0-version=0.2.62
fabric-game-rule-api-v1-version=1.0.38
fabric-gametest-api-v1-version=1.2.12
fabric-item-api-v1-version=2.1.27
fabric-item-group-api-v1-version=4.0.10
fabric-item-group-api-v1-version=4.0.11
fabric-key-binding-api-v1-version=1.0.36
fabric-keybindings-v0-version=0.2.34
fabric-lifecycle-events-v1-version=2.2.21
fabric-loot-api-v2-version=1.1.39
fabric-loot-tables-v1-version=1.1.43
fabric-message-api-v1-version=5.1.7
fabric-loot-api-v2-version=1.2.0
fabric-loot-tables-v1-version=1.1.44
fabric-message-api-v1-version=5.1.8
fabric-mining-level-api-v1-version=2.1.49
fabric-model-loading-api-v1-version=1.0.2
fabric-models-v0-version=0.4.1
Expand All @@ -57,7 +57,7 @@ fabric-rendering-data-attachment-v1-version=0.3.36
fabric-rendering-fluids-v1-version=3.0.27
fabric-rendering-v0-version=1.1.48
fabric-rendering-v1-version=3.0.7
fabric-resource-conditions-api-v1-version=2.3.5
fabric-resource-conditions-api-v1-version=2.3.6
fabric-resource-loader-v0-version=0.11.9
fabric-screen-api-v1-version=2.0.7
fabric-screen-handler-api-v1-version=1.3.29
Expand Down

0 comments on commit 24f621b

Please sign in to comment.