This commit is contained in:
modmuss50 2025-01-08 17:38:47 +00:00
parent 3e406e5282
commit 86c3a9f167
67 changed files with 154 additions and 160 deletions
deprecated
fabric-command-api-v1/src/main/resources
fabric-commands-v0/src/main/resources
fabric-convention-tags-v1/src/main/resources
fabric-keybindings-v0/src/client/resources
fabric-loot-api-v2/src/main/resources
fabric-rendering-data-attachment-v1/src/main/resources
fabric-api-base/src/main/resources
fabric-api-lookup-api-v1/src/main/resources
fabric-biome-api-v1/src/main
fabric-block-api-v1/src/main/resources
fabric-block-view-api-v2/src/main/resources
fabric-blockrenderlayer-v1/src/client/resources
fabric-client-gametest-api-v1/src/client
java/net/fabricmc/fabric/mixin/client/gametest
resources
fabric-client-tags-api-v1/src/client/resources
fabric-command-api-v2/src/main/resources
fabric-content-registries-v0/src/main/resources
fabric-convention-tags-v2/src
datagen/resources
main/resources
fabric-crash-report-info-v1/src/main/resources
fabric-data-attachment-api-v1/src/main/resources
fabric-data-generation-api-v1/src/main/resources
fabric-dimensions-v1/src/main/resources
fabric-entity-events-v1/src/main/resources
fabric-events-interaction-v0/src
client/java/net/fabricmc/fabric/mixin/event/interaction/client
main/resources
fabric-game-rule-api-v1/src/main/resources
fabric-gametest-api-v1/src/main/resources
fabric-item-api-v1/src
main/resources
testmod/java/net/fabricmc/fabric/test/item
fabric-item-group-api-v1/src/main/resources
fabric-key-binding-api-v1/src/client/resources
fabric-lifecycle-events-v1/src/main/resources
fabric-loot-api-v3/src/main/resources
fabric-message-api-v1/src/main/resources
fabric-model-loading-api-v1/src/client/resources
fabric-networking-api-v1/src/main/resources
fabric-object-builder-api-v1/src/main/resources
fabric-particles-v1/src/main/resources
fabric-recipe-api-v1/src/main/resources
fabric-registry-sync-v0/src/main/resources
fabric-renderer-api-v1/src
client
java/net/fabricmc/fabric/mixin/renderer/client
resources
testmodClient/java/net/fabricmc/fabric/test/renderer/client
fabric-renderer-indigo/src/client/resources
fabric-rendering-fluids-v1/src/main/resources
fabric-rendering-v1/src
client/resources
testmod/java/net/fabricmc/fabric/test/rendering
fabric-resource-conditions-api-v1/src/main/resources
fabric-resource-loader-v0/src/main/resources
fabric-screen-api-v1/src/client/resources
fabric-screen-handler-api-v1/src
main/resources
testmod/java/net/fabricmc/fabric/test/screenhandler/block
fabric-sound-api-v1/src/client/resources
fabric-tag-api-v1/src/main/resources
fabric-transfer-api-v1/src
main/resources
test/java/net/fabricmc/fabric/test/transfer/unittests
fabric-transitive-access-wideners-v1/src/main/resources
gradle.properties
src/main/resources

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-command-api-v2": "*"
},

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-command-api-v2": "*"
},

View file

@ -21,7 +21,7 @@
]
},
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"minecraft": ">=1.18.2"
},
"description": "Contains common tags used by mods for vanilla things.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-key-binding-api-v1": "*"
},
"description": "Keybinding registry API.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-resource-loader-v0": "*"
},

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-block-view-api-v2": "*"
},
"description": "Thread-safe hooks for block entity data use during terrain rendering.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Contains the essentials for Fabric API modules.",
"custom": {

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-lifecycle-events-v1": "*"
},

View file

@ -30,7 +30,7 @@ import net.minecraft.sound.BiomeAdditionsSound;
import net.minecraft.sound.BiomeMoodSound;
import net.minecraft.sound.MusicSound;
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.collection.Pool;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeEffects;
import net.minecraft.world.biome.BiomeParticleConfig;
@ -271,13 +271,13 @@ public interface BiomeModificationContext {
* @see BiomeEffects#getMusic()
* @see BiomeEffects.Builder#music(MusicSound)
*/
void setMusic(Optional<DataPool<MusicSound>> sound);
void setMusic(Optional<Pool<MusicSound>> sound);
/**
* @see BiomeEffects#getMusic()
* @see BiomeEffects.Builder#music(MusicSound)
*/
default void setMusic(@NotNull DataPool<MusicSound> sound) {
default void setMusic(@NotNull Pool<MusicSound> sound) {
setMusic(Optional.of(sound));
}
@ -286,7 +286,7 @@ public interface BiomeModificationContext {
* @see BiomeEffects.Builder#music(MusicSound)
*/
default void setMusic(@NotNull MusicSound sound) {
setMusic(DataPool.of(sound));
setMusic(Pool.method_66214(sound));
}
/**
@ -358,7 +358,7 @@ public interface BiomeModificationContext {
* @see SpawnSettings#getSpawnEntries(SpawnGroup)
* @see SpawnSettings.Builder#spawn(SpawnGroup, SpawnSettings.SpawnEntry)
*/
void addSpawn(SpawnGroup spawnGroup, SpawnSettings.SpawnEntry spawnEntry);
void addSpawn(SpawnGroup spawnGroup, SpawnSettings.SpawnEntry spawnEntry, int weight);
/**
* Removes any spawns matching the given predicate from this biome, and returns true if any matched.
@ -375,7 +375,7 @@ public interface BiomeModificationContext {
* @return True if any spawns were removed.
*/
default boolean removeSpawnsOfEntityType(EntityType<?> entityType) {
return removeSpawns((spawnGroup, spawnEntry) -> spawnEntry.type == entityType);
return removeSpawns((spawnGroup, spawnEntry) -> spawnEntry.type() == entityType);
}
/**

View file

@ -79,7 +79,7 @@ public final class BiomeModifications {
Preconditions.checkState(Registries.ENTITY_TYPE.getKey(entityType).isPresent(), "Unregistered entity type: %s", entityType);
create(id).add(ModificationPhase.ADDITIONS, biomeSelector, context -> {
context.getSpawnSettings().addSpawn(spawnGroup, new SpawnSettings.SpawnEntry(entityType, weight, minGroupSize, maxGroupSize));
context.getSpawnSettings().addSpawn(spawnGroup, new SpawnSettings.SpawnEntry(entityType, minGroupSize, maxGroupSize), weight);
});
}

View file

@ -26,6 +26,7 @@ import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnGroup;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.collection.Present;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.SpawnSettings;
import net.minecraft.world.dimension.DimensionOptions;
@ -147,8 +148,8 @@ public final class BiomeSelectors {
SpawnSettings spawnSettings = context.getBiome().getSpawnSettings();
for (SpawnGroup spawnGroup : SpawnGroup.values()) {
for (SpawnSettings.SpawnEntry spawnEntry : spawnSettings.getSpawnEntries(spawnGroup).getEntries()) {
if (entityTypes.contains(spawnEntry.type)) {
for (Present<SpawnSettings.SpawnEntry> spawnEntry : spawnSettings.getSpawnEntries(spawnGroup).getEntries()) {
if (entityTypes.contains(spawnEntry.value().type())) {
return true;
}
}

View file

@ -45,8 +45,8 @@ import net.minecraft.sound.BiomeAdditionsSound;
import net.minecraft.sound.BiomeMoodSound;
import net.minecraft.sound.MusicSound;
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.collection.Pool;
import net.minecraft.util.collection.Present;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeEffects;
import net.minecraft.world.biome.BiomeParticleConfig;
@ -189,7 +189,7 @@ public class BiomeModificationContextImpl implements BiomeModificationContext {
}
@Override
public void setMusic(Optional<DataPool<MusicSound>> sound) {
public void setMusic(Optional<Pool<MusicSound>> sound) {
effects.music = Objects.requireNonNull(sound);
}
@ -341,7 +341,7 @@ public class BiomeModificationContextImpl implements BiomeModificationContext {
private class SpawnSettingsContextImpl implements SpawnSettingsContext {
private final SpawnSettings spawnSettings = biome.getSpawnSettings();
private final EnumMap<SpawnGroup, List<SpawnSettings.SpawnEntry>> fabricSpawners = new EnumMap<>(SpawnGroup.class);
private final EnumMap<SpawnGroup, List<Present<SpawnSettings.SpawnEntry>>> fabricSpawners = new EnumMap<>(SpawnGroup.class);
SpawnSettingsContextImpl() {
unfreezeSpawners();
@ -374,7 +374,7 @@ public class BiomeModificationContextImpl implements BiomeModificationContext {
private void freezeSpawners() {
Map<SpawnGroup, Pool<SpawnSettings.SpawnEntry>> spawners = new HashMap<>(spawnSettings.spawners);
for (Map.Entry<SpawnGroup, List<SpawnSettings.SpawnEntry>> entry : fabricSpawners.entrySet()) {
for (Map.Entry<SpawnGroup, List<Present<SpawnSettings.SpawnEntry>>> entry : fabricSpawners.entrySet()) {
if (entry.getValue().isEmpty()) {
spawners.put(entry.getKey(), Pool.empty());
} else {
@ -395,11 +395,11 @@ public class BiomeModificationContextImpl implements BiomeModificationContext {
}
@Override
public void addSpawn(SpawnGroup spawnGroup, SpawnSettings.SpawnEntry spawnEntry) {
public void addSpawn(SpawnGroup spawnGroup, SpawnSettings.SpawnEntry spawnEntry, int weight) {
Objects.requireNonNull(spawnGroup);
Objects.requireNonNull(spawnEntry);
fabricSpawners.get(spawnGroup).add(spawnEntry);
fabricSpawners.get(spawnGroup).add(new Present<>(spawnEntry, weight));
}
@Override
@ -407,7 +407,7 @@ public class BiomeModificationContextImpl implements BiomeModificationContext {
boolean anyRemoved = false;
for (SpawnGroup group : SpawnGroup.values()) {
if (fabricSpawners.get(group).removeIf(entry -> predicate.test(group, entry))) {
if (fabricSpawners.get(group).removeIf(entry -> predicate.test(group, entry.value()))) {
anyRemoved = true;
}
}

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"minecraft": ">=1.16.2"
},
"description": "Hooks for adding biomes to the default world generator.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"entrypoints": {
},

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Hooks for block views",
"mixins": [

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"minecraft": ">=1.15-alpha.19.38.b",
"fabric-api-base": "*"
},

View file

@ -89,8 +89,8 @@ public abstract class WindowMixin implements WindowHooks {
@Inject(method = "<init>", at = @At("RETURN"))
private void onInit(WindowEventHandler eventHandler, MonitorTracker monitorTracker, WindowSettings settings, @Nullable String fullscreenVideoMode, String title, CallbackInfo ci) {
this.defaultWidth = settings.width;
this.defaultHeight = settings.height;
this.defaultWidth = settings.width();
this.defaultHeight = settings.height();
this.realWidth = this.width;
this.realHeight = this.height;
this.realFramebufferWidth = this.framebufferWidth;

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-resource-loader-v0": "*"
},
"description": "Allows registration of client game tests.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Adds the ability to load tags from the local mods.",
"custom": {

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"minecraft": ">1.19-alpha.22.11.a"
},

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-lifecycle-events-v1": "*",
"fabric-resource-loader-v0": "*"

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"minecraft": ">=1.18.2"
},
"description": "Contains common tags used by mods for vanilla things.",

View file

@ -21,7 +21,7 @@
]
},
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"minecraft": ">=1.20.5-beta.1",
"fabric-lifecycle-events-v1": "*"
},

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Adds Fabric-related debug info to crash reports.",
"mixins": [

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-entity-events-v1": "*",
"fabric-object-builder-api-v1": "*",
"fabric-networking-api-v1": "*"

View file

@ -186,6 +186,7 @@ transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator createAxisRotatedBlockState (Lnet/minecraft/block/Block;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/data/BlockStateSupplier;
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator registerAxisRotated (Lnet/minecraft/block/Block;Lnet/minecraft/client/data/TexturedModel$Factory;Lnet/minecraft/client/data/TexturedModel$Factory;)V
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator registerCreakingHeart (Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator method_66528 (Lnet/minecraft/client/data/TexturedModel$Factory;Lnet/minecraft/block/Block;Ljava/lang/String;)Lnet/minecraft/util/Identifier;
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator createSubModel (Lnet/minecraft/block/Block;Ljava/lang/String;Lnet/minecraft/client/data/Model;Ljava/util/function/Function;)Lnet/minecraft/util/Identifier;
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator createPressurePlateBlockState (Lnet/minecraft/block/Block;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/data/BlockStateSupplier;
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator createSlabBlockState (Lnet/minecraft/block/Block;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/data/BlockStateSupplier;
@ -220,7 +221,9 @@ transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator uploadParticleModel (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;)Lnet/minecraft/util/Identifier;
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator registerBuiltin (Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator registerWoolAndCarpet (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator method_66529 (Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator registerFlowerbed (Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator method_66526 (Lnet/minecraft/block/Block;Lnet/minecraft/state/property/IntProperty;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)V
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator registerRandomHorizontalRotations (Lnet/minecraft/client/data/TexturedModel$Factory;[Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator registerSouthDefaultHorizontalFacing (Lnet/minecraft/client/data/TexturedModel$Factory;[Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/client/data/BlockStateModelGenerator registerGlassAndPane (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;)V
@ -318,7 +321,6 @@ transitive-accessible method net/minecraft/data/loottable/BlockLootTableGenerato
transitive-accessible method net/minecraft/data/loottable/BlockLootTableGenerator seagrassDrops (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/loottable/BlockLootTableGenerator tallPlantDrops (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/loottable/BlockLootTableGenerator candleDrops (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/loottable/BlockLootTableGenerator flowerbedDrops (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/loottable/BlockLootTableGenerator candleCakeDrops (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/loottable/BlockLootTableGenerator generate ()V
transitive-accessible method net/minecraft/data/loottable/BlockLootTableGenerator addVinePlantDrop (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;)V

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-tag-api-v1": "*"
},
"description": "Allows for automatic data generation.",

View file

@ -15,7 +15,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"minecraft": ">=1.16-rc.3",
"fabric-api-base": "*"
},

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Events to hook into entities.",
"mixins": [

View file

@ -44,7 +44,6 @@ import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.GameMode;
import net.minecraft.world.World;
import net.fabricmc.fabric.api.event.client.player.ClientPlayerBlockBreakEvents;
@ -61,17 +60,15 @@ public abstract class ClientPlayerInteractionManagerMixin {
@Shadow
@Final
private ClientPlayNetworkHandler networkHandler;
@Shadow
private GameMode gameMode;
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/world/GameMode;isCreative()Z", ordinal = 0), method = "attackBlock", cancellable = true)
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;getAbilities()Lnet/minecraft/entity/player/PlayerAbilities;", ordinal = 0), method = "attackBlock", cancellable = true)
public void attackBlock(BlockPos pos, Direction direction, CallbackInfoReturnable<Boolean> info) {
fabric_fireAttackBlockCallback(pos, direction, info);
}
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/world/GameMode;isCreative()Z", ordinal = 0), method = "updateBlockBreakingProgress", cancellable = true)
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;getAbilities()Lnet/minecraft/entity/player/PlayerAbilities;", ordinal = 0), method = "updateBlockBreakingProgress", cancellable = true)
public void method_2902(BlockPos pos, Direction direction, CallbackInfoReturnable<Boolean> info) {
if (gameMode.isCreative()) {
if (this.client.player.getAbilities().creativeMode) {
fabric_fireAttackBlockCallback(pos, direction, info);
}
}

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-networking-api-v1": "*",
"minecraft": ">=1.15-alpha.19.37.a"

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Allows registration of custom game rules.",
"mixins": [

View file

@ -21,7 +21,7 @@
]
},
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-resource-loader-v0": "*"
},
"description": "Allows registration of custom game tests.",

View file

@ -23,7 +23,7 @@
}
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*"
},
"description": "Hooks for items",

View file

@ -18,7 +18,6 @@ package net.fabricmc.fabric.test.item;
import java.util.Map;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.equipment.ArmorMaterial;
import net.minecraft.item.equipment.EquipmentAssetKeys;
@ -39,7 +38,7 @@ public class ArmorKnockbackResistanceTest implements ModInitializer {
@Override
public void onInitialize() {
RegistryKey<Item> registryKey = RegistryKey.of(RegistryKeys.ITEM, Identifier.of("fabric-item-api-v1-testmod", "wooden_boots"));
Registry.register(Registries.ITEM, registryKey, new ArmorItem(WOOD_ARMOR, EquipmentType.BOOTS, new Item.Settings().registryKey(registryKey)));
Registry.register(Registries.ITEM, registryKey, new Item(new Item.Settings().method_66332(WOOD_ARMOR, EquipmentType.BOOTS).registryKey(registryKey)));
}
private static ArmorMaterial createTestArmorMaterial() {

View file

@ -23,7 +23,6 @@ import net.minecraft.enchantment.Enchantments;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.PickaxeItem;
import net.minecraft.item.ToolMaterial;
import net.minecraft.network.codec.PacketCodecs;
import net.minecraft.potion.Potions;
@ -75,9 +74,9 @@ public class CustomDamageTest implements ModInitializer {
}));
}
public static class WeirdPick extends PickaxeItem {
public static class WeirdPick extends Item {
protected WeirdPick(RegistryKey<Item> registryKey) {
super(ToolMaterial.GOLD, 3f, 5f, new Item.Settings().customDamage(WEIRD_DAMAGE_HANDLER).registryKey(registryKey));
super(new Item.Settings().method_66330(ToolMaterial.GOLD, 3f, 5f).customDamage(WEIRD_DAMAGE_HANDLER).registryKey(registryKey));
}
@Override

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-resource-loader-v0": "*"
},

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Key Binding registry API.",
"mixins": [

View file

@ -31,7 +31,7 @@
}
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*"
},
"description": "Events for the game's lifecycle.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-resource-loader-v0": "*"
},

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*"
},
"description": "Adds message-related hooks.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*"
},
"description": "Provides hooks for model loading.",

View file

@ -26,7 +26,7 @@
},
"accessWidener": "fabric-networking-api-v1.accesswidener",
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*"
},
"description": "Low-level, vanilla protocol oriented networking hooks.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*"
},
"description": "Builders for objects vanilla has locked down.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Hooks for registering custom particles.",
"mixins": [

View file

@ -20,7 +20,7 @@
],
"accessWidener": "fabric-recipe-api-v1.accesswidener",
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-networking-api-v1": "*"
},
"entrypoints": {

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-networking-api-v1": "*"
},

View file

@ -31,8 +31,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.block.BlockState;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.render.model.WeightedBakedModel;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.collection.Weighted;
import net.minecraft.util.collection.Pool;
import net.minecraft.util.collection.Present;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.random.Random;
@ -45,15 +45,15 @@ import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
abstract class WeightedBakedModelMixin implements FabricBakedModel {
@Shadow
@Final
private DataPool<BakedModel> models;
private Pool<BakedModel> models;
@Unique
private boolean isVanilla = true;
@Inject(at = @At("RETURN"), method = "<init>")
private void onInit(DataPool<BakedModel> dataPool, CallbackInfo ci) {
for (Weighted.Present<BakedModel> model : models.getEntries()) {
if (!model.data().isVanillaAdapter()) {
private void onInit(Pool<BakedModel> dataPool, CallbackInfo ci) {
for (Present<BakedModel> model : models.getEntries()) {
if (!model.value().isVanillaAdapter()) {
isVanilla = false;
break;
}
@ -67,7 +67,7 @@ abstract class WeightedBakedModelMixin implements FabricBakedModel {
@Override
public void emitBlockQuads(QuadEmitter emitter, BlockRenderView blockView, BlockState state, BlockPos pos, Supplier<Random> randomSupplier, Predicate<@Nullable Direction> cullTest) {
BakedModel selected = this.models.getDataOrEmpty(randomSupplier.get()).orElse(null);
BakedModel selected = this.models.getOrEmpty(randomSupplier.get()).orElse(null);
if (selected != null) {
selected.emitBlockQuads(emitter, blockView, state, pos, () -> {
@ -80,7 +80,7 @@ abstract class WeightedBakedModelMixin implements FabricBakedModel {
@Override
public void emitItemQuads(QuadEmitter emitter, Supplier<Random> randomSupplier) {
BakedModel selected = this.models.getDataOrEmpty(randomSupplier.get()).orElse(null);
BakedModel selected = this.models.getOrEmpty(randomSupplier.get()).orElse(null);
if (selected != null) {
selected.emitItemQuads(emitter, () -> {

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"minecraft": ">=1.15-alpha.19.39.a",
"fabric-api-base": "*"
},

View file

@ -30,7 +30,7 @@ import net.minecraft.client.render.model.MultipartBakedModel;
import net.minecraft.client.render.model.WeightedBakedModel;
import net.minecraft.client.render.model.json.ModelTransformation;
import net.minecraft.client.texture.Sprite;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.collection.Pool;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.random.Random;
@ -72,7 +72,7 @@ public class RandomSupplierTest implements ClientModInitializer {
private static WeightedBakedModel createWeightedBakedModel() {
var checkingModel = new RandomCheckingBakedModel();
DataPool.Builder<BakedModel> weightedBuilder = DataPool.builder();
Pool.Builder<BakedModel> weightedBuilder = Pool.method_66215();
weightedBuilder.add(checkingModel, 1);
weightedBuilder.add(checkingModel, 2);
@ -81,7 +81,7 @@ public class RandomSupplierTest implements ClientModInitializer {
new MultipartBakedModel.Selector(state -> true, weighted),
new MultipartBakedModel.Selector(state -> true, weighted)));
DataPool.Builder<BakedModel> weightedAgainBuilder = DataPool.builder();
Pool.Builder<BakedModel> weightedAgainBuilder = Pool.method_66215();
weightedAgainBuilder.add(multipart, 1);
weightedAgainBuilder.add(multipart, 2);

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"minecraft": ">=1.15-alpha.19.39.a",
"fabric-api-base": "*",
"fabric-renderer-api-v1": "*"

View file

@ -15,7 +15,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*"
},
"description": "Hooks for registering fluid renders.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*"
},
"description": "Hooks and registries for rendering-related things.",

View file

@ -19,7 +19,6 @@ package net.fabricmc.fabric.test.rendering;
import java.util.Map;
import java.util.Optional;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.equipment.ArmorMaterial;
@ -42,7 +41,7 @@ public class TooltipComponentTestInit implements ModInitializer {
public static final ArmorMaterial TEST_ARMOR_MATERIAL = createTestArmorMaterial();
public static final RegistryKey<Item> CUSTOM_ARMOR_ITEM_KEY = RegistryKey.of(RegistryKeys.ITEM, Identifier.of("fabric-rendering-v1-testmod", "test_chest"));
public static final Item CUSTOM_ARMOR_ITEM = new ArmorItem(TEST_ARMOR_MATERIAL, EquipmentType.CHESTPLATE, new Item.Settings().registryKey(CUSTOM_ARMOR_ITEM_KEY));
public static final Item CUSTOM_ARMOR_ITEM = new Item(new Item.Settings().method_66332(TEST_ARMOR_MATERIAL, EquipmentType.CHESTPLATE).registryKey(CUSTOM_ARMOR_ITEM_KEY));
@Override
public void onInitialize() {

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Allows conditionally loading resources.",
"entrypoints": {

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Asset and data resource loading.",
"mixins": [

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*"
},
"description": "Adds screen related hooks.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-networking-api-v1": "*"
},

View file

@ -26,6 +26,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.Inventory;
import net.minecraft.screen.NamedScreenHandlerFactory;
import net.minecraft.screen.ScreenHandler;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.ActionResult;
import net.minecraft.util.ItemScatterer;
import net.minecraft.util.hit.BlockHitResult;
@ -66,17 +67,15 @@ public class BoxBlock extends BlockWithEntity {
}
@Override
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
if (state.getBlock() != newState.getBlock()) {
BlockEntity be = world.getBlockEntity(pos);
public void method_66388(BlockState state, ServerWorld world, BlockPos pos, boolean moved) {
BlockEntity be = world.getBlockEntity(pos);
if (be instanceof Inventory) {
ItemScatterer.spawn(world, pos, (Inventory) be);
world.updateComparators(pos, this);
}
super.onStateReplaced(state, world, pos, newState, moved);
if (be instanceof Inventory) {
ItemScatterer.spawn(world, pos, (Inventory) be);
world.updateComparators(pos, this);
}
super.method_66388(state, world, pos, moved);
}
@Override

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"minecraft": ">=1.19.2"
},
"description": "Hooks for modifying Minecraft's sound system.",

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-resource-loader-v0": "*"
},

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"fabric-api-lookup-api-v1": "*",
"fabric-rendering-fluids-v1": "*"
},

View file

@ -151,7 +151,7 @@ public class SingleVariantItemStorageTests extends AbstractTransferApiTest {
NbtCompound nbt = new NbtCompound();
storage.writeNbt(nbt, staticDrm());
assertEquals("{amount:1L,variant:{components:{\"minecraft:custom_name\":'\"test name\"'},item:\"minecraft:diamond\"}}", nbt.toString());
assertEquals("{amount:1L,variant:{components:{\"minecraft:custom_name\":\"test name\"},item:\"minecraft:diamond\"}}", nbt.toString());
}
@Test

View file

@ -181,7 +181,6 @@ transitive-accessible method net/minecraft/block/EndRodBlock <init> (Lnet/minecr
transitive-accessible method net/minecraft/block/EnderChestBlock <init> (Lnet/minecraft/block/AbstractBlock$Settings;)V
transitive-accessible method net/minecraft/block/FarmlandBlock <init> (Lnet/minecraft/block/AbstractBlock$Settings;)V
transitive-accessible method net/minecraft/block/FletchingTableBlock <init> (Lnet/minecraft/block/AbstractBlock$Settings;)V
transitive-accessible method net/minecraft/block/FlowerbedBlock <init> (Lnet/minecraft/block/AbstractBlock$Settings;)V
transitive-accessible method net/minecraft/block/FluidBlock <init> (Lnet/minecraft/fluid/FlowableFluid;Lnet/minecraft/block/AbstractBlock$Settings;)V
transitive-accessible method net/minecraft/block/FungusBlock <init> (Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/block/Block;Lnet/minecraft/block/AbstractBlock$Settings;)V
transitive-accessible method net/minecraft/block/FurnaceBlock <init> (Lnet/minecraft/block/AbstractBlock$Settings;)V
@ -243,7 +242,6 @@ transitive-accessible method net/minecraft/block/WetSpongeBlock <init> (Lnet/min
transitive-accessible method net/minecraft/block/WitherSkullBlock <init> (Lnet/minecraft/block/AbstractBlock$Settings;)V
# Constructors of non-abstract item classes
transitive-accessible method net/minecraft/item/MiningToolItem <init> (Lnet/minecraft/item/ToolMaterial;Lnet/minecraft/registry/tag/TagKey;FFLnet/minecraft/item/Item$Settings;)V
# Private tracked data related methods of DisplayEntity (plus its subclasses) and InteractionEntity
transitive-accessible method net/minecraft/entity/decoration/DisplayEntity getTransformation (Lnet/minecraft/entity/data/DataTracker;)Lnet/minecraft/util/math/AffineTransformation;

View file

@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9"
"fabricloader": ">=0.16.10"
},
"description": "Contains transitive access wideners that provide access to otherwise inaccessible Minecraft code.",
"accessWidener": "fabric-transitive-access-wideners-v1.accesswidener",

View file

@ -2,61 +2,61 @@ org.gradle.jvmargs=-Xmx2560M
org.gradle.parallel=true
version=0.114.1
minecraft_version=1.21.4
minecraft_version=25w02a
yarn_version=+build.1
loader_version=0.16.9
loader_version=0.16.10
installer_version=1.0.1
prerelease=false
curseforge_minecraft_version=1.21.4
prerelease=true
curseforge_minecraft_version=1.21.4-Snapshot
# Do not manually update, use the bumpversions task:
fabric-api-base-version=0.4.54
fabric-api-lookup-api-v1-version=1.6.86
fabric-biome-api-v1-version=15.0.6
fabric-block-api-v1-version=1.0.31
fabric-block-view-api-v2-version=1.0.19
fabric-blockrenderlayer-v1-version=2.0.8
fabric-client-gametest-api-v1-version=3.0.1
fabric-command-api-v1-version=1.2.62
fabric-command-api-v2-version=2.2.41
fabric-commands-v0-version=0.2.79
fabric-content-registries-v0-version=9.1.14
fabric-crash-report-info-v1-version=0.3.6
fabric-data-attachment-api-v1-version=1.4.6
fabric-data-generation-api-v1-version=22.2.5
fabric-dimensions-v1-version=4.0.10
fabric-entity-events-v1-version=2.0.12
fabric-events-interaction-v0-version=4.0.2
fabric-game-rule-api-v1-version=1.0.62
fabric-gametest-api-v1-version=2.0.21
fabric-item-api-v1-version=11.1.14
fabric-item-group-api-v1-version=4.1.23
fabric-key-binding-api-v1-version=1.0.56
fabric-keybindings-v0-version=0.2.54
fabric-lifecycle-events-v1-version=2.5.4
fabric-loot-api-v2-version=3.0.33
fabric-loot-api-v3-version=1.0.21
fabric-message-api-v1-version=6.0.25
fabric-model-loading-api-v1-version=4.2.1
fabric-networking-api-v1-version=4.3.9
fabric-object-builder-api-v1-version=18.0.8
fabric-particles-v1-version=4.0.14
fabric-recipe-api-v1-version=8.0.7
fabric-registry-sync-v0-version=6.1.4
fabric-renderer-api-v1-version=5.0.3
fabric-renderer-indigo-version=2.0.3
fabric-rendering-data-attachment-v1-version=0.3.57
fabric-rendering-fluids-v1-version=3.1.19
fabric-rendering-v1-version=10.1.2
fabric-resource-conditions-api-v1-version=5.0.13
fabric-resource-loader-v0-version=3.0.11
fabric-screen-api-v1-version=2.0.38
fabric-screen-handler-api-v1-version=1.3.111
fabric-sound-api-v1-version=1.0.32
fabric-tag-api-v1-version=1.0.2
fabric-transfer-api-v1-version=5.4.9
fabric-transitive-access-wideners-v1-version=6.3.2
fabric-convention-tags-v1-version=2.1.12
fabric-convention-tags-v2-version=2.10.2
fabric-client-tags-api-v1-version=1.1.29
fabric-api-base-version=0.4.55
fabric-api-lookup-api-v1-version=1.6.87
fabric-biome-api-v1-version=16.0.0
fabric-block-api-v1-version=1.0.32
fabric-block-view-api-v2-version=1.0.20
fabric-blockrenderlayer-v1-version=2.0.9
fabric-client-gametest-api-v1-version=3.0.2
fabric-command-api-v1-version=1.2.63
fabric-command-api-v2-version=2.2.42
fabric-commands-v0-version=0.2.80
fabric-content-registries-v0-version=9.1.15
fabric-crash-report-info-v1-version=0.3.7
fabric-data-attachment-api-v1-version=1.4.7
fabric-data-generation-api-v1-version=22.2.6
fabric-dimensions-v1-version=4.0.11
fabric-entity-events-v1-version=2.0.13
fabric-events-interaction-v0-version=4.0.3
fabric-game-rule-api-v1-version=1.0.63
fabric-gametest-api-v1-version=2.0.22
fabric-item-api-v1-version=11.1.15
fabric-item-group-api-v1-version=4.1.24
fabric-key-binding-api-v1-version=1.0.57
fabric-keybindings-v0-version=0.2.55
fabric-lifecycle-events-v1-version=2.5.5
fabric-loot-api-v2-version=3.0.34
fabric-loot-api-v3-version=1.0.22
fabric-message-api-v1-version=6.0.26
fabric-model-loading-api-v1-version=4.2.2
fabric-networking-api-v1-version=4.3.10
fabric-object-builder-api-v1-version=18.0.9
fabric-particles-v1-version=4.0.15
fabric-recipe-api-v1-version=8.0.8
fabric-registry-sync-v0-version=6.1.5
fabric-renderer-api-v1-version=5.0.4
fabric-renderer-indigo-version=2.0.4
fabric-rendering-data-attachment-v1-version=0.3.58
fabric-rendering-fluids-v1-version=3.1.20
fabric-rendering-v1-version=10.1.3
fabric-resource-conditions-api-v1-version=5.0.14
fabric-resource-loader-v0-version=3.0.12
fabric-screen-api-v1-version=2.0.39
fabric-screen-handler-api-v1-version=1.3.112
fabric-sound-api-v1-version=1.0.33
fabric-tag-api-v1-version=1.0.3
fabric-transfer-api-v1-version=5.4.10
fabric-transitive-access-wideners-v1-version=6.3.3
fabric-convention-tags-v1-version=2.1.13
fabric-convention-tags-v2-version=2.10.3
fabric-client-tags-api-v1-version=1.1.30

View file

@ -19,9 +19,9 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.16.9",
"fabricloader": ">=0.16.10",
"java": ">=21",
"minecraft": ">=1.21.4- <1.21.5-"
"minecraft": ">=1.21.5- <1.21.6-"
},
"description": "Core API module providing key hooks and intercompatibility features."
}