mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-15 00:14:28 -04:00
22w15a
This commit is contained in:
parent
d9b4801bcd
commit
8eae451042
32 changed files with 92 additions and 75 deletions
fabric-biome-api-v1/src/main/java/net/fabricmc/fabric
api/biome/v1
impl/biome
fabric-data-generation-api-v1/src/main
fabric-item-api-v1/src/main/java/net/fabricmc/fabric/mixin/item
fabric-models-v0/src/testmod/java/net/fabricmc/fabric/test/model
fabric-object-builder-api-v1/src
main/java/net/fabricmc/fabric/mixin/object/builder
testmod/java/net/fabricmc/fabric/test/object/builder
fabric-particles-v1/src/main/java/net/fabricmc/fabric/impl/client/particle
fabric-renderer-api-v1/src
main/java/net/fabricmc/fabric
api/renderer/v1/model
mixin/renderer/client
testmod/java/net/fabricmc/fabric/test/renderer/simple/client
fabric-renderer-indigo/src/main/java/net/fabricmc/fabric
impl/client/indigo/renderer/render
mixin/client/indigo/renderer
fabric-rendering-v1/src/testmod/java/net/fabricmc/fabric/test/rendering/client
fabric-screen-api-v1/src/testmod/java/net/fabricmc/fabric/test/screen
gradle.properties
|
@ -27,7 +27,7 @@ import net.minecraft.world.biome.Biome;
|
|||
import net.minecraft.world.dimension.DimensionOptions;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
import net.minecraft.world.gen.feature.StructureFeature;
|
||||
import net.minecraft.world.gen.structure.StructureType;
|
||||
|
||||
import net.fabricmc.fabric.impl.biome.modification.BuiltInRegistryKeys;
|
||||
|
||||
|
@ -119,10 +119,10 @@ public interface BiomeSelectionContext {
|
|||
* Returns true if the given built-in configured structure from {@link net.minecraft.util.registry.BuiltinRegistries}
|
||||
* can start in this biome in any of the chunk generators used by the current world-save.
|
||||
*
|
||||
* <p>This method is intended for use with the Vanilla configured structures found in {@link net.minecraft.world.gen.feature.ConfiguredStructureFeatures}.
|
||||
* <p>This method is intended for use with the Vanilla configured structures found in {@link net.minecraft.world.gen.structure.StructureTypes}.
|
||||
*/
|
||||
default boolean validForBuiltInStructure(StructureFeature structureFeature) {
|
||||
RegistryKey<StructureFeature> key = BuiltInRegistryKeys.get(structureFeature);
|
||||
default boolean validForBuiltInStructure(StructureType structureFeature) {
|
||||
RegistryKey<StructureType> key = BuiltInRegistryKeys.get(structureFeature);
|
||||
return validForStructure(key);
|
||||
}
|
||||
|
||||
|
@ -130,14 +130,14 @@ public interface BiomeSelectionContext {
|
|||
* Returns true if the configured structure with the given key can start in this biome in any chunk generator
|
||||
* used by the current world-save.
|
||||
*/
|
||||
boolean validForStructure(RegistryKey<StructureFeature> key);
|
||||
boolean validForStructure(RegistryKey<StructureType> key);
|
||||
|
||||
/**
|
||||
* Tries to retrieve the registry key for the given configured feature, which should be from this biomes
|
||||
* current structure list. May be empty if the configured feature is not registered, or does not come
|
||||
* from this biomes feature list.
|
||||
*/
|
||||
Optional<RegistryKey<StructureFeature>> getStructureKey(StructureFeature structureFeature);
|
||||
Optional<RegistryKey<StructureType>> getStructureKey(StructureType structureFeature);
|
||||
|
||||
/**
|
||||
* Tries to determine whether this biome generates in a specific dimension, based on the {@link net.minecraft.world.gen.GeneratorOptions}
|
||||
|
|
|
@ -34,7 +34,7 @@ import net.minecraft.world.biome.BiomeKeys;
|
|||
import net.minecraft.world.biome.source.TheEndBiomeSource;
|
||||
import net.minecraft.world.biome.source.util.MultiNoiseUtil;
|
||||
import net.minecraft.world.gen.random.AtomicSimpleRandom;
|
||||
import net.minecraft.world.gen.random.ChunkRandom;
|
||||
import net.minecraft.util.math.random.ChunkRandom;
|
||||
|
||||
/**
|
||||
* Internal data for modding Vanilla's {@link TheEndBiomeSource}.
|
||||
|
|
|
@ -54,7 +54,7 @@ import net.minecraft.world.gen.GenerationStep;
|
|||
import net.minecraft.world.gen.carver.ConfiguredCarver;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
import net.minecraft.world.gen.feature.StructureFeature;
|
||||
import net.minecraft.world.gen.structure.StructureType;
|
||||
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeModificationContext;
|
||||
|
||||
|
@ -197,7 +197,7 @@ public class BiomeModificationContextImpl implements BiomeModificationContext {
|
|||
private class GenerationSettingsContextImpl implements GenerationSettingsContext {
|
||||
private final Registry<ConfiguredCarver<?>> carvers = registries.get(Registry.CONFIGURED_CARVER_KEY);
|
||||
private final Registry<PlacedFeature> features = registries.get(Registry.PLACED_FEATURE_KEY);
|
||||
private final Registry<StructureFeature> structures = registries.get(Registry.CONFIGURED_STRUCTURE_FEATURE_KEY);
|
||||
private final Registry<StructureType> structures = registries.get(Registry.STRUCTURE_KEY);
|
||||
private final GenerationSettings generationSettings = biome.getGenerationSettings();
|
||||
|
||||
private boolean rebuildFlowerFeatures;
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.world.biome.Biome;
|
|||
import net.minecraft.world.dimension.DimensionOptions;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
import net.minecraft.world.gen.feature.StructureFeature;
|
||||
import net.minecraft.world.gen.structure.StructureType;
|
||||
import net.minecraft.world.level.LevelProperties;
|
||||
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeSelectionContext;
|
||||
|
@ -78,8 +78,8 @@ public class BiomeSelectionContextImpl implements BiomeSelectionContext {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean validForStructure(RegistryKey<StructureFeature> key) {
|
||||
StructureFeature instance = dynamicRegistries.get(Registry.CONFIGURED_STRUCTURE_FEATURE_KEY).get(key);
|
||||
public boolean validForStructure(RegistryKey<StructureType> key) {
|
||||
StructureType instance = dynamicRegistries.get(Registry.STRUCTURE_KEY).get(key);
|
||||
|
||||
if (instance == null) {
|
||||
return false;
|
||||
|
@ -89,8 +89,8 @@ public class BiomeSelectionContextImpl implements BiomeSelectionContext {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Optional<RegistryKey<StructureFeature>> getStructureKey(StructureFeature structureFeature) {
|
||||
Registry<StructureFeature> registry = dynamicRegistries.get(Registry.CONFIGURED_STRUCTURE_FEATURE_KEY);
|
||||
public Optional<RegistryKey<StructureType>> getStructureKey(StructureType structureFeature) {
|
||||
Registry<StructureType> registry = dynamicRegistries.get(Registry.STRUCTURE_KEY);
|
||||
return registry.getKey(structureFeature);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraft.util.registry.RegistryKey;
|
|||
import net.minecraft.world.gen.carver.ConfiguredCarver;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
import net.minecraft.world.gen.feature.StructureFeature;
|
||||
import net.minecraft.world.gen.structure.StructureType;
|
||||
|
||||
/**
|
||||
* Utility class for getting the registry keys of built-in worldgen objects and throwing proper exceptions if they
|
||||
|
@ -34,8 +34,8 @@ public final class BuiltInRegistryKeys {
|
|||
private BuiltInRegistryKeys() {
|
||||
}
|
||||
|
||||
public static RegistryKey<StructureFeature> get(StructureFeature structureFeature) {
|
||||
return BuiltinRegistries.CONFIGURED_STRUCTURE_FEATURE.getKey(structureFeature)
|
||||
public static RegistryKey<StructureType> get(StructureType structureFeature) {
|
||||
return BuiltinRegistries.STRUCTURE.getKey(structureFeature)
|
||||
.orElseThrow(() -> new IllegalArgumentException("Given structure is not built-in: " + structureFeature));
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.util.function.Function;
|
|||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.DataProvider;
|
||||
|
||||
|
@ -36,7 +37,7 @@ public final class FabricDataGenerator extends DataGenerator {
|
|||
|
||||
@ApiStatus.Internal
|
||||
public FabricDataGenerator(Path output, ModContainer mod, boolean strictValidation) {
|
||||
super(output, Collections.emptyList());
|
||||
super(output, Collections.emptyList(), SharedConstants.getGameVersion(), true);
|
||||
this.modContainer = mod;
|
||||
this.strictValidation = strictValidation;
|
||||
}
|
||||
|
@ -47,11 +48,27 @@ public final class FabricDataGenerator extends DataGenerator {
|
|||
* @return The {@link DataProvider}
|
||||
*/
|
||||
public <P extends DataProvider> P addProvider(Function<FabricDataGenerator, P> provider) {
|
||||
return addProvider(true, provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper overloaded method to aid with registering a {@link DataProvider} that has a single argument constructor for a {@link FabricDataGenerator}.
|
||||
*
|
||||
* @return The {@link DataProvider}
|
||||
*/
|
||||
public <P extends DataProvider> P addProvider(boolean include, Function<FabricDataGenerator, P> provider) {
|
||||
P p = provider.apply(this);
|
||||
addProvider(p);
|
||||
addProvider(include, p);
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper overloaded method to aid with registering a {@link DataProvider}.
|
||||
*/
|
||||
public void addProvider(DataProvider dataProvider) {
|
||||
super.addProvider(true, dataProvider);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link ModContainer} for the mod that this data generator has been created for.
|
||||
*
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.google.gson.GsonBuilder;
|
|||
import com.google.gson.JsonObject;
|
||||
|
||||
import net.minecraft.advancement.Advancement;
|
||||
import net.minecraft.data.DataCache;
|
||||
import net.minecraft.class_7403;
|
||||
import net.minecraft.data.DataProvider;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
|
@ -69,7 +69,7 @@ public abstract class FabricAdvancementProvider implements DataProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void run(DataCache cache) throws IOException {
|
||||
public void run(class_7403 cache) throws IOException {
|
||||
final Set<Identifier> identifiers = Sets.newHashSet();
|
||||
final Set<Advancement> advancements = Sets.newHashSet();
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import com.google.gson.GsonBuilder;
|
|||
import com.google.gson.JsonObject;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import net.minecraft.data.DataCache;
|
||||
import net.minecraft.class_7403;
|
||||
import net.minecraft.data.DataProvider;
|
||||
import net.minecraft.loot.LootManager;
|
||||
import net.minecraft.loot.LootTable;
|
||||
|
@ -69,7 +69,7 @@ public interface FabricLootTableProvider extends Consumer<BiConsumer<Identifier,
|
|||
|
||||
@ApiStatus.Internal
|
||||
@Override
|
||||
default void run(DataCache cache) throws IOException {
|
||||
default void run(class_7403 cache) throws IOException {
|
||||
HashMap<Identifier, LootTable> builders = Maps.newHashMap();
|
||||
HashMap<Identifier, ConditionJsonProvider[]> conditionMap = new HashMap<>();
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import com.google.common.base.Preconditions;
|
|||
import com.google.common.collect.Sets;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import net.minecraft.data.DataCache;
|
||||
import net.minecraft.class_7403;
|
||||
import net.minecraft.data.server.RecipeProvider;
|
||||
import net.minecraft.data.server.recipe.RecipeJsonProvider;
|
||||
import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder;
|
||||
|
@ -65,7 +65,7 @@ public abstract class FabricRecipeProvider extends RecipeProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void run(DataCache cache) {
|
||||
public void run(class_7403 cache) {
|
||||
Path path = this.root.getOutput();
|
||||
Set<Identifier> generatedRecipes = Sets.newHashSet();
|
||||
generateRecipes(provider -> {
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.data.DataCache;
|
||||
import net.minecraft.class_7403;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.client.BlockStateModelGenerator;
|
||||
import net.minecraft.data.client.BlockStateSupplier;
|
||||
|
@ -76,12 +76,12 @@ public class ModelProviderMixin {
|
|||
}
|
||||
|
||||
@Inject(method = "run", at = @At("HEAD"))
|
||||
private void runHead(DataCache cache, CallbackInfo ci) {
|
||||
private void runHead(class_7403 cache, CallbackInfo ci) {
|
||||
dataGeneratorThreadLocal.set(generator);
|
||||
}
|
||||
|
||||
@Inject(method = "run", at = @At("TAIL"))
|
||||
private void runTail(DataCache cache, CallbackInfo ci) {
|
||||
private void runTail(class_7403 cache, CallbackInfo ci) {
|
||||
dataGeneratorThreadLocal.remove();
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ transitive-accessible method net/minecraft/data/client/TextureKey of (Ljava/
|
|||
transitive-extendable method net/minecraft/data/server/AbstractTagProvider getOutput (Lnet/minecraft/util/Identifier;)Ljava/nio/file/Path;
|
||||
transitive-extendable method net/minecraft/data/server/AbstractTagProvider$ObjectBuilder add ([Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/data/server/AbstractTagProvider$ObjectBuilder;
|
||||
|
||||
transitive-accessible method net/minecraft/data/server/RecipeProvider saveRecipe (Lnet/minecraft/data/DataCache;Lcom/google/gson/JsonObject;Ljava/nio/file/Path;)V
|
||||
transitive-accessible method net/minecraft/data/server/RecipeProvider saveRecipeAdvancement (Lnet/minecraft/data/DataCache;Lcom/google/gson/JsonObject;Ljava/nio/file/Path;)V
|
||||
transitive-accessible method net/minecraft/data/server/RecipeProvider saveRecipe (Lnet/minecraft/class_7403;Lcom/google/gson/JsonObject;Ljava/nio/file/Path;)V
|
||||
transitive-accessible method net/minecraft/data/server/RecipeProvider saveRecipeAdvancement (Lnet/minecraft/class_7403;Lcom/google/gson/JsonObject;Ljava/nio/file/Path;)V
|
||||
transitive-accessible method net/minecraft/data/server/RecipeProvider generate (Ljava/util/function/Consumer;)V
|
||||
transitive-accessible method net/minecraft/data/server/RecipeProvider offerSingleOutputShapelessRecipe (Ljava/util/function/Consumer;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;)V
|
||||
transitive-accessible method net/minecraft/data/server/RecipeProvider offerShapelessRecipe (Ljava/util/function/Consumer;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;I)V
|
||||
|
|
|
@ -55,7 +55,7 @@ public abstract class ItemStackMixin {
|
|||
this.fabric_breakCallback = breakCallback;
|
||||
}
|
||||
|
||||
@ModifyArg(method = "damage(ILnet/minecraft/entity/LivingEntity;Ljava/util/function/Consumer;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;damage(ILnet/minecraft/world/gen/random/AbstractRandom;Lnet/minecraft/server/network/ServerPlayerEntity;)Z"), index = 0)
|
||||
@ModifyArg(method = "damage(ILnet/minecraft/entity/LivingEntity;Ljava/util/function/Consumer;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;damage(ILnet/minecraft/util/math/random/AbstractRandom;Lnet/minecraft/server/network/ServerPlayerEntity;)Z"), index = 0)
|
||||
private int hookDamage(int amount) {
|
||||
CustomDamageHandler handler = ((ItemExtensions) getItem()).fabric_getCustomDamageHandler();
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ import net.minecraft.client.render.model.BakedModel;
|
|||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
public class BakedModelRenderer {
|
||||
private static final Direction[] CULL_FACES = ArrayUtils.add(Direction.values(), null);
|
||||
private static final AbstractRandom RANDOM = AbstractRandom.method_43047();
|
||||
private static final AbstractRandom RANDOM = AbstractRandom.createAtomic();
|
||||
|
||||
public static void renderBakedModel(BakedModel model, VertexConsumer vertices, MatrixStack.Entry entry, int light) {
|
||||
for (Direction cullFace : CULL_FACES) {
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.registry.DefaultedRegistry;
|
||||
import net.minecraft.village.TradeOffer;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
@Mixin(targets = "net/minecraft/village/TradeOffers$TypeAwareBuyForOneEmeraldFactory")
|
||||
public abstract class TypeAwareTradeMixin {
|
||||
|
|
|
@ -19,7 +19,7 @@ package net.fabricmc.fabric.test.object.builder;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.village.TradeOffer;
|
||||
import net.minecraft.village.TradeOffers;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
class SimpleTradeFactory implements TradeOffers.Factory {
|
||||
private final TradeOffer offer;
|
||||
|
|
|
@ -31,7 +31,7 @@ import net.minecraft.text.LiteralText;
|
|||
import net.minecraft.village.TradeOffer;
|
||||
import net.minecraft.village.TradeOffers;
|
||||
import net.minecraft.village.VillagerProfession;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
|
||||
|
@ -68,7 +68,7 @@ public class VillagerTypeTest1 implements ModInitializer {
|
|||
|
||||
for (TradeOffers.Factory[] value : TradeOffers.WANDERING_TRADER_TRADES.values()) {
|
||||
for (TradeOffers.Factory factory : value) {
|
||||
final TradeOffer result = factory.create(trader, AbstractRandom.method_43047());
|
||||
final TradeOffer result = factory.create(trader, AbstractRandom.createAtomic());
|
||||
|
||||
if (result == null) {
|
||||
continue;
|
||||
|
|
|
@ -22,7 +22,7 @@ import net.minecraft.client.particle.ParticleManager;
|
|||
import net.minecraft.client.particle.SpriteProvider;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.client.particle.v1.FabricSpriteProvider;
|
||||
import net.fabricmc.fabric.mixin.client.particle.ParticleManagerAccessor;
|
||||
|
|
|
@ -26,7 +26,7 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.Renderer;
|
||||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import net.minecraft.client.render.model.BakedModel;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
|
||||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
|
|
|
@ -37,7 +37,7 @@ import net.minecraft.client.render.model.MultipartBakedModel;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
|
||||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
|
|
|
@ -35,7 +35,7 @@ import net.minecraft.util.collection.Weighted;
|
|||
import net.minecraft.util.collection.Weighting;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
|
||||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
|
|
|
@ -34,7 +34,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView;
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.Matrix3f;
|
||||
import net.minecraft.util.math.Matrix4f;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter;
|
||||
|
|
|
@ -26,7 +26,7 @@ import net.minecraft.client.render.RenderLayers;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.material.BlendMode;
|
||||
|
||||
|
@ -39,7 +39,7 @@ import net.fabricmc.fabric.api.renderer.v1.material.BlendMode;
|
|||
*/
|
||||
public class BlockRenderInfo {
|
||||
private final BlockColors blockColorMap = MinecraftClient.getInstance().getBlockColors();
|
||||
private final AbstractRandom random = AbstractRandom.method_43047();
|
||||
private final AbstractRandom random = AbstractRandom.createAtomic();
|
||||
public BlockRenderView blockView;
|
||||
public BlockPos blockPos;
|
||||
public BlockState blockState;
|
||||
|
|
|
@ -37,7 +37,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Matrix4f;
|
||||
import net.minecraft.util.math.Vec3f;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.material.BlendMode;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
|
@ -68,7 +68,7 @@ public class ItemRenderContext extends AbstractRenderContext implements RenderCo
|
|||
}
|
||||
|
||||
private final ItemColors colorMap;
|
||||
private final AbstractRandom random = AbstractRandom.method_43047();
|
||||
private final AbstractRandom random = AbstractRandom.createAtomic();
|
||||
private final Consumer<BakedModel> fallbackConsumer;
|
||||
private final Vec3f normalVec = new Vec3f();
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import net.minecraft.client.render.VertexConsumer;
|
|||
import net.minecraft.client.render.model.BakedModel;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter;
|
||||
import net.fabricmc.fabric.api.renderer.v1.model.ModelHelper;
|
||||
|
|
|
@ -33,7 +33,7 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
|
||||
import net.fabricmc.fabric.impl.client.indigo.renderer.accessor.AccessBlockModelRenderer;
|
||||
|
@ -47,7 +47,7 @@ public abstract class MixinBlockModelRenderer implements AccessBlockModelRendere
|
|||
|
||||
private final ThreadLocal<BlockRenderContext> CONTEXTS = ThreadLocal.withInitial(BlockRenderContext::new);
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "render(Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/client/render/model/BakedModel;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/world/gen/random/AbstractRandom;JI)Z", cancellable = true)
|
||||
@Inject(at = @At("HEAD"), method = "render(Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/client/render/model/BakedModel;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/util/math/random/AbstractRandom;JI)Z", cancellable = true)
|
||||
private void hookRender(BlockRenderView blockView, BakedModel model, BlockState state, BlockPos pos, MatrixStack matrix, VertexConsumer buffer, boolean checkSides, AbstractRandom rand, long seed, int overlay, CallbackInfoReturnable<Boolean> ci) {
|
||||
if (!((FabricBakedModel) model).isVanillaAdapter()) {
|
||||
BlockRenderContext context = CONTEXTS.get();
|
||||
|
|
|
@ -40,7 +40,7 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
|
||||
import net.fabricmc.fabric.impl.client.indigo.Indigo;
|
||||
|
@ -98,7 +98,7 @@ public class MixinChunkRebuildTask {
|
|||
* driven off of render type. (Not recommended or encouraged, but also not prevented.)
|
||||
*/
|
||||
@Redirect(method = "Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask;render(FFFLnet/minecraft/client/render/chunk/ChunkBuilder$ChunkData;Lnet/minecraft/client/render/chunk/BlockBufferBuilderStorage;)Ljava/util/Set;", require = 1, at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/render/block/BlockRenderManager;renderBlock(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/world/gen/random/AbstractRandom;)Z"))
|
||||
target = "Lnet/minecraft/client/render/block/BlockRenderManager;renderBlock(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/util/math/random/AbstractRandom;)Z"))
|
||||
private boolean hookChunkBuildTesselate(BlockRenderManager renderManager, BlockState blockState, BlockPos blockPos, BlockRenderView blockView, MatrixStack matrix, VertexConsumer bufferBuilder, boolean checkSides, AbstractRandom random) {
|
||||
if (blockState.getRenderType() == BlockRenderType.MODEL) {
|
||||
final BakedModel model = renderManager.getModel(blockState);
|
||||
|
|
|
@ -62,7 +62,7 @@ public class FeatureRendererGenericTests implements ClientModInitializer {
|
|||
|
||||
if (entityRenderer instanceof BipedEntityRenderer) {
|
||||
// It works, method ref is encouraged
|
||||
registrationHelper.register(new HeldItemFeatureRenderer<>((BipedEntityRenderer<?, ?>) entityRenderer));
|
||||
registrationHelper.register(new HeldItemFeatureRenderer<>((BipedEntityRenderer<?, ?>) entityRenderer, context.method_43338()));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class FeatureRendererGenericTests implements ClientModInitializer {
|
|||
|
||||
if (entityRenderer instanceof BipedEntityRenderer) {
|
||||
// It works, method ref is encouraged
|
||||
registrationHelper.register(new HeldItemFeatureRenderer<>((BipedEntityRenderer<?, ?>) entityRenderer));
|
||||
registrationHelper.register(new HeldItemFeatureRenderer<>((BipedEntityRenderer<?, ?>) entityRenderer, context.method_43338()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@ import net.minecraft.sound.SoundEvents;
|
|||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.world.gen.random.AbstractRandom;
|
||||
import net.minecraft.util.math.random.AbstractRandom;
|
||||
|
||||
class SoundButton extends PressableWidget {
|
||||
private static final AbstractRandom RANDOM = AbstractRandom.method_43047();
|
||||
private static final AbstractRandom RANDOM = AbstractRandom.createAtomic();
|
||||
|
||||
SoundButton(int x, int y, int width, int height) {
|
||||
super(x, y, width, height, Text.of("Sound Button"));
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
org.gradle.jvmargs=-Xmx2560M
|
||||
|
||||
version=0.50.0
|
||||
minecraft_version=22w14a
|
||||
yarn_version=+build.2
|
||||
version=0.50.1
|
||||
minecraft_version=22w15a
|
||||
yarn_version=+build.1
|
||||
loader_version=0.13.3
|
||||
|
||||
prerelease=true
|
||||
|
@ -10,44 +10,44 @@ prerelease=true
|
|||
# Do not manually update, use the bumpversions task:
|
||||
fabric-api-base-version=0.4.4
|
||||
fabric-api-lookup-api-v1-version=1.6.0
|
||||
fabric-biome-api-v1-version=9.0.3
|
||||
fabric-biome-api-v1-version=9.0.4
|
||||
fabric-blockrenderlayer-v1-version=1.1.12
|
||||
fabric-command-api-v1-version=1.1.11
|
||||
fabric-commands-v0-version=0.2.10
|
||||
fabric-containers-v0-version=0.1.21
|
||||
fabric-content-registries-v0-version=3.0.8
|
||||
fabric-crash-report-info-v1-version=0.1.11
|
||||
fabric-data-generation-api-v1-version=2.0.11
|
||||
fabric-data-generation-api-v1-version=3.0.0
|
||||
fabric-dimensions-v1-version=2.1.19
|
||||
fabric-entity-events-v1-version=1.4.10
|
||||
fabric-events-interaction-v0-version=0.4.21
|
||||
fabric-events-lifecycle-v0-version=0.2.15
|
||||
fabric-events-lifecycle-v0-version=0.2.16
|
||||
fabric-game-rule-api-v1-version=1.0.13
|
||||
fabric-gametest-api-v1-version=1.0.21
|
||||
fabric-item-api-v1-version=1.4.0
|
||||
fabric-item-api-v1-version=1.4.1
|
||||
fabric-item-groups-v0-version=0.3.16
|
||||
fabric-key-binding-api-v1-version=1.0.12
|
||||
fabric-keybindings-v0-version=0.2.10
|
||||
fabric-lifecycle-events-v1-version=2.0.3
|
||||
fabric-loot-tables-v1-version=1.0.11
|
||||
fabric-mining-level-api-v1-version=2.1.0
|
||||
fabric-models-v0-version=0.3.7
|
||||
fabric-models-v0-version=0.3.8
|
||||
fabric-networking-api-v1-version=1.0.21
|
||||
fabric-networking-v0-version=0.3.8
|
||||
fabric-object-builder-api-v1-version=3.1.0
|
||||
fabric-particles-v1-version=1.0.0
|
||||
fabric-object-builder-api-v1-version=3.1.1
|
||||
fabric-particles-v1-version=1.0.1
|
||||
fabric-registry-sync-v0-version=0.9.8
|
||||
fabric-renderer-api-v1-version=1.0.0
|
||||
fabric-renderer-indigo-version=0.4.18
|
||||
fabric-renderer-registries-v1-version=3.2.11
|
||||
fabric-renderer-api-v1-version=1.0.1
|
||||
fabric-renderer-indigo-version=0.4.19
|
||||
fabric-renderer-registries-v1-version=3.2.12
|
||||
fabric-rendering-data-attachment-v1-version=0.3.7
|
||||
fabric-rendering-fluids-v1-version=2.0.2
|
||||
fabric-rendering-v0-version=1.1.13
|
||||
fabric-rendering-v1-version=1.10.7
|
||||
fabric-rendering-v0-version=1.1.14
|
||||
fabric-rendering-v1-version=1.10.8
|
||||
fabric-resource-conditions-api-v1-version=2.0.3
|
||||
fabric-resource-loader-v0-version=0.4.23
|
||||
fabric-screen-api-v1-version=1.0.15
|
||||
fabric-screen-api-v1-version=1.0.16
|
||||
fabric-screen-handler-api-v1-version=1.2.0
|
||||
fabric-textures-v0-version=1.0.12
|
||||
fabric-transfer-api-v1-version=1.6.0
|
||||
fabric-transitive-access-wideners-v1-version=1.0.1
|
||||
fabric-transitive-access-wideners-v1-version=1.0.2
|
||||
|
|
Loading…
Add table
Reference in a new issue