mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-21 10:48:18 -05:00
Update mod to Minecraft snapshot 24w44a (#4197)
* Update mod to Minecraft snapshot 24w44a * Bump version --------- Co-authored-by: modmuss50 <modmuss50@gmail.com>
This commit is contained in:
parent
fd37071f8b
commit
7feeb733ad
100 changed files with 500 additions and 582 deletions
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-command-api-v2": "*"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-command-api-v2": "*"
|
||||
},
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
]
|
||||
},
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.18.2"
|
||||
},
|
||||
"description": "Contains common tags used by mods for vanilla things.",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-key-binding-api-v1": "*"
|
||||
},
|
||||
"description": "Keybinding registry API.",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-resource-loader-v0": "*"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-block-view-api-v2": "*"
|
||||
},
|
||||
"description": "Thread-safe hooks for block entity data use during terrain rendering.",
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
]
|
||||
},
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.15-alpha.19.39.a",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-rendering-v1": "*"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Contains the essentials for Fabric API modules.",
|
||||
"custom": {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-lifecycle-events-v1": "*"
|
||||
},
|
||||
|
|
|
@ -30,6 +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.world.biome.Biome;
|
||||
import net.minecraft.world.biome.BiomeEffects;
|
||||
import net.minecraft.world.biome.BiomeParticleConfig;
|
||||
|
@ -270,14 +271,22 @@ public interface BiomeModificationContext {
|
|||
* @see BiomeEffects#getMusic()
|
||||
* @see BiomeEffects.Builder#music(MusicSound)
|
||||
*/
|
||||
void setMusic(Optional<MusicSound> sound);
|
||||
void setMusic(Optional<DataPool<MusicSound>> sound);
|
||||
|
||||
/**
|
||||
* @see BiomeEffects#getMusic()
|
||||
* @see BiomeEffects.Builder#music(MusicSound)
|
||||
*/
|
||||
default void setMusic(@NotNull DataPool<MusicSound> sound) {
|
||||
setMusic(Optional.of(sound));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see BiomeEffects#getMusic()
|
||||
* @see BiomeEffects.Builder#music(MusicSound)
|
||||
*/
|
||||
default void setMusic(@NotNull MusicSound sound) {
|
||||
setMusic(Optional.of(sound));
|
||||
setMusic(DataPool.of(sound));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -287,6 +296,12 @@ public interface BiomeModificationContext {
|
|||
default void clearMusic() {
|
||||
setMusic(Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see BiomeEffects#method_65135()
|
||||
* @see BiomeEffects.Builder#method_65137(int)
|
||||
*/
|
||||
void setMusicVolume(float volume);
|
||||
}
|
||||
|
||||
interface GenerationSettingsContext {
|
||||
|
|
|
@ -45,6 +45,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;
|
||||
|
@ -188,9 +189,14 @@ public class BiomeModificationContextImpl implements BiomeModificationContext {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setMusic(Optional<MusicSound> sound) {
|
||||
public void setMusic(Optional<DataPool<MusicSound>> sound) {
|
||||
effects.music = Objects.requireNonNull(sound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMusicVolume(float volume) {
|
||||
effects.field_55050 = volume;
|
||||
}
|
||||
}
|
||||
|
||||
private class GenerationSettingsContextImpl implements GenerationSettingsContext {
|
||||
|
|
|
@ -35,6 +35,8 @@ accessible field net/minecraft/world/biome/BiomeEffects additionsSound Ljava/uti
|
|||
mutable field net/minecraft/world/biome/BiomeEffects additionsSound Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/biome/BiomeEffects music Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/biome/BiomeEffects music Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/biome/BiomeEffects field_55050 F
|
||||
mutable field net/minecraft/world/biome/BiomeEffects field_55050 F
|
||||
|
||||
# Spawn Settings / Density
|
||||
accessible field net/minecraft/world/biome/SpawnSettings creatureSpawnProbability F
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.16.2"
|
||||
},
|
||||
"description": "Hooks for adding biomes to the default world generator.",
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"sound": "minecraft:ambient.cave",
|
||||
"tick_delay": 6000
|
||||
},
|
||||
"music_volume": 1.0,
|
||||
"sky_color": 7907327,
|
||||
"water_color": 4159204,
|
||||
"water_fog_color": 329011
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"downfall": 0.4,
|
||||
"effects": {
|
||||
"fog_color": 12638463,
|
||||
"music_volume": 1.0,
|
||||
"sky_color": 7907327,
|
||||
"water_color": 4159204,
|
||||
"water_fog_color": 329011
|
||||
|
|
|
@ -14,12 +14,18 @@
|
|||
"sound": "minecraft:ambient.crimson_forest.mood",
|
||||
"tick_delay": 6000
|
||||
},
|
||||
"music": {
|
||||
"max_delay": 24000,
|
||||
"min_delay": 12000,
|
||||
"replace_current_music": false,
|
||||
"sound": "minecraft:music.nether.crimson_forest"
|
||||
},
|
||||
"music": [
|
||||
{
|
||||
"data": {
|
||||
"max_delay": 24000,
|
||||
"min_delay": 12000,
|
||||
"replace_current_music": false,
|
||||
"sound": "minecraft:music.nether.crimson_forest"
|
||||
},
|
||||
"weight": 1
|
||||
}
|
||||
],
|
||||
"music_volume": 1.0,
|
||||
"particle": {
|
||||
"options": {
|
||||
"type": "minecraft:crimson_spore"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"sound": "minecraft:ambient.cave",
|
||||
"tick_delay": 6000
|
||||
},
|
||||
"music_volume": 1.0,
|
||||
"sky_color": 0,
|
||||
"water_color": 4159204,
|
||||
"water_fog_color": 329011
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"sound": "minecraft:ambient.cave",
|
||||
"tick_delay": 6000
|
||||
},
|
||||
"music_volume": 1.0,
|
||||
"sky_color": 0,
|
||||
"water_color": 4159204,
|
||||
"water_fog_color": 329011
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"sound": "minecraft:ambient.cave",
|
||||
"tick_delay": 6000
|
||||
},
|
||||
"music_volume": 1.0,
|
||||
"sky_color": 0,
|
||||
"water_color": 4159204,
|
||||
"water_fog_color": 329011
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"entrypoints": {
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Hooks for block views",
|
||||
"mixins": [
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.15-alpha.19.38.b",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Adds the ability to load tags from the local mods.",
|
||||
"custom": {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"minecraft": ">1.19-alpha.22.11.a"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-lifecycle-events-v1": "*",
|
||||
"fabric-resource-loader-v0": "*"
|
||||
|
|
|
@ -24,7 +24,6 @@ import net.minecraft.registry.tag.BiomeTags;
|
|||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.BiomeKeys;
|
||||
import net.minecraft.world.biome.WinterDropBuiltinBiomes;
|
||||
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
|
||||
|
@ -97,7 +96,7 @@ public final class BiomeTagGenerator extends FabricTagProvider<Biome> {
|
|||
.add(BiomeKeys.OLD_GROWTH_BIRCH_FOREST);
|
||||
getOrCreateTagBuilder(ConventionalBiomeTags.IS_DARK_FOREST)
|
||||
.add(BiomeKeys.DARK_FOREST)
|
||||
.addOptional(WinterDropBuiltinBiomes.PALE_GARDEN);
|
||||
.add(BiomeKeys.PALE_GARDEN);
|
||||
getOrCreateTagBuilder(ConventionalBiomeTags.IS_OCEAN)
|
||||
.addOptionalTag(BiomeTags.IS_OCEAN)
|
||||
.addOptionalTag(ConventionalBiomeTags.IS_DEEP_OCEAN)
|
||||
|
@ -179,7 +178,7 @@ public final class BiomeTagGenerator extends FabricTagProvider<Biome> {
|
|||
.add(BiomeKeys.SWAMP)
|
||||
.add(BiomeKeys.STONY_SHORE)
|
||||
.add(BiomeKeys.DARK_FOREST)
|
||||
.addOptional(WinterDropBuiltinBiomes.PALE_GARDEN)
|
||||
.add(BiomeKeys.PALE_GARDEN)
|
||||
.add(BiomeKeys.WINDSWEPT_FOREST)
|
||||
.add(BiomeKeys.BIRCH_FOREST)
|
||||
.add(BiomeKeys.OLD_GROWTH_BIRCH_FOREST)
|
||||
|
@ -252,7 +251,7 @@ public final class BiomeTagGenerator extends FabricTagProvider<Biome> {
|
|||
|
||||
getOrCreateTagBuilder(ConventionalBiomeTags.IS_VEGETATION_DENSE_OVERWORLD)
|
||||
.add(BiomeKeys.DARK_FOREST)
|
||||
.addOptional(WinterDropBuiltinBiomes.PALE_GARDEN)
|
||||
.add(BiomeKeys.PALE_GARDEN)
|
||||
.add(BiomeKeys.OLD_GROWTH_BIRCH_FOREST)
|
||||
.add(BiomeKeys.OLD_GROWTH_SPRUCE_TAIGA)
|
||||
.add(BiomeKeys.JUNGLE)
|
||||
|
@ -285,7 +284,7 @@ public final class BiomeTagGenerator extends FabricTagProvider<Biome> {
|
|||
.add(BiomeKeys.FLOWER_FOREST)
|
||||
.add(BiomeKeys.BIRCH_FOREST)
|
||||
.add(BiomeKeys.DARK_FOREST)
|
||||
.addOptional(WinterDropBuiltinBiomes.PALE_GARDEN)
|
||||
.add(BiomeKeys.PALE_GARDEN)
|
||||
.add(BiomeKeys.OLD_GROWTH_BIRCH_FOREST);
|
||||
getOrCreateTagBuilder(ConventionalBiomeTags.IS_JUNGLE_TREE)
|
||||
.addOptionalTag(ConventionalBiomeTags.IS_JUNGLE);
|
||||
|
|
|
@ -447,6 +447,7 @@ public final class BlockTagGenerator extends FabricTagProvider.BlockTagProvider
|
|||
.addTag(ConventionalBlockTags.STORAGE_BLOCKS_RAW_GOLD)
|
||||
.addTag(ConventionalBlockTags.STORAGE_BLOCKS_RAW_IRON)
|
||||
.addTag(ConventionalBlockTags.STORAGE_BLOCKS_REDSTONE)
|
||||
.addTag(ConventionalBlockTags.STORAGE_BLOCKS_RESIN)
|
||||
.addTag(ConventionalBlockTags.STORAGE_BLOCKS_SLIME)
|
||||
.addTag(ConventionalBlockTags.STORAGE_BLOCKS_WHEAT);
|
||||
|
||||
|
@ -492,6 +493,9 @@ public final class BlockTagGenerator extends FabricTagProvider.BlockTagProvider
|
|||
getOrCreateTagBuilder(ConventionalBlockTags.STORAGE_BLOCKS_REDSTONE)
|
||||
.add(Blocks.REDSTONE_BLOCK);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalBlockTags.STORAGE_BLOCKS_RESIN)
|
||||
.add(Blocks.RESIN_BLOCK);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalBlockTags.STORAGE_BLOCKS_SLIME)
|
||||
.add(Blocks.SLIME_BLOCK);
|
||||
|
||||
|
|
|
@ -107,6 +107,7 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider {
|
|||
translationBuilder.add(ConventionalBlockTags.STORAGE_BLOCKS_RAW_GOLD, "Raw Gold Storage Blocks");
|
||||
translationBuilder.add(ConventionalBlockTags.STORAGE_BLOCKS_RAW_IRON, "Raw Iron Storage Blocks");
|
||||
translationBuilder.add(ConventionalBlockTags.STORAGE_BLOCKS_REDSTONE, "Redstone Storage Blocks");
|
||||
translationBuilder.add(ConventionalBlockTags.STORAGE_BLOCKS_RESIN, "Resin Storage Blocks");
|
||||
translationBuilder.add(ConventionalBlockTags.STORAGE_BLOCKS_SLIME, "Slime Storage Blocks");
|
||||
translationBuilder.add(ConventionalBlockTags.STORAGE_BLOCKS_WHEAT, "Wheat Storage Blocks");
|
||||
translationBuilder.add(ConventionalBlockTags.STRIPPED_LOGS, "Stripped Logs");
|
||||
|
@ -152,6 +153,7 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider {
|
|||
translationBuilder.add(ConventionalItemTags.ENCHANTABLES, "Enchantables");
|
||||
translationBuilder.add(ConventionalItemTags.BRICKS, "Bricks");
|
||||
translationBuilder.add(ConventionalItemTags.DUSTS, "Dusts");
|
||||
translationBuilder.add(ConventionalItemTags.CLUMPS, "Clumps");
|
||||
translationBuilder.add(ConventionalItemTags.GEMS, "Gems");
|
||||
translationBuilder.add(ConventionalItemTags.INGOTS, "Ingots");
|
||||
translationBuilder.add(ConventionalItemTags.NUGGETS, "Nuggets");
|
||||
|
@ -166,6 +168,7 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider {
|
|||
translationBuilder.add(ConventionalItemTags.COPPER_RAW_BLOCKS, "Raw Copper Blocks");
|
||||
translationBuilder.add(ConventionalItemTags.NORMAL_BRICKS, "Bricks");
|
||||
translationBuilder.add(ConventionalItemTags.NETHER_BRICKS, "Nether Bricks");
|
||||
translationBuilder.add(ConventionalItemTags.RESIN_BRICKS, "Resin Bricks");
|
||||
translationBuilder.add(ConventionalItemTags.IRON_INGOTS, "Iron Ingots");
|
||||
translationBuilder.add(ConventionalItemTags.GOLD_INGOTS, "Gold Ingots");
|
||||
translationBuilder.add(ConventionalItemTags.COPPER_INGOTS, "Copper Ingots");
|
||||
|
@ -182,6 +185,7 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider {
|
|||
translationBuilder.add(ConventionalItemTags.GOLD_NUGGETS, "Gold Nuggets");
|
||||
translationBuilder.add(ConventionalItemTags.REDSTONE_DUSTS, "Redstone Dusts");
|
||||
translationBuilder.add(ConventionalItemTags.GLOWSTONE_DUSTS, "Glowstone Dusts");
|
||||
translationBuilder.add(ConventionalItemTags.RESIN_CLUMPS, "Resin Clumps");
|
||||
translationBuilder.add(ConventionalItemTags.COAL, "Coal");
|
||||
translationBuilder.add(ConventionalItemTags.POTIONS, "Potions");
|
||||
translationBuilder.add(ConventionalItemTags.FOODS, "Foods");
|
||||
|
@ -299,6 +303,7 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider {
|
|||
translationBuilder.add(ConventionalItemTags.STORAGE_BLOCKS_RAW_GOLD, "Raw Gold Storage Blocks");
|
||||
translationBuilder.add(ConventionalItemTags.STORAGE_BLOCKS_RAW_IRON, "Raw Iron Storage Blocks");
|
||||
translationBuilder.add(ConventionalItemTags.STORAGE_BLOCKS_REDSTONE, "Redstone Storage Blocks");
|
||||
translationBuilder.add(ConventionalItemTags.STORAGE_BLOCKS_RESIN, "Resin Storage Blocks");
|
||||
translationBuilder.add(ConventionalItemTags.STORAGE_BLOCKS_SLIME, "Slime Storage Blocks");
|
||||
translationBuilder.add(ConventionalItemTags.STORAGE_BLOCKS_WHEAT, "Wheat Storage Blocks");
|
||||
translationBuilder.add(ConventionalItemTags.STRIPPED_LOGS, "Stripped Log Blocks");
|
||||
|
|
|
@ -154,6 +154,7 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider {
|
|||
copy(ConventionalBlockTags.STORAGE_BLOCKS_RAW_GOLD, ConventionalItemTags.STORAGE_BLOCKS_RAW_GOLD);
|
||||
copy(ConventionalBlockTags.STORAGE_BLOCKS_RAW_IRON, ConventionalItemTags.STORAGE_BLOCKS_RAW_IRON);
|
||||
copy(ConventionalBlockTags.STORAGE_BLOCKS_REDSTONE, ConventionalItemTags.STORAGE_BLOCKS_REDSTONE);
|
||||
copy(ConventionalBlockTags.STORAGE_BLOCKS_RESIN, ConventionalItemTags.STORAGE_BLOCKS_RESIN);
|
||||
copy(ConventionalBlockTags.STORAGE_BLOCKS_SLIME, ConventionalItemTags.STORAGE_BLOCKS_SLIME);
|
||||
copy(ConventionalBlockTags.STORAGE_BLOCKS_WHEAT, ConventionalItemTags.STORAGE_BLOCKS_WHEAT);
|
||||
|
||||
|
@ -440,10 +441,13 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider {
|
|||
// Categories
|
||||
getOrCreateTagBuilder(ConventionalItemTags.BRICKS)
|
||||
.addOptionalTag(ConventionalItemTags.NORMAL_BRICKS)
|
||||
.addOptionalTag(ConventionalItemTags.NETHER_BRICKS);
|
||||
.addOptionalTag(ConventionalItemTags.NETHER_BRICKS)
|
||||
.addOptionalTag(ConventionalItemTags.RESIN_BRICKS);
|
||||
getOrCreateTagBuilder(ConventionalItemTags.DUSTS)
|
||||
.addOptionalTag(ConventionalItemTags.GLOWSTONE_DUSTS)
|
||||
.addOptionalTag(ConventionalItemTags.REDSTONE_DUSTS);
|
||||
getOrCreateTagBuilder(ConventionalItemTags.CLUMPS)
|
||||
.addOptionalTag(ConventionalItemTags.RESIN_CLUMPS);
|
||||
getOrCreateTagBuilder(ConventionalItemTags.GEMS)
|
||||
.addOptionalTag(ConventionalItemTags.AMETHYST_GEMS)
|
||||
.addOptionalTag(ConventionalItemTags.DIAMOND_GEMS)
|
||||
|
@ -482,6 +486,8 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider {
|
|||
.add(Items.BRICK);
|
||||
getOrCreateTagBuilder(ConventionalItemTags.NETHER_BRICKS)
|
||||
.add(Items.NETHER_BRICK);
|
||||
getOrCreateTagBuilder(ConventionalItemTags.RESIN_BRICKS)
|
||||
.add(Items.RESIN_BRICK);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.IRON_INGOTS)
|
||||
.add(Items.IRON_INGOT);
|
||||
|
@ -513,6 +519,9 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider {
|
|||
getOrCreateTagBuilder(ConventionalItemTags.COAL)
|
||||
.addOptionalTag(ItemTags.COALS);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.RESIN_CLUMPS)
|
||||
.add(Items.RESIN_CLUMP);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.QUARTZ_ORES)
|
||||
.add(Items.NETHER_QUARTZ_ORE);
|
||||
getOrCreateTagBuilder(ConventionalItemTags.NETHERITE_SCRAP_ORES)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.18.2"
|
||||
},
|
||||
"description": "Contains common tags used by mods for vanilla things.",
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
"tag.block.c.storage_blocks.raw_gold": "Raw Gold Storage Blocks",
|
||||
"tag.block.c.storage_blocks.raw_iron": "Raw Iron Storage Blocks",
|
||||
"tag.block.c.storage_blocks.redstone": "Redstone Storage Blocks",
|
||||
"tag.block.c.storage_blocks.resin": "Resin Storage Blocks",
|
||||
"tag.block.c.storage_blocks.slime": "Slime Storage Blocks",
|
||||
"tag.block.c.storage_blocks.wheat": "Wheat Storage Blocks",
|
||||
"tag.block.c.stripped_logs": "Stripped Logs",
|
||||
|
@ -110,6 +111,7 @@
|
|||
"tag.item.c.bricks": "Bricks",
|
||||
"tag.item.c.bricks.nether": "Nether Bricks",
|
||||
"tag.item.c.bricks.normal": "Bricks",
|
||||
"tag.item.c.bricks.resin": "Resin Bricks",
|
||||
"tag.item.c.buckets": "Buckets",
|
||||
"tag.item.c.buckets.empty": "Empty Buckets",
|
||||
"tag.item.c.buckets.entity_water": "Entity Water Buckets",
|
||||
|
@ -122,6 +124,8 @@
|
|||
"tag.item.c.chains": "Chains",
|
||||
"tag.item.c.chests": "Chests",
|
||||
"tag.item.c.chests.wooden": "Wooden Chests",
|
||||
"tag.item.c.clumps": "Clumps",
|
||||
"tag.item.c.clumps.resin": "Resin Clumps",
|
||||
"tag.item.c.clusters": "Clusters",
|
||||
"tag.item.c.coal": "Coal",
|
||||
"tag.item.c.cobblestones": "Cobblestones",
|
||||
|
@ -282,6 +286,7 @@
|
|||
"tag.item.c.storage_blocks.raw_gold": "Raw Gold Storage Blocks",
|
||||
"tag.item.c.storage_blocks.raw_iron": "Raw Iron Storage Blocks",
|
||||
"tag.item.c.storage_blocks.redstone": "Redstone Storage Blocks",
|
||||
"tag.item.c.storage_blocks.resin": "Resin Storage Blocks",
|
||||
"tag.item.c.storage_blocks.slime": "Slime Storage Blocks",
|
||||
"tag.item.c.storage_blocks.wheat": "Wheat Storage Blocks",
|
||||
"tag.item.c.strings": "Strings",
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"#c:storage_blocks/raw_gold",
|
||||
"#c:storage_blocks/raw_iron",
|
||||
"#c:storage_blocks/redstone",
|
||||
"#c:storage_blocks/resin",
|
||||
"#c:storage_blocks/slime",
|
||||
"#c:storage_blocks/wheat"
|
||||
]
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:resin_block"
|
||||
]
|
||||
}
|
|
@ -7,6 +7,10 @@
|
|||
{
|
||||
"id": "#c:bricks/nether",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"id": "#c:bricks/resin",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:resin_brick"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"values": [
|
||||
{
|
||||
"id": "#c:clumps/resin",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:resin_clump"
|
||||
]
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
"#c:storage_blocks/raw_gold",
|
||||
"#c:storage_blocks/raw_iron",
|
||||
"#c:storage_blocks/redstone",
|
||||
"#c:storage_blocks/resin",
|
||||
"#c:storage_blocks/slime",
|
||||
"#c:storage_blocks/wheat"
|
||||
]
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:resin_block"
|
||||
]
|
||||
}
|
|
@ -1,9 +1,6 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:dark_forest",
|
||||
{
|
||||
"id": "minecraft:pale_garden",
|
||||
"required": false
|
||||
}
|
||||
"minecraft:pale_garden"
|
||||
]
|
||||
}
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:dark_forest",
|
||||
{
|
||||
"id": "minecraft:pale_garden",
|
||||
"required": false
|
||||
},
|
||||
"minecraft:pale_garden",
|
||||
"minecraft:old_growth_birch_forest",
|
||||
"minecraft:old_growth_spruce_taiga",
|
||||
"minecraft:jungle",
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
"minecraft:swamp",
|
||||
"minecraft:stony_shore",
|
||||
"minecraft:dark_forest",
|
||||
{
|
||||
"id": "minecraft:pale_garden",
|
||||
"required": false
|
||||
},
|
||||
"minecraft:pale_garden",
|
||||
"minecraft:windswept_forest",
|
||||
"minecraft:birch_forest",
|
||||
"minecraft:old_growth_birch_forest",
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
"minecraft:flower_forest",
|
||||
"minecraft:birch_forest",
|
||||
"minecraft:dark_forest",
|
||||
{
|
||||
"id": "minecraft:pale_garden",
|
||||
"required": false
|
||||
},
|
||||
"minecraft:pale_garden",
|
||||
"minecraft:old_growth_birch_forest",
|
||||
{
|
||||
"id": "#c:tree_deciduous",
|
||||
|
|
|
@ -140,6 +140,7 @@ public final class ConventionalBlockTags {
|
|||
public static final TagKey<Block> STORAGE_BLOCKS_RAW_GOLD = register("storage_blocks/raw_gold");
|
||||
public static final TagKey<Block> STORAGE_BLOCKS_RAW_IRON = register("storage_blocks/raw_iron");
|
||||
public static final TagKey<Block> STORAGE_BLOCKS_REDSTONE = register("storage_blocks/redstone");
|
||||
public static final TagKey<Block> STORAGE_BLOCKS_RESIN = register("storage_blocks/resin");
|
||||
public static final TagKey<Block> STORAGE_BLOCKS_SLIME = register("storage_blocks/slime");
|
||||
public static final TagKey<Block> STORAGE_BLOCKS_WHEAT = register("storage_blocks/wheat");
|
||||
|
||||
|
|
|
@ -96,6 +96,7 @@ public final class ConventionalItemTags {
|
|||
// Ores and ingots - categories
|
||||
public static final TagKey<Item> BRICKS = register("bricks");
|
||||
public static final TagKey<Item> DUSTS = register("dusts");
|
||||
public static final TagKey<Item> CLUMPS = register("clumps");
|
||||
public static final TagKey<Item> GEMS = register("gems");
|
||||
public static final TagKey<Item> INGOTS = register("ingots");
|
||||
public static final TagKey<Item> NUGGETS = register("nuggets");
|
||||
|
@ -110,6 +111,7 @@ public final class ConventionalItemTags {
|
|||
// Bricks - vanilla instances
|
||||
public static final TagKey<Item> NORMAL_BRICKS = register("bricks/normal");
|
||||
public static final TagKey<Item> NETHER_BRICKS = register("bricks/nether");
|
||||
public static final TagKey<Item> RESIN_BRICKS = register("bricks/resin");
|
||||
|
||||
// Ingots - vanilla instances
|
||||
public static final TagKey<Item> IRON_INGOTS = register("ingots/iron");
|
||||
|
@ -137,6 +139,8 @@ public final class ConventionalItemTags {
|
|||
public static final TagKey<Item> REDSTONE_DUSTS = register("dusts/redstone");
|
||||
public static final TagKey<Item> GLOWSTONE_DUSTS = register("dusts/glowstone");
|
||||
|
||||
public static final TagKey<Item> RESIN_CLUMPS = register("clumps/resin");
|
||||
|
||||
// Consumables
|
||||
public static final TagKey<Item> POTIONS = register("potions");
|
||||
|
||||
|
@ -318,6 +322,7 @@ public final class ConventionalItemTags {
|
|||
public static final TagKey<Item> STORAGE_BLOCKS_RAW_GOLD = register("storage_blocks/raw_gold");
|
||||
public static final TagKey<Item> STORAGE_BLOCKS_RAW_IRON = register("storage_blocks/raw_iron");
|
||||
public static final TagKey<Item> STORAGE_BLOCKS_REDSTONE = register("storage_blocks/redstone");
|
||||
public static final TagKey<Item> STORAGE_BLOCKS_RESIN = register("storage_blocks/resin");
|
||||
public static final TagKey<Item> STORAGE_BLOCKS_SLIME = register("storage_blocks/slime");
|
||||
public static final TagKey<Item> STORAGE_BLOCKS_WHEAT = register("storage_blocks/wheat");
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
]
|
||||
},
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.20.5-beta.1",
|
||||
"fabric-lifecycle-events-v1": "*"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Adds Fabric-related debug info to crash reports.",
|
||||
"mixins": [
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-entity-events-v1": "*",
|
||||
"fabric-object-builder-api-v1": "*"
|
||||
},
|
||||
|
|
|
@ -148,6 +148,7 @@ transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator
|
|||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerParentedItemModel (Lnet/minecraft/item/Item;Lnet/minecraft/util/Identifier;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerItemModel (Lnet/minecraft/item/Item;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerItemModel (Lnet/minecraft/block/Block;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator method_65292 (Lnet/minecraft/block/Block;Ljava/lang/String;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerItemModel (Lnet/minecraft/block/Block;Ljava/lang/String;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator createNorthDefaultHorizontalRotationStates ()Lnet/minecraft/data/client/BlockStateVariantMap;
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator createSouthDefaultHorizontalRotationStates ()Lnet/minecraft/data/client/BlockStateVariantMap;
|
||||
|
@ -250,6 +251,8 @@ transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator
|
|||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator getTurtleEggModel (ILjava/lang/String;Lnet/minecraft/data/client/TextureMap;)Lnet/minecraft/util/Identifier;
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator getTurtleEggModel (Ljava/lang/Integer;Ljava/lang/Integer;)Lnet/minecraft/util/Identifier;
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerWallPlant (Lnet/minecraft/block/Block;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator method_65295 (Lnet/minecraft/block/Block;Lnet/minecraft/item/Item;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator method_65291 (Lnet/minecraft/block/Block;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerPaleMossCarpet (Lnet/minecraft/block/Block;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerHangingMoss (Lnet/minecraft/block/Block;)V
|
||||
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator supplyChiseledBookshelfModels (Lnet/minecraft/data/client/MultipartBlockStateSupplier;Lnet/minecraft/data/client/When$PropertyCondition;Lnet/minecraft/data/client/VariantSettings$Rotation;)V
|
||||
|
@ -293,6 +296,7 @@ transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableG
|
|||
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator dropsWithShears (Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/loot/LootTable$Builder;
|
||||
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator dropsWithSilkTouchOrShears (Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/loot/LootTable$Builder;
|
||||
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator multifaceGrowthDrops (Lnet/minecraft/block/Block;Lnet/minecraft/loot/condition/LootCondition$Builder;)Lnet/minecraft/loot/LootTable$Builder;
|
||||
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator method_65261 (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;
|
||||
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator paleMossCarpetDrops (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;
|
||||
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator leavesDrops (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;[F)Lnet/minecraft/loot/LootTable$Builder;
|
||||
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator oakLeavesDrops (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;[F)Lnet/minecraft/loot/LootTable$Builder;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Allows for automatic data generation.",
|
||||
"mixins": [
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.16-rc.3",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Events to hook into entities.",
|
||||
"mixins": [
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.api.event.client.player;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
|
||||
import net.fabricmc.fabric.api.event.Event;
|
||||
import net.fabricmc.fabric.api.event.EventFactory;
|
||||
|
||||
/**
|
||||
* This event is emitted during the block-picking process. It can be used to
|
||||
* modify the returned ItemStack, as well as nullify it - returning an empty
|
||||
* ItemStack will cause the event to leave, and no block to be picked.
|
||||
*/
|
||||
public interface ClientPickBlockApplyCallback {
|
||||
Event<ClientPickBlockApplyCallback> EVENT = EventFactory.createArrayBacked(ClientPickBlockApplyCallback.class,
|
||||
(listeners) -> (player, result, _stack) -> {
|
||||
ItemStack stack = _stack;
|
||||
|
||||
for (ClientPickBlockApplyCallback event : listeners) {
|
||||
stack = event.pick(player, result, stack);
|
||||
|
||||
if (stack.isEmpty()) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
);
|
||||
|
||||
ItemStack pick(PlayerEntity player, HitResult result, ItemStack stack);
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.api.event.client.player;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
|
||||
import net.fabricmc.fabric.api.event.Event;
|
||||
import net.fabricmc.fabric.api.event.EventFactory;
|
||||
|
||||
/**
|
||||
* This event handler has been deprecated due to not hooking nicely
|
||||
* into the game. Please use the alternatives.
|
||||
*
|
||||
* @deprecated 0.3.0
|
||||
*/
|
||||
@SuppressWarnings("DeprecatedIsStillUsed")
|
||||
@Deprecated
|
||||
public interface ClientPickBlockCallback {
|
||||
@Deprecated
|
||||
final class Container {
|
||||
private ItemStack stack;
|
||||
|
||||
public Container(ItemStack stack) {
|
||||
this.stack = stack;
|
||||
}
|
||||
|
||||
public ItemStack getStack() {
|
||||
return stack;
|
||||
}
|
||||
|
||||
public void setStack(ItemStack stack) {
|
||||
this.stack = stack;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated Event<ClientPickBlockCallback> EVENT = EventFactory.createArrayBacked(ClientPickBlockCallback.class,
|
||||
(listeners) -> (player, result, container) -> {
|
||||
for (ClientPickBlockCallback event : listeners) {
|
||||
if (!event.pick(player, result, container)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
);
|
||||
|
||||
boolean pick(PlayerEntity player, HitResult result, Container container);
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.api.event.client.player;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.EntityHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
|
||||
import net.fabricmc.fabric.api.event.Event;
|
||||
import net.fabricmc.fabric.api.event.EventFactory;
|
||||
|
||||
/**
|
||||
* This event is emitted at the beginning of the block picking process in
|
||||
* order to find any applicable ItemStack. The first non-empty ItemStack
|
||||
* will be returned, overriding vanilla behavior.
|
||||
*
|
||||
* <p>Note that this is called any time the pick key is pressed, even if there is no target block.
|
||||
* The {@link HitResult} could be a {@link BlockHitResult} or an {@link EntityHitResult}.
|
||||
* If the hit missed, it will be a {@link BlockHitResult} with {@linkplain BlockHitResult#getType() type}
|
||||
* {@link BlockHitResult.Type#MISS}, so make sure to check for that.
|
||||
*/
|
||||
public interface ClientPickBlockGatherCallback {
|
||||
Event<ClientPickBlockGatherCallback> EVENT = EventFactory.createArrayBacked(ClientPickBlockGatherCallback.class,
|
||||
(listeners) -> (player, result) -> {
|
||||
for (ClientPickBlockGatherCallback event : listeners) {
|
||||
ItemStack stack = event.pick(player, result);
|
||||
|
||||
if (stack != ItemStack.EMPTY && !stack.isEmpty()) {
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
);
|
||||
|
||||
ItemStack pick(PlayerEntity player, HitResult result);
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.impl.event.interaction.client;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.EntityHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.block.BlockPickInteractionAware;
|
||||
import net.fabricmc.fabric.api.entity.EntityPickInteractionAware;
|
||||
import net.fabricmc.fabric.api.event.client.player.ClientPickBlockGatherCallback;
|
||||
|
||||
public class InteractionEventsRouterClient implements ClientModInitializer {
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
ClientPickBlockGatherCallback.EVENT.register(((player, result) -> {
|
||||
if (result instanceof BlockHitResult && result.getType() != HitResult.Type.MISS) {
|
||||
BlockView view = player.getEntityWorld();
|
||||
BlockPos pos = ((BlockHitResult) result).getBlockPos();
|
||||
BlockState state = view.getBlockState(pos);
|
||||
|
||||
if (state.getBlock() instanceof BlockPickInteractionAware) {
|
||||
return (((BlockPickInteractionAware) state.getBlock()).getPickedStack(state, view, pos, player, result));
|
||||
}
|
||||
} else if (result instanceof EntityHitResult) {
|
||||
Entity entity = ((EntityHitResult) result).getEntity();
|
||||
|
||||
if (entity instanceof EntityPickInteractionAware) {
|
||||
return ((EntityPickInteractionAware) entity).getPickedStack(player, result);
|
||||
}
|
||||
}
|
||||
|
||||
return ItemStack.EMPTY;
|
||||
}));
|
||||
}
|
||||
}
|
|
@ -22,116 +22,31 @@ import org.spongepowered.asm.mixin.Mixin;
|
|||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.client.network.ClientPlayerInteractionManager;
|
||||
import net.minecraft.client.option.GameOptions;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
|
||||
import net.minecraft.registry.DynamicRegistryManager;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.EntityHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import net.fabricmc.fabric.api.event.client.player.ClientPickBlockApplyCallback;
|
||||
import net.fabricmc.fabric.api.event.client.player.ClientPickBlockCallback;
|
||||
import net.fabricmc.fabric.api.event.client.player.ClientPickBlockGatherCallback;
|
||||
import net.fabricmc.fabric.api.event.client.player.ClientPreAttackCallback;
|
||||
import net.fabricmc.fabric.api.event.player.UseEntityCallback;
|
||||
|
||||
@Mixin(MinecraftClient.class)
|
||||
public abstract class MinecraftClientMixin {
|
||||
private boolean fabric_itemPickCancelled;
|
||||
private boolean fabric_attackCancelled;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private ItemStack fabric_emulateOldPick() {
|
||||
MinecraftClient client = (MinecraftClient) (Object) this;
|
||||
ClientPickBlockCallback.Container ctr = new ClientPickBlockCallback.Container(ItemStack.EMPTY);
|
||||
ClientPickBlockCallback.EVENT.invoker().pick(client.player, client.crosshairTarget, ctr);
|
||||
return ctr.getStack();
|
||||
}
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "doItemPick", cancellable = true)
|
||||
private void fabric_doItemPickWrapper(CallbackInfo info) {
|
||||
MinecraftClient client = (MinecraftClient) (Object) this;
|
||||
|
||||
// Do a "best effort" emulation of the old events.
|
||||
ItemStack stack = ClientPickBlockGatherCallback.EVENT.invoker().pick(client.player, client.crosshairTarget);
|
||||
|
||||
// TODO: Remove in 0.3.0
|
||||
if (stack.isEmpty()) {
|
||||
stack = fabric_emulateOldPick();
|
||||
}
|
||||
|
||||
if (stack.isEmpty()) {
|
||||
// fall through
|
||||
} else {
|
||||
info.cancel();
|
||||
|
||||
// I don't like that we clone vanilla logic here, but it's our best bet for now.
|
||||
PlayerInventory playerInventory = client.player.getInventory();
|
||||
|
||||
if (client.player.isInCreativeMode() && Screen.hasControlDown() && client.crosshairTarget.getType() == HitResult.Type.BLOCK) {
|
||||
BlockEntity be = client.world.getBlockEntity(((BlockHitResult) client.crosshairTarget).getBlockPos());
|
||||
|
||||
if (be != null) {
|
||||
addBlockEntityNbt(stack, be, world.getRegistryManager());
|
||||
}
|
||||
}
|
||||
|
||||
stack = ClientPickBlockApplyCallback.EVENT.invoker().pick(client.player, client.crosshairTarget, stack);
|
||||
|
||||
if (stack.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (client.player.isInCreativeMode()) {
|
||||
playerInventory.addPickBlock(stack);
|
||||
client.interactionManager.clickCreativeStack(client.player.getStackInHand(Hand.MAIN_HAND), 36 + playerInventory.selectedSlot);
|
||||
} else {
|
||||
int slot = playerInventory.getSlotWithStack(stack);
|
||||
|
||||
if (slot >= 0) {
|
||||
if (PlayerInventory.isValidHotbarIndex(slot)) {
|
||||
playerInventory.selectedSlot = slot;
|
||||
} else {
|
||||
client.interactionManager.pickFromInventory(slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ModifyVariable(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerInventory;getSlotWithStack(Lnet/minecraft/item/ItemStack;)I", shift = At.Shift.BEFORE), method = "doItemPick", ordinal = 0)
|
||||
public ItemStack modifyItemPick(ItemStack stack) {
|
||||
MinecraftClient client = (MinecraftClient) (Object) this;
|
||||
ItemStack result = ClientPickBlockApplyCallback.EVENT.invoker().pick(client.player, client.crosshairTarget, stack);
|
||||
fabric_itemPickCancelled = result.isEmpty();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerInventory;getSlotWithStack(Lnet/minecraft/item/ItemStack;)I"), method = "doItemPick", cancellable = true)
|
||||
public void cancelItemPick(CallbackInfo info) {
|
||||
if (fabric_itemPickCancelled) {
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@Shadow
|
||||
private ClientPlayerEntity player;
|
||||
|
||||
|
@ -146,9 +61,6 @@ public abstract class MinecraftClientMixin {
|
|||
@Nullable
|
||||
public ClientPlayerInteractionManager interactionManager;
|
||||
|
||||
@Shadow
|
||||
protected abstract void addBlockEntityNbt(ItemStack stack, BlockEntity blockEntity, DynamicRegistryManager dynamicRegistryManager);
|
||||
|
||||
@Shadow
|
||||
@Nullable
|
||||
public ClientWorld world;
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.api.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.hit.EntityHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
|
||||
/**
|
||||
* Convenience interface for entities that want more stack picking context than what
|
||||
* {@link Entity#getPickBlockStack()} provides.
|
||||
*
|
||||
* <p>The hit result is guaranteed to be an {@link EntityHitResult}.
|
||||
*/
|
||||
public interface EntityPickInteractionAware {
|
||||
ItemStack getPickedStack(PlayerEntity player, HitResult result);
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.api.event.player;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import net.fabricmc.fabric.api.event.Event;
|
||||
import net.fabricmc.fabric.api.event.EventFactory;
|
||||
|
||||
/**
|
||||
* Contains events triggered by server players requesting to pick items from the world.
|
||||
*/
|
||||
public final class PlayerPickItemEvents {
|
||||
private PlayerPickItemEvents() { }
|
||||
|
||||
/**
|
||||
* Called when a player requests to pick the item for a block at a given position.
|
||||
*/
|
||||
public static final Event<PlayerPickItemEvents.PickItemFromBlock> BLOCK = EventFactory.createArrayBacked(PlayerPickItemEvents.PickItemFromBlock.class, callbacks -> (player, pos, state, includeData) -> {
|
||||
for (PickItemFromBlock callback : callbacks) {
|
||||
ItemStack stack = callback.onPickItemFromBlock(player, pos, state, includeData);
|
||||
|
||||
if (stack != null) {
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
/**
|
||||
* Called when a player requests to pick the item for a given entity.
|
||||
*/
|
||||
public static final Event<PlayerPickItemEvents.PickItemFromEntity> ENTITY = EventFactory.createArrayBacked(PlayerPickItemEvents.PickItemFromEntity.class, callbacks -> (player, entity, includeData) -> {
|
||||
for (PickItemFromEntity callback : callbacks) {
|
||||
ItemStack stack = callback.onPickItemFromEntity(player, entity, includeData);
|
||||
|
||||
if (stack != null) {
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
@FunctionalInterface
|
||||
public interface PickItemFromBlock {
|
||||
/**
|
||||
* Determines the pick item stack to give to a player that is attempting to pick an item from a block.
|
||||
*
|
||||
* @param player the player attempting to pick an item from a block
|
||||
* @param pos the position of the block being picked from
|
||||
* @param state the state of the block being picked from
|
||||
* @param includeData whether block entity data should be included in the pick item stack
|
||||
* @return a pick item stack to give to the player, or {@code null} if the default pick item stack should be given
|
||||
*/
|
||||
@Nullable
|
||||
ItemStack onPickItemFromBlock(ServerPlayerEntity player, BlockPos pos, BlockState state, boolean includeData);
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
public interface PickItemFromEntity {
|
||||
/**
|
||||
* Determines the pick item stack to give to a player that is attempting to pick an item from a entity.
|
||||
*
|
||||
* @param player the player attempting to pick an item from a entity
|
||||
* @param entity the entity being picked from
|
||||
* @param includeData whether additional data should be included in the pick item stack; unused in vanilla
|
||||
* @return a pick item stack to give to the player, or {@code null} if the default pick item stack should be given
|
||||
*/
|
||||
@Nullable
|
||||
ItemStack onPickItemFromEntity(ServerPlayerEntity player, Entity entity, boolean includeData);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.mixin.event.interaction;
|
||||
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
|
||||
import net.minecraft.server.network.ServerPlayNetworkHandler;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.EntityHitResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.fabricmc.fabric.api.event.player.UseEntityCallback;
|
||||
|
||||
@Mixin(targets = "net/minecraft/server/network/ServerPlayNetworkHandler$1")
|
||||
public abstract class ServerPlayNetworkHandlerInteractEntityHandlerMixin implements PlayerInteractEntityC2SPacket.Handler {
|
||||
@Shadow
|
||||
@Final
|
||||
ServerPlayNetworkHandler field_28963;
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
Entity field_28962;
|
||||
|
||||
@Inject(method = "interactAt(Lnet/minecraft/util/Hand;Lnet/minecraft/util/math/Vec3d;)V", at = @At(value = "HEAD"), cancellable = true)
|
||||
public void onPlayerInteractEntity(Hand hand, Vec3d hitPosition, CallbackInfo info) {
|
||||
PlayerEntity player = field_28963.player;
|
||||
World world = player.getEntityWorld();
|
||||
|
||||
EntityHitResult hitResult = new EntityHitResult(field_28962, hitPosition.add(field_28962.getX(), field_28962.getY(), field_28962.getZ()));
|
||||
ActionResult result = UseEntityCallback.EVENT.invoker().interact(player, world, hand, field_28962, hitResult);
|
||||
|
||||
if (result != ActionResult.PASS) {
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "interact(Lnet/minecraft/util/Hand;)V", at = @At(value = "HEAD"), cancellable = true)
|
||||
public void onPlayerInteractEntity(Hand hand, CallbackInfo info) {
|
||||
PlayerEntity player = field_28963.player;
|
||||
World world = player.getEntityWorld();
|
||||
|
||||
ActionResult result = UseEntityCallback.EVENT.invoker().interact(player, world, hand, field_28962, null);
|
||||
|
||||
if (result != ActionResult.PASS) {
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,57 +16,62 @@
|
|||
|
||||
package net.fabricmc.fabric.mixin.event.interaction;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.class_10370;
|
||||
import net.minecraft.class_10371;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.network.ServerPlayNetworkHandler;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.EntityHitResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
import net.fabricmc.fabric.api.event.player.UseEntityCallback;
|
||||
import net.fabricmc.fabric.api.event.player.PlayerPickItemEvents;
|
||||
|
||||
@Mixin(targets = "net/minecraft/server/network/ServerPlayNetworkHandler$1")
|
||||
public abstract class ServerPlayNetworkHandlerMixin implements PlayerInteractEntityC2SPacket.Handler {
|
||||
@Mixin(ServerPlayNetworkHandler.class)
|
||||
public abstract class ServerPlayNetworkHandlerMixin {
|
||||
@Shadow
|
||||
@Final
|
||||
ServerPlayNetworkHandler field_28963;
|
||||
private ServerPlayerEntity player;
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
Entity field_28962;
|
||||
|
||||
@Inject(method = "interactAt(Lnet/minecraft/util/Hand;Lnet/minecraft/util/math/Vec3d;)V", at = @At(value = "HEAD"), cancellable = true)
|
||||
public void onPlayerInteractEntity(Hand hand, Vec3d hitPosition, CallbackInfo info) {
|
||||
PlayerEntity player = field_28963.player;
|
||||
World world = player.getEntityWorld();
|
||||
|
||||
EntityHitResult hitResult = new EntityHitResult(field_28962, hitPosition.add(field_28962.getX(), field_28962.getY(), field_28962.getZ()));
|
||||
ActionResult result = UseEntityCallback.EVENT.invoker().interact(player, world, hand, field_28962, hitResult);
|
||||
|
||||
if (result != ActionResult.PASS) {
|
||||
info.cancel();
|
||||
}
|
||||
private void method_65098(ItemStack stack) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@Inject(method = "interact(Lnet/minecraft/util/Hand;)V", at = @At(value = "HEAD"), cancellable = true)
|
||||
public void onPlayerInteractEntity(Hand hand, CallbackInfo info) {
|
||||
PlayerEntity player = field_28963.player;
|
||||
World world = player.getEntityWorld();
|
||||
@WrapOperation(method = "method_65085", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;method_65171(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/ItemStack;"))
|
||||
public ItemStack onPickItemFromBlock(BlockState state, WorldView world, BlockPos pos, Operation<ItemStack> operation, @Local class_10370 packet) {
|
||||
ItemStack stack = PlayerPickItemEvents.BLOCK.invoker().onPickItemFromBlock(player, pos, state, packet.includeData());
|
||||
|
||||
ActionResult result = UseEntityCallback.EVENT.invoker().interact(player, world, hand, field_28962, null);
|
||||
|
||||
if (result != ActionResult.PASS) {
|
||||
info.cancel();
|
||||
if (stack == null) {
|
||||
return operation.call(state, world, pos);
|
||||
} else if (!stack.isEmpty()) {
|
||||
this.method_65098(stack);
|
||||
}
|
||||
|
||||
// Prevent vanilla data-inclusion behavior
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@WrapOperation(method = "onPickFromInventory", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;getPickBlockStack()Lnet/minecraft/item/ItemStack;"))
|
||||
public ItemStack onPickItemFromEntity(Entity entity, Operation<ItemStack> operation, @Local class_10371 packet) {
|
||||
ItemStack stack = PlayerPickItemEvents.ENTITY.invoker().onPickItemFromEntity(player, entity, packet.includeData());
|
||||
|
||||
if (stack == null) {
|
||||
return operation.call(entity);
|
||||
} else if (!stack.isEmpty()) {
|
||||
this.method_65098(stack);
|
||||
}
|
||||
|
||||
// Prevent vanilla data-inclusion behavior
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"PlayerAdvancementTrackerMixin",
|
||||
"ServerPlayerEntityMixin",
|
||||
"ServerPlayerInteractionManagerMixin",
|
||||
"ServerPlayNetworkHandlerInteractEntityHandlerMixin",
|
||||
"ServerPlayNetworkHandlerMixin"
|
||||
],
|
||||
"injectors": {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-networking-api-v1": "*",
|
||||
"minecraft": ">=1.15-alpha.19.37.a"
|
||||
|
@ -24,9 +24,6 @@
|
|||
"entrypoints": {
|
||||
"main": [
|
||||
"net.fabricmc.fabric.impl.event.interaction.InteractionEventsRouter"
|
||||
],
|
||||
"client": [
|
||||
"net.fabricmc.fabric.impl.event.interaction.client.InteractionEventsRouterClient"
|
||||
]
|
||||
},
|
||||
"description": "Events for player interaction with blocks and entities.",
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.test.event.interaction;
|
||||
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.entity.mob.CreakingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.event.player.PlayerPickItemEvents;
|
||||
|
||||
public class PlayerPickItemTests implements ModInitializer {
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
// Expected behavior:
|
||||
// - When sneaking and picking an item from bedrock, a barrier will be given.
|
||||
// - When sneaking, holding Ctrl/Cmd, and picking an item from bedrock, no item will be given.
|
||||
// - When sneaking and picking an item from a creaking, light with the entity name will be given.
|
||||
// - When sneaking, holding Ctrl/Cmd, and picking an item from a creaking, structure void with the entity name will be given.
|
||||
|
||||
PlayerPickItemEvents.BLOCK.register((player, pos, state, includeData) -> {
|
||||
if (player.isSneaking() && state.isOf(Blocks.BEDROCK)) {
|
||||
return includeData ? ItemStack.EMPTY : new ItemStack(Items.BARRIER);
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
PlayerPickItemEvents.ENTITY.register((player, entity, includeData) -> {
|
||||
if (player.isSneaking() && entity instanceof CreakingEntity) {
|
||||
ItemStack stack = new ItemStack(includeData ? Items.STRUCTURE_VOID : Items.LIGHT);
|
||||
stack.set(DataComponentTypes.ITEM_NAME, entity.getName());
|
||||
return stack;
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
"main": [
|
||||
"net.fabricmc.fabric.test.event.interaction.AttackBlockTests",
|
||||
"net.fabricmc.fabric.test.event.interaction.PlayerBreakBlockTests",
|
||||
"net.fabricmc.fabric.test.event.interaction.PlayerPickItemTests",
|
||||
"net.fabricmc.fabric.test.event.interaction.UseBlockTests",
|
||||
"net.fabricmc.fabric.test.event.interaction.UseEntityTests",
|
||||
"net.fabricmc.fabric.test.event.interaction.UseItemTests"
|
||||
|
@ -21,8 +22,7 @@
|
|||
],
|
||||
"client": [
|
||||
"net.fabricmc.fabric.test.client.event.interaction.ClientPreAttackTests",
|
||||
"net.fabricmc.fabric.test.client.event.interaction.ClientPlayerBlockBreakTests",
|
||||
"net.fabricmc.fabric.test.client.event.interaction.PlayerPickBlockTests"
|
||||
"net.fabricmc.fabric.test.client.event.interaction.ClientPlayerBlockBreakTests"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.test.client.event.interaction;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.Hand;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.event.client.player.ClientPickBlockApplyCallback;
|
||||
|
||||
public class PlayerPickBlockTests implements ClientModInitializer {
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
ClientPickBlockApplyCallback.EVENT.register((player, result, stack) -> {
|
||||
if (player.getStackInHand(Hand.MAIN_HAND).getItem() == Items.DIAMOND) {
|
||||
return new ItemStack(Items.OBSIDIAN);
|
||||
}
|
||||
|
||||
if (stack.getItem() == Items.GRASS_BLOCK) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
return stack;
|
||||
});
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Allows registration of custom game rules.",
|
||||
"mixins": [
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
]
|
||||
},
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-resource-loader-v0": "*"
|
||||
},
|
||||
"description": "Allows registration of custom game tests.",
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
}
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
"description": "Hooks for items",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-resource-loader-v0": "*"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Key Binding registry API.",
|
||||
"mixins": [
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
}
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
"description": "Events for the game's lifecycle.",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-resource-loader-v0": "*"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
"description": "Adds message-related hooks.",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
"description": "Provides hooks for model loading.",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
},
|
||||
"accessWidener": "fabric-networking-api-v1.accesswidener",
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
"description": "Low-level, vanilla protocol oriented networking hooks.",
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import net.minecraft.block.WoodType;
|
||||
import net.minecraft.client.render.block.entity.HangingSignBlockEntityRenderer;
|
||||
import net.minecraft.client.render.entity.model.EntityModelLayer;
|
||||
import net.minecraft.client.render.entity.model.EntityModelLayers;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
@ -45,10 +46,12 @@ public class EntityModelLayersMixin {
|
|||
}
|
||||
|
||||
@Inject(method = "createHangingSign", at = @At("HEAD"), cancellable = true)
|
||||
private static void createHangingSign(WoodType type, CallbackInfoReturnable<EntityModelLayer> cir) {
|
||||
private static void createHangingSign(WoodType type, HangingSignBlockEntityRenderer.class_10381 attachmentType, CallbackInfoReturnable<EntityModelLayer> cir) {
|
||||
if (type.name().indexOf(Identifier.NAMESPACE_SEPARATOR) != -1) {
|
||||
Identifier identifier = Identifier.of(type.name());
|
||||
cir.setReturnValue(new EntityModelLayer(identifier.withPrefixedPath("hanging_sign/"), "main"));
|
||||
cir.setReturnValue(new EntityModelLayer(identifier.withPath(path -> {
|
||||
return "hanging_sign/" + path + "/" + attachmentType.asString();
|
||||
}), "main"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
"description": "Builders for objects vanilla has locked down.",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Hooks for registering custom particles.",
|
||||
"mixins": [
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
],
|
||||
"accessWidener": "fabric-recipe-api-v1.accesswidener",
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-networking-api-v1": "*"
|
||||
},
|
||||
"entrypoints": {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-networking-api-v1": "*"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.15-alpha.19.39.a",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
|
|
|
@ -27,14 +27,14 @@ import net.minecraft.client.render.model.Baker;
|
|||
import net.minecraft.client.render.model.ModelBakeSettings;
|
||||
import net.minecraft.client.render.model.UnbakedModel;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||
import net.minecraft.client.util.SpriteIdentifier;
|
||||
import net.minecraft.screen.PlayerScreenHandler;
|
||||
|
||||
import net.fabricmc.fabric.test.renderer.RendererTest;
|
||||
|
||||
public class PillarUnbakedModel implements UnbakedModel {
|
||||
private static final List<SpriteIdentifier> SPRITES = Stream.of("alone", "bottom", "middle", "top")
|
||||
.map(suffix -> new SpriteIdentifier(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE, RendererTest.id("block/pillar_" + suffix)))
|
||||
.map(suffix -> new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, RendererTest.id("block/pillar_" + suffix)))
|
||||
.toList();
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.15-alpha.19.39.a",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-renderer-api-v1": "*"
|
||||
|
|
|
@ -34,7 +34,6 @@ import net.minecraft.client.texture.SpriteAtlasTexture;
|
|||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.screen.PlayerScreenHandler;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.biome.BiomeKeys;
|
||||
|
@ -93,7 +92,7 @@ public class FluidRenderHandlerRegistryImpl implements FluidRenderHandlerRegistr
|
|||
|
||||
SpriteAtlasTexture texture = MinecraftClient.getInstance()
|
||||
.getBakedModelManager()
|
||||
.getAtlas(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE);
|
||||
.getAtlas(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE);
|
||||
|
||||
for (FluidRenderHandler handler : handlers.values()) {
|
||||
handler.reloadTextures(texture);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
"description": "Hooks for registering fluid renders.",
|
||||
|
|
|
@ -23,7 +23,6 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.client.render.Camera;
|
||||
import net.minecraft.client.render.Frustum;
|
||||
import net.minecraft.client.render.GameRenderer;
|
||||
import net.minecraft.client.render.LightmapTextureManager;
|
||||
import net.minecraft.client.render.RenderTickCounter;
|
||||
import net.minecraft.client.render.VertexConsumer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
|
@ -59,8 +58,6 @@ public interface WorldRenderContext {
|
|||
|
||||
GameRenderer gameRenderer();
|
||||
|
||||
LightmapTextureManager lightmapTextureManager();
|
||||
|
||||
Matrix4f projectionMatrix();
|
||||
|
||||
Matrix4f positionMatrix();
|
||||
|
|
|
@ -22,7 +22,6 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.client.render.Camera;
|
||||
import net.minecraft.client.render.Frustum;
|
||||
import net.minecraft.client.render.GameRenderer;
|
||||
import net.minecraft.client.render.LightmapTextureManager;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.client.render.RenderTickCounter;
|
||||
import net.minecraft.client.render.VertexConsumer;
|
||||
|
@ -43,7 +42,6 @@ public final class WorldRenderContextImpl implements WorldRenderContext.BlockOut
|
|||
private Camera camera;
|
||||
private Frustum frustum;
|
||||
private GameRenderer gameRenderer;
|
||||
private LightmapTextureManager lightmapTextureManager;
|
||||
private Matrix4f projectionMatrix;
|
||||
private Matrix4f positionMatrix;
|
||||
private VertexConsumerProvider consumers;
|
||||
|
@ -65,7 +63,6 @@ public final class WorldRenderContextImpl implements WorldRenderContext.BlockOut
|
|||
boolean blockOutlines,
|
||||
Camera camera,
|
||||
GameRenderer gameRenderer,
|
||||
LightmapTextureManager lightmapTextureManager,
|
||||
Matrix4f projectionMatrix,
|
||||
Matrix4f positionMatrix,
|
||||
VertexConsumerProvider consumers,
|
||||
|
@ -78,7 +75,6 @@ public final class WorldRenderContextImpl implements WorldRenderContext.BlockOut
|
|||
this.blockOutlines = blockOutlines;
|
||||
this.camera = camera;
|
||||
this.gameRenderer = gameRenderer;
|
||||
this.lightmapTextureManager = lightmapTextureManager;
|
||||
this.projectionMatrix = projectionMatrix;
|
||||
this.positionMatrix = positionMatrix;
|
||||
this.consumers = consumers;
|
||||
|
@ -165,11 +161,6 @@ public final class WorldRenderContextImpl implements WorldRenderContext.BlockOut
|
|||
return gameRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LightmapTextureManager lightmapTextureManager() {
|
||||
return lightmapTextureManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean advancedTranslucency() {
|
||||
return advancedTranslucency;
|
||||
|
|
|
@ -39,7 +39,6 @@ import net.minecraft.client.render.Fog;
|
|||
import net.minecraft.client.render.FrameGraphBuilder;
|
||||
import net.minecraft.client.render.Frustum;
|
||||
import net.minecraft.client.render.GameRenderer;
|
||||
import net.minecraft.client.render.LightmapTextureManager;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.client.render.RenderPass;
|
||||
import net.minecraft.client.render.RenderTickCounter;
|
||||
|
@ -72,8 +71,8 @@ public abstract class WorldRendererMixin {
|
|||
@Unique private final WorldRenderContextImpl context = new WorldRenderContextImpl();
|
||||
|
||||
@Inject(method = "render", at = @At("HEAD"))
|
||||
private void beforeRender(ObjectAllocator objectAllocator, RenderTickCounter tickCounter, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightmapTextureManager lightmapTextureManager, Matrix4f positionMatrix, Matrix4f projectionMatrix, CallbackInfo ci) {
|
||||
context.prepare((WorldRenderer) (Object) this, tickCounter, renderBlockOutline, camera, gameRenderer, lightmapTextureManager, projectionMatrix, positionMatrix, bufferBuilders.getEntityVertexConsumers(), MinecraftClient.isFabulousGraphicsOrBetter(), world);
|
||||
private void beforeRender(ObjectAllocator objectAllocator, RenderTickCounter tickCounter, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, Matrix4f positionMatrix, Matrix4f projectionMatrix, CallbackInfo ci) {
|
||||
context.prepare((WorldRenderer) (Object) this, tickCounter, renderBlockOutline, camera, gameRenderer, projectionMatrix, positionMatrix, bufferBuilders.getEntityVertexConsumers(), MinecraftClient.isFabulousGraphicsOrBetter(), world);
|
||||
WorldRenderEvents.START.invoker().onStart(context);
|
||||
}
|
||||
|
||||
|
@ -180,7 +179,7 @@ public abstract class WorldRendererMixin {
|
|||
}
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "renderWeather", cancellable = true)
|
||||
private void renderWeather(FrameGraphBuilder frameGraphBuilder, LightmapTextureManager lightmapTextureManager, Vec3d vec3d, float f, Fog fog, CallbackInfo info) {
|
||||
private void renderWeather(FrameGraphBuilder frameGraphBuilder, Vec3d vec3d, float f, Fog fog, CallbackInfo info) {
|
||||
if (this.client.world != null) {
|
||||
DimensionRenderingRegistry.WeatherRenderer renderer = DimensionRenderingRegistry.getWeatherRenderer(world.getRegistryKey());
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
"description": "Hooks and registries for rendering-related things.",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Allows conditionally loading resources.",
|
||||
"entrypoints": {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Asset and data resource loading.",
|
||||
"mixins": [
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*"
|
||||
},
|
||||
"description": "Adds screen related hooks.",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-base": "*",
|
||||
"fabric-networking-api-v1": "*"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": ">=1.19.2"
|
||||
},
|
||||
"description": "Hooks for modifying Minecraft's sound system.",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"fabric-api-lookup-api-v1": "*",
|
||||
"fabric-rendering-fluids-v1": "*"
|
||||
},
|
||||
|
|
|
@ -248,6 +248,7 @@ transitive-accessible field net/minecraft/client/render/RenderPhase ADDITIVE_TRA
|
|||
transitive-accessible field net/minecraft/client/render/RenderPhase LIGHTNING_TRANSPARENCY Lnet/minecraft/client/render/RenderPhase$Transparency;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase GLINT_TRANSPARENCY Lnet/minecraft/client/render/RenderPhase$Transparency;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase CRUMBLING_TRANSPARENCY Lnet/minecraft/client/render/RenderPhase$Transparency;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase field_55137 Lnet/minecraft/client/render/RenderPhase$Transparency;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase TRANSLUCENT_TRANSPARENCY Lnet/minecraft/client/render/RenderPhase$Transparency;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase VIGNETTE_TRANSPARENCY Lnet/minecraft/client/render/RenderPhase$Transparency;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase CROSSHAIR_TRANSPARENCY Lnet/minecraft/client/render/RenderPhase$Transparency;
|
||||
|
@ -260,6 +261,7 @@ transitive-accessible field net/minecraft/client/render/RenderPhase POSITION_TEX
|
|||
transitive-accessible field net/minecraft/client/render/RenderPhase POSITION_COLOR_TEXTURE_LIGHTMAP_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase POSITION_COLOR_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase POSITION_TEXTURE_COLOR_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase field_55138 Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase SOLID_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase CUTOUT_MIPPED_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase CUTOUT_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
|
@ -330,6 +332,7 @@ transitive-accessible field net/minecraft/client/render/RenderPhase NO_LAYERING
|
|||
transitive-accessible field net/minecraft/client/render/RenderPhase POLYGON_OFFSET_LAYERING Lnet/minecraft/client/render/RenderPhase$Layering;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase VIEW_OFFSET_Z_LAYERING Lnet/minecraft/client/render/RenderPhase$Layering;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase VIEW_OFFSET_Z_LAYERING_FORWARD Lnet/minecraft/client/render/RenderPhase$Layering;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase field_55136 Lnet/minecraft/client/render/RenderPhase$Layering;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase MAIN_TARGET Lnet/minecraft/client/render/RenderPhase$Target;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase OUTLINE_TARGET Lnet/minecraft/client/render/RenderPhase$Target;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase TRANSLUCENT_TARGET Lnet/minecraft/client/render/RenderPhase$Target;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8"
|
||||
"fabricloader": ">=0.16.9"
|
||||
},
|
||||
"description": "Contains transitive access wideners that provide access to otherwise inaccessible Minecraft code.",
|
||||
"accessWidener": "fabric-transitive-access-wideners-v1.accesswidener",
|
||||
|
|
|
@ -2,60 +2,60 @@ org.gradle.jvmargs=-Xmx2560M
|
|||
org.gradle.parallel=true
|
||||
|
||||
version=0.107.0
|
||||
minecraft_version=1.21.3
|
||||
minecraft_version=24w44a
|
||||
yarn_version=+build.1
|
||||
loader_version=0.16.8
|
||||
loader_version=0.16.9
|
||||
installer_version=1.0.1
|
||||
|
||||
prerelease=false
|
||||
curseforge_minecraft_version=1.21.3
|
||||
prerelease=true
|
||||
curseforge_minecraft_version=1.21.2-Snapshot
|
||||
|
||||
# Do not manually update, use the bumpversions task:
|
||||
fabric-api-base-version=0.4.49
|
||||
fabric-api-lookup-api-v1-version=1.6.79
|
||||
fabric-biome-api-v1-version=14.0.6
|
||||
fabric-block-api-v1-version=1.0.28
|
||||
fabric-block-view-api-v2-version=1.0.16
|
||||
fabric-blockrenderlayer-v1-version=2.0.3
|
||||
fabric-command-api-v1-version=1.2.57
|
||||
fabric-command-api-v2-version=2.2.36
|
||||
fabric-commands-v0-version=0.2.74
|
||||
fabric-content-registries-v0-version=9.1.6
|
||||
fabric-crash-report-info-v1-version=0.3.3
|
||||
fabric-data-attachment-api-v1-version=1.2.0
|
||||
fabric-data-generation-api-v1-version=21.0.15
|
||||
fabric-dimensions-v1-version=4.0.7
|
||||
fabric-entity-events-v1-version=2.0.6
|
||||
fabric-events-interaction-v0-version=2.0.10
|
||||
fabric-game-rule-api-v1-version=1.0.59
|
||||
fabric-gametest-api-v1-version=2.0.14
|
||||
fabric-item-api-v1-version=11.1.6
|
||||
fabric-item-group-api-v1-version=4.1.16
|
||||
fabric-key-binding-api-v1-version=1.0.53
|
||||
fabric-keybindings-v0-version=0.2.51
|
||||
fabric-lifecycle-events-v1-version=2.4.0
|
||||
fabric-loot-api-v2-version=3.0.25
|
||||
fabric-loot-api-v3-version=1.0.13
|
||||
fabric-message-api-v1-version=6.0.20
|
||||
fabric-model-loading-api-v1-version=3.0.8
|
||||
fabric-networking-api-v1-version=4.3.4
|
||||
fabric-object-builder-api-v1-version=17.0.8
|
||||
fabric-particles-v1-version=4.0.9
|
||||
fabric-recipe-api-v1-version=7.0.3
|
||||
fabric-registry-sync-v0-version=5.2.1
|
||||
fabric-renderer-api-v1-version=4.0.4
|
||||
fabric-renderer-indigo-version=1.9.4
|
||||
fabric-rendering-data-attachment-v1-version=0.3.54
|
||||
fabric-rendering-fluids-v1-version=3.1.14
|
||||
fabric-rendering-v0-version=1.1.82
|
||||
fabric-rendering-v1-version=8.0.6
|
||||
fabric-resource-conditions-api-v1-version=5.0.8
|
||||
fabric-resource-loader-v0-version=3.0.6
|
||||
fabric-screen-api-v1-version=2.0.33
|
||||
fabric-screen-handler-api-v1-version=1.3.99
|
||||
fabric-sound-api-v1-version=1.0.29
|
||||
fabric-transfer-api-v1-version=5.4.1
|
||||
fabric-transitive-access-wideners-v1-version=6.1.8
|
||||
fabric-convention-tags-v1-version=2.1.1
|
||||
fabric-convention-tags-v2-version=2.9.1
|
||||
fabric-client-tags-api-v1-version=1.1.23
|
||||
fabric-api-base-version=0.4.50
|
||||
fabric-api-lookup-api-v1-version=1.6.80
|
||||
fabric-biome-api-v1-version=15.0.0
|
||||
fabric-block-api-v1-version=1.0.29
|
||||
fabric-block-view-api-v2-version=1.0.17
|
||||
fabric-blockrenderlayer-v1-version=2.0.4
|
||||
fabric-command-api-v1-version=1.2.58
|
||||
fabric-command-api-v2-version=2.2.37
|
||||
fabric-commands-v0-version=0.2.75
|
||||
fabric-content-registries-v0-version=9.1.7
|
||||
fabric-crash-report-info-v1-version=0.3.4
|
||||
fabric-data-attachment-api-v1-version=1.2.1
|
||||
fabric-data-generation-api-v1-version=21.0.16
|
||||
fabric-dimensions-v1-version=4.0.8
|
||||
fabric-entity-events-v1-version=2.0.7
|
||||
fabric-events-interaction-v0-version=3.0.0
|
||||
fabric-game-rule-api-v1-version=1.0.60
|
||||
fabric-gametest-api-v1-version=2.0.15
|
||||
fabric-item-api-v1-version=11.1.7
|
||||
fabric-item-group-api-v1-version=4.1.17
|
||||
fabric-key-binding-api-v1-version=1.0.54
|
||||
fabric-keybindings-v0-version=0.2.52
|
||||
fabric-lifecycle-events-v1-version=2.4.1
|
||||
fabric-loot-api-v2-version=3.0.26
|
||||
fabric-loot-api-v3-version=1.0.14
|
||||
fabric-message-api-v1-version=6.0.21
|
||||
fabric-model-loading-api-v1-version=3.0.9
|
||||
fabric-networking-api-v1-version=4.3.5
|
||||
fabric-object-builder-api-v1-version=17.0.9
|
||||
fabric-particles-v1-version=4.0.10
|
||||
fabric-recipe-api-v1-version=7.0.4
|
||||
fabric-registry-sync-v0-version=5.2.2
|
||||
fabric-renderer-api-v1-version=4.0.5
|
||||
fabric-renderer-indigo-version=1.9.5
|
||||
fabric-rendering-data-attachment-v1-version=0.3.55
|
||||
fabric-rendering-fluids-v1-version=3.1.15
|
||||
fabric-rendering-v0-version=1.1.83
|
||||
fabric-rendering-v1-version=8.0.7
|
||||
fabric-resource-conditions-api-v1-version=5.0.9
|
||||
fabric-resource-loader-v0-version=3.0.7
|
||||
fabric-screen-api-v1-version=2.0.34
|
||||
fabric-screen-handler-api-v1-version=1.3.100
|
||||
fabric-sound-api-v1-version=1.0.30
|
||||
fabric-transfer-api-v1-version=5.4.2
|
||||
fabric-transitive-access-wideners-v1-version=6.1.9
|
||||
fabric-convention-tags-v1-version=2.1.2
|
||||
fabric-convention-tags-v2-version=2.9.2
|
||||
fabric-client-tags-api-v1-version=1.1.24
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
"FabricMC"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.8",
|
||||
"fabricloader": ">=0.16.9",
|
||||
"java": ">=21",
|
||||
"minecraft": ">=1.21.2- <1.21.4-"
|
||||
"minecraft": ">=1.21.4- <1.21.5-"
|
||||
},
|
||||
"description": "Core API module providing key hooks and intercompatibility features."
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue