mirror of
https://github.com/FabricMC/fabric.git
synced 2025-07-29 15:39:55 -04:00
23w06a
This commit is contained in:
parent
2590abe7d3
commit
57338cbe24
20 changed files with 64 additions and 74 deletions
fabric-data-generation-api-v1/src/main/resources
fabric-entity-events-v1/src/testmod/java/net/fabricmc/fabric/test/entity/event
fabric-gametest-api-v1/src/main/java/net/fabricmc/fabric/mixin/gametest/server
fabric-item-api-v1/src/main/java/net/fabricmc/fabric/mixin/item
fabric-item-group-api-v1/src
client/java/net/fabricmc/fabric/mixin/itemgroup/client
main
java/net/fabricmc/fabric
resources
testmod/java/net/fabricmc/fabric/test/item/group
fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric
fabric-renderer-indigo/src/client/java/net/fabricmc/fabric
impl/client/indigo/renderer/render
mixin/client/indigo/renderer
fabric-rendering-v1/src/client/java/net/fabricmc/fabric
api/client/rendering/v1
mixin/client/rendering
fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/impl/transfer/fluid
fabric-transitive-access-wideners-v1
gradle.properties
|
@ -292,7 +292,7 @@ transitive-accessible method net/minecraft/data/client/ItemModelGenerator regist
|
|||
transitive-accessible method net/minecraft/data/client/ItemModelGenerator registerCompass (Lnet/minecraft/item/Item;)V
|
||||
transitive-accessible method net/minecraft/data/client/ItemModelGenerator registerClock (Lnet/minecraft/item/Item;)V
|
||||
transitive-accessible method net/minecraft/data/client/ItemModelGenerator uploadArmor (Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)V
|
||||
transitive-accessible method net/minecraft/data/client/ItemModelGenerator method_48742 (Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)V
|
||||
transitive-accessible method net/minecraft/data/client/ItemModelGenerator uploadArmor (Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)V
|
||||
transitive-accessible method net/minecraft/data/client/ItemModelGenerator suffixTrim (Lnet/minecraft/util/Identifier;Ljava/lang/String;)Lnet/minecraft/util/Identifier;
|
||||
transitive-accessible method net/minecraft/data/client/ItemModelGenerator createArmorJson (Lnet/minecraft/util/Identifier;Ljava/util/Map;Lnet/minecraft/item/ArmorMaterial;)Lcom/google/gson/JsonObject;
|
||||
transitive-accessible method net/minecraft/data/client/ItemModelGenerator registerArmor (Lnet/minecraft/item/ArmorItem;)V
|
||||
|
|
|
@ -23,13 +23,15 @@ import net.minecraft.block.AbstractBlock;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
import net.minecraft.class_8111;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.server.command.CommandManager;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.ActionResult;
|
||||
|
@ -37,8 +39,6 @@ import net.minecraft.util.Hand;
|
|||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
|
@ -82,7 +82,7 @@ public final class EntityEventTests implements ModInitializer {
|
|||
|
||||
// No fall damage if holding a feather in the main hand
|
||||
ServerLivingEntityEvents.ALLOW_DAMAGE.register((entity, source, amount) -> {
|
||||
if (source == DamageSource.FALL && entity.getStackInHand(Hand.MAIN_HAND).isOf(Items.FEATHER)) {
|
||||
if (source.method_48793().matchesKey(class_8111.field_42345) && entity.getStackInHand(Hand.MAIN_HAND).isOf(Items.FEATHER)) {
|
||||
LOGGER.info("Avoided {} of fall damage by holding a feather", amount);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class MainMixin {
|
|||
|
||||
// Inject after resourcePackManager is stored
|
||||
@Inject(method = "main", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", shift = At.Shift.BY, by = 2, target = "Lnet/minecraft/resource/VanillaDataPackProvider;createManager(Ljava/nio/file/Path;)Lnet/minecraft/resource/ResourcePackManager;"))
|
||||
private static void main(String[] args, CallbackInfo info, OptionParser optionParser, OptionSpec optionSpec, OptionSpec optionSpec2, OptionSpec optionSpec3, OptionSpec optionSpec4, OptionSpec optionSpec5, OptionSpec optionSpec6, OptionSpec optionSpec7, OptionSpec optionSpec8, OptionSpec optionSpec9, OptionSpec optionSpec10, OptionSpec optionSpec11, OptionSpec optionSpec12, OptionSpec optionSpec13, OptionSpec optionSpec14, OptionSpec optionSpec15, OptionSet optionSet, Path path, ServerPropertiesLoader serverPropertiesLoader, Path path2, EulaReader eulaReader, File file, ApiServices lv, String string, LevelStorage levelStorage, LevelStorage.Session session, LevelSummary levelSummary, boolean bl, ResourcePackManager resourcePackManager) {
|
||||
private static void main(String[] args, CallbackInfo info, OptionParser optionParser, OptionSpec optionSpec, OptionSpec optionSpec2, OptionSpec optionSpec3, OptionSpec optionSpec4, OptionSpec optionSpec5, OptionSpec optionSpec6, OptionSpec optionSpec7, OptionSpec optionSpec8, OptionSpec optionSpec9, OptionSpec optionSpec10, OptionSpec optionSpec11, OptionSpec optionSpec12, OptionSpec optionSpec13, OptionSpec optionSpec14, OptionSpec optionSpec15, OptionSpec optionSpec16, OptionSet optionSet, Path path2, ServerPropertiesLoader serverPropertiesLoader, Path path3, EulaReader eulaReader, File file, ApiServices apiServices, String string, LevelStorage levelStorage, LevelStorage.Session session, LevelSummary levelSummary, boolean bl, ResourcePackManager resourcePackManager) {
|
||||
if (FabricGameTestHelper.ENABLED) {
|
||||
FabricGameTestHelper.runHeadlessServer(session, resourcePackManager);
|
||||
info.cancel(); // Do not progress in starting the normal dedicated server
|
||||
|
|
|
@ -20,11 +20,9 @@ import org.spongepowered.asm.mixin.Mixin;
|
|||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.EquipmentSlotProvider;
|
||||
|
@ -32,9 +30,9 @@ import net.fabricmc.fabric.impl.item.ItemExtensions;
|
|||
|
||||
@Mixin(LivingEntity.class)
|
||||
abstract class LivingEntityMixin {
|
||||
@Inject(method = "getPreferredEquipmentSlot", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;"), cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private static void onGetPreferredEquipmentSlot(ItemStack stack, CallbackInfoReturnable<EquipmentSlot> info, Item item) {
|
||||
EquipmentSlotProvider equipmentSlotProvider = ((ItemExtensions) item).fabric_getEquipmentSlotProvider();
|
||||
@Inject(method = "getPreferredEquipmentSlot", at = @At(value = "HEAD"), cancellable = true)
|
||||
private static void onGetPreferredEquipmentSlot(ItemStack stack, CallbackInfoReturnable<EquipmentSlot> info) {
|
||||
EquipmentSlotProvider equipmentSlotProvider = ((ItemExtensions) stack.getItem()).fabric_getEquipmentSlotProvider();
|
||||
|
||||
if (equipmentSlotProvider != null) {
|
||||
info.setReturnValue(equipmentSlotProvider.getPreferredEquipmentSlot(stack));
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
package net.fabricmc.fabric.mixin.itemgroup.client;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -74,7 +76,7 @@ public abstract class CreativeInventoryScreenMixin<T extends ScreenHandler> exte
|
|||
|
||||
@Override
|
||||
public boolean fabric_isButtonVisible(FabricCreativeGuiComponents.Type type) {
|
||||
return ItemGroups.getGroupsToDisplay().size() > (ItemGroups.operatorEnabled ? 14 : 13);
|
||||
return ItemGroups.getGroupsToDisplay().size() > (Objects.requireNonNull(ItemGroups.field_42466).hasPermissions() ? 14 : 13);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,32 +34,33 @@ import net.minecraft.resource.featuretoggle.FeatureSet;
|
|||
*/
|
||||
@ApiStatus.Experimental
|
||||
public class FabricItemGroupEntries implements ItemGroup.Entries {
|
||||
private final FeatureSet enabledFeatures;
|
||||
private final ItemGroup.class_8128 context;
|
||||
private final List<ItemStack> displayStacks;
|
||||
private final List<ItemStack> searchTabStacks;
|
||||
|
||||
private final boolean showOpRestrictedItems;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public FabricItemGroupEntries(FeatureSet enabledFeatures, List<ItemStack> displayStacks, List<ItemStack> searchTabStacks, boolean showOpRestrictedItems) {
|
||||
this.enabledFeatures = enabledFeatures;
|
||||
public FabricItemGroupEntries(ItemGroup.class_8128 context, List<ItemStack> displayStacks, List<ItemStack> searchTabStacks) {
|
||||
this.context = context;
|
||||
this.displayStacks = displayStacks;
|
||||
this.searchTabStacks = searchTabStacks;
|
||||
this.showOpRestrictedItems = showOpRestrictedItems;
|
||||
}
|
||||
|
||||
public ItemGroup.class_8128 getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the currently enabled feature set
|
||||
*/
|
||||
public FeatureSet getEnabledFeatures() {
|
||||
return enabledFeatures;
|
||||
return context.enabledFeatures();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return whether to show items restricted to operators, such as command blocks
|
||||
*/
|
||||
public boolean shouldShowOpRestrictedItems() {
|
||||
return showOpRestrictedItems;
|
||||
return context.hasPermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -383,7 +384,7 @@ public class FabricItemGroupEntries implements ItemGroup.Entries {
|
|||
* @see Item#isEnabled
|
||||
*/
|
||||
private boolean isEnabled(ItemStack stack) {
|
||||
return stack.getItem().isEnabled(enabledFeatures);
|
||||
return stack.getItem().isEnabled(getEnabledFeatures());
|
||||
}
|
||||
|
||||
private Collection<ItemStack> getEnabledStacks(Collection<ItemStack> newStacks) {
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemGroups;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.resource.featuretoggle.FeatureSet;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import net.fabricmc.fabric.api.event.Event;
|
||||
|
@ -64,7 +63,7 @@ abstract class ItemGroupMixin implements IdentifiableItemGroup, FabricItemGroup
|
|||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
@Inject(method = "updateEntries", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemGroup;reloadSearchProvider()V"))
|
||||
public void getStacks(FeatureSet enabledFeatures, boolean operatorEnabled, CallbackInfo ci) {
|
||||
public void getStacks(ItemGroup.class_8128 context, CallbackInfo ci) {
|
||||
ItemGroup self = (ItemGroup) (Object) this;
|
||||
|
||||
// Do not modify special item groups (except Operator Blocks) at all.
|
||||
|
@ -79,7 +78,7 @@ abstract class ItemGroupMixin implements IdentifiableItemGroup, FabricItemGroup
|
|||
// Convert the entries to lists
|
||||
var mutableDisplayStacks = new LinkedList<>(displayStacks);
|
||||
var mutableSearchTabStacks = new LinkedList<>(searchTabStacks);
|
||||
var entries = new FabricItemGroupEntries(enabledFeatures, mutableDisplayStacks, mutableSearchTabStacks, operatorEnabled);
|
||||
var entries = new FabricItemGroupEntries(context, mutableDisplayStacks, mutableSearchTabStacks);
|
||||
|
||||
final Event<ItemGroupEvents.ModifyEntries> modifyEntriesEvent = ItemGroupEventsImpl.getModifyEntriesEvent(getId());
|
||||
|
||||
|
@ -88,7 +87,7 @@ abstract class ItemGroupMixin implements IdentifiableItemGroup, FabricItemGroup
|
|||
}
|
||||
|
||||
// Now trigger the global event
|
||||
if (self != ItemGroups.OPERATOR || ItemGroups.operatorEnabled) {
|
||||
if (self != ItemGroups.OPERATOR || context.hasPermissions()) {
|
||||
ItemGroupEvents.MODIFY_ENTRIES_ALL.invoker().modifyEntries(self, entries);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ transitive-accessible field net/minecraft/item/ItemGroups INGREDIENTS Lnet/minec
|
|||
transitive-accessible field net/minecraft/item/ItemGroups SPAWN_EGGS Lnet/minecraft/item/ItemGroup;
|
||||
transitive-accessible field net/minecraft/item/ItemGroups OPERATOR Lnet/minecraft/item/ItemGroup;
|
||||
transitive-accessible field net/minecraft/item/ItemGroups INVENTORY Lnet/minecraft/item/ItemGroup;
|
||||
|
||||
accessible field net/minecraft/item/ItemGroups field_42466 Lnet/minecraft/item/ItemGroup$class_8128;
|
||||
transitive-accessible class net/minecraft/item/ItemGroup$StackVisibility
|
||||
|
||||
transitive-accessible class net/minecraft/item/ItemGroup$Entries
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ItemGroupTest implements ModInitializer {
|
|||
private static final ItemGroup ITEM_GROUP = FabricItemGroup.builder(new Identifier(MOD_ID, "test_group"))
|
||||
.displayName(Text.literal("Test Item Group"))
|
||||
.icon(() -> new ItemStack(Items.DIAMOND))
|
||||
.entries((enabledFeatures, entries, operatorEnabled) -> {
|
||||
.entries((context, entries) -> {
|
||||
entries.addAll(Registries.ITEM.stream()
|
||||
.map(ItemStack::new)
|
||||
.filter(input -> !input.isEmpty())
|
||||
|
@ -82,7 +82,7 @@ public class ItemGroupTest implements ModInitializer {
|
|||
FabricItemGroup.builder(new Identifier(MOD_ID, "test_group_" + i))
|
||||
.displayName(Text.literal("Test Item Group: " + i))
|
||||
.icon((Supplier<ItemStack>) () -> new ItemStack(Registries.BLOCK.get(index)))
|
||||
.entries((enabledFeatures, entries, operatorEnabled) -> {
|
||||
.entries((context, entries) -> {
|
||||
var itemStack = new ItemStack(Registries.ITEM.get(index));
|
||||
|
||||
if (!itemStack.isEmpty()) {
|
||||
|
|
|
@ -57,6 +57,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
|
|||
private boolean spawnableFarFromPlayer;
|
||||
private EntityDimensions dimensions = EntityDimensions.changing(-1.0f, -1.0f);
|
||||
private ImmutableSet<Block> specificSpawnBlocks = ImmutableSet.of();
|
||||
private boolean tickable = true;
|
||||
|
||||
private FeatureSet requiredFeatures = FeatureFlags.VANILLA_FEATURES;
|
||||
|
||||
|
@ -266,6 +267,11 @@ public class FabricEntityTypeBuilder<T extends Entity> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public FabricEntityTypeBuilder<T> disableTicking() {
|
||||
this.tickable = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the entity type.
|
||||
*
|
||||
|
@ -274,7 +280,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
|
|||
public EntityType<T> build() {
|
||||
// Modded DFU is a dream, currently not possible without screwing it up.
|
||||
|
||||
return new FabricEntityType<>(this.factory, this.spawnGroup, this.saveable, this.summonable, this.fireImmune, this.spawnableFarFromPlayer, this.specificSpawnBlocks, dimensions, trackRange, trackedUpdateRate, forceTrackedVelocityUpdates, this.requiredFeatures);
|
||||
return new FabricEntityType<>(this.factory, this.spawnGroup, this.saveable, this.summonable, this.fireImmune, this.spawnableFarFromPlayer, this.specificSpawnBlocks, dimensions, trackRange, trackedUpdateRate, forceTrackedVelocityUpdates, this.tickable, this.requiredFeatures);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,8 +28,8 @@ import net.minecraft.resource.featuretoggle.FeatureSet;
|
|||
public class FabricEntityType<T extends Entity> extends EntityType<T> {
|
||||
private final Boolean alwaysUpdateVelocity;
|
||||
|
||||
public FabricEntityType(EntityType.EntityFactory<T> factory, SpawnGroup spawnGroup, boolean bl, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> spawnBlocks, EntityDimensions entityDimensions, int maxTrackDistance, int trackTickInterval, Boolean alwaysUpdateVelocity, FeatureSet featureSet) {
|
||||
super(factory, spawnGroup, bl, summonable, fireImmune, spawnableFarFromPlayer, spawnBlocks, entityDimensions, maxTrackDistance, trackTickInterval, featureSet);
|
||||
public FabricEntityType(EntityType.EntityFactory<T> factory, SpawnGroup spawnGroup, boolean bl, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> spawnBlocks, EntityDimensions entityDimensions, int maxTrackDistance, int trackTickInterval, Boolean alwaysUpdateVelocity, boolean tickable, FeatureSet featureSet) {
|
||||
super(factory, spawnGroup, bl, summonable, fireImmune, spawnableFarFromPlayer, spawnBlocks, entityDimensions, maxTrackDistance, trackTickInterval, tickable, featureSet);
|
||||
this.alwaysUpdateVelocity = alwaysUpdateVelocity;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import net.minecraft.client.render.VertexConsumerProvider;
|
|||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.render.model.BakedModel;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation.Mode;
|
||||
import net.minecraft.client.render.model.json.Mode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
|
|
|
@ -28,7 +28,7 @@ import net.minecraft.client.color.item.ItemColors;
|
|||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.render.model.BakedModel;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.render.model.json.Mode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
@ -49,8 +49,8 @@ public abstract class ItemRendererMixin {
|
|||
@Unique
|
||||
private final VanillaQuadHandler fabric_vanillaHandler = new IndigoQuadHandler((ItemRenderer) (Object) this);
|
||||
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/BakedModel;isBuiltin()Z"), method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformation$Mode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", cancellable = true)
|
||||
public void hook_renderItem(ItemStack stack, ModelTransformation.Mode transformMode, boolean invert, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, int overlay, BakedModel model, CallbackInfo ci) {
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/BakedModel;isBuiltin()Z"), method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/Mode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", cancellable = true)
|
||||
public void hook_renderItem(ItemStack stack, Mode transformMode, boolean invert, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, int overlay, BakedModel model, CallbackInfo ci) {
|
||||
if (!((FabricBakedModel) model).isVanillaAdapter()) {
|
||||
fabric_contexts.get().renderModel(stack, transformMode, invert, matrixStack, vertexConsumerProvider, light, overlay, model, fabric_vanillaHandler);
|
||||
matrixStack.pop();
|
||||
|
|
|
@ -19,7 +19,7 @@ package net.fabricmc.fabric.api.client.rendering.v1;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.render.model.json.Mode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemConvertible;
|
||||
|
@ -102,6 +102,6 @@ public interface BuiltinItemRendererRegistry {
|
|||
* @param light packed lightmap coordinates
|
||||
* @param overlay the overlay UV passed to {@link net.minecraft.client.render.VertexConsumer#overlay(int)}
|
||||
*/
|
||||
void render(ItemStack stack, ModelTransformation.Mode mode, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay);
|
||||
void render(ItemStack stack, Mode mode, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.item.BuiltinModelItemRenderer;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.render.model.json.Mode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
@ -33,7 +33,7 @@ import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry;
|
|||
@Mixin(BuiltinModelItemRenderer.class)
|
||||
abstract class BuiltinModelItemRendererMixin {
|
||||
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
|
||||
private void fabric_onRender(ItemStack stack, ModelTransformation.Mode mode, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, CallbackInfo info) {
|
||||
private void fabric_onRender(ItemStack stack, Mode mode, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, CallbackInfo info) {
|
||||
@Nullable
|
||||
BuiltinItemRendererRegistry.DynamicItemRenderer renderer = BuiltinItemRendererRegistry.INSTANCE.get(stack.getItem());
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ public abstract class WorldRendererMixin {
|
|||
method = "render",
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/render/WorldRenderer;renderChunkDebugInfo(Lnet/minecraft/client/render/Camera;)V"
|
||||
target = "Lnet/minecraft/client/render/WorldRenderer;renderChunkDebugInfo(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/render/Camera;)V"
|
||||
)
|
||||
)
|
||||
private void onChunkDebugRender(CallbackInfo ci) {
|
||||
|
|
|
@ -63,7 +63,7 @@ public class WaterPotionStorage implements ExtractionOnlyStorage<FluidVariant>,
|
|||
|
||||
private ItemVariant mapToGlassBottle() {
|
||||
ItemStack newStack = context.getItemVariant().toStack();
|
||||
PotionUtil.setPotion(newStack, Potions.EMPTY);
|
||||
PotionUtil.setPotion(newStack, Potions.field_8984);
|
||||
return ItemVariant.of(Items.GLASS_BOTTLE, newStack.getNbt());
|
||||
}
|
||||
|
||||
|
|
|
@ -28,15 +28,6 @@ transitive-accessible field net/minecraft/loot/LootPool bonusRolls Lnet/minecraf
|
|||
transitive-accessible field net/minecraft/loot/LootTable pools [Lnet/minecraft/loot/LootPool;
|
||||
transitive-accessible field net/minecraft/loot/LootTable functions [Lnet/minecraft/loot/function/LootFunction;
|
||||
|
||||
# Creating custom damage sources
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource <init> (Ljava/lang/String;)V
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setBypassesArmor ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setFallingBlock ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setOutOfWorld ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setUnblockable ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setBypassesProtection ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setFire ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
|
||||
# Villager trade factories
|
||||
transitive-accessible class net/minecraft/village/TradeOffers$BuyForOneEmeraldFactory
|
||||
transitive-accessible class net/minecraft/village/TradeOffers$SellItemFactory
|
||||
|
@ -284,8 +275,10 @@ transitive-accessible field net/minecraft/client/render/RenderPhase ENTITY_GLINT
|
|||
transitive-accessible field net/minecraft/client/render/RenderPhase DIRECT_ENTITY_GLINT_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase CRUMBLING_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase TEXT_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase field_42517 Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase TEXT_INTENSITY_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase TRANSPARENT_TEXT_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase field_42518 Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase TRANSPARENT_TEXT_INTENSITY_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase LIGHTNING_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
transitive-accessible field net/minecraft/client/render/RenderPhase TRIPWIRE_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;
|
||||
|
|
|
@ -23,15 +23,6 @@ transitive-accessible field net/minecraft/loot/LootPool bonusRolls Lnet/minecraf
|
|||
transitive-accessible field net/minecraft/loot/LootTable pools [Lnet/minecraft/loot/LootPool;
|
||||
transitive-accessible field net/minecraft/loot/LootTable functions [Lnet/minecraft/loot/function/LootFunction;
|
||||
|
||||
# Creating custom damage sources
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource <init> (Ljava/lang/String;)V
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setBypassesArmor ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setFallingBlock ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setOutOfWorld ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setUnblockable ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setBypassesProtection ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
transitive-accessible method net/minecraft/entity/damage/DamageSource setFire ()Lnet/minecraft/entity/damage/DamageSource;
|
||||
|
||||
# Villager trade factories
|
||||
transitive-accessible class net/minecraft/village/TradeOffers$BuyForOneEmeraldFactory
|
||||
transitive-accessible class net/minecraft/village/TradeOffers$SellItemFactory
|
||||
|
|
|
@ -2,8 +2,8 @@ org.gradle.jvmargs=-Xmx2560M
|
|||
org.gradle.parallel=true
|
||||
fabric.loom.multiProjectOptimisation=true
|
||||
|
||||
version=0.73.4
|
||||
minecraft_version=23w05a
|
||||
version=0.73.5
|
||||
minecraft_version=23w06a
|
||||
yarn_version=+build.2
|
||||
loader_version=0.14.14
|
||||
installer_version=0.11.1
|
||||
|
@ -22,15 +22,15 @@ fabric-commands-v0-version=0.2.41
|
|||
fabric-containers-v0-version=0.1.49
|
||||
fabric-content-registries-v0-version=3.5.4
|
||||
fabric-crash-report-info-v1-version=0.2.14
|
||||
fabric-data-generation-api-v1-version=11.2.3
|
||||
fabric-data-generation-api-v1-version=11.2.4
|
||||
fabric-dimensions-v1-version=2.1.43
|
||||
fabric-entity-events-v1-version=1.5.10
|
||||
fabric-entity-events-v1-version=1.5.11
|
||||
fabric-events-interaction-v0-version=0.4.42
|
||||
fabric-events-lifecycle-v0-version=0.2.47
|
||||
fabric-events-lifecycle-v0-version=0.2.48
|
||||
fabric-game-rule-api-v1-version=1.0.32
|
||||
fabric-gametest-api-v1-version=1.1.20
|
||||
fabric-item-api-v1-version=2.1.13
|
||||
fabric-item-group-api-v1-version=2.1.15
|
||||
fabric-gametest-api-v1-version=1.1.21
|
||||
fabric-item-api-v1-version=2.1.14
|
||||
fabric-item-group-api-v1-version=3.0.0
|
||||
fabric-key-binding-api-v1-version=1.0.32
|
||||
fabric-keybindings-v0-version=0.2.30
|
||||
fabric-lifecycle-events-v1-version=2.2.12
|
||||
|
@ -41,23 +41,23 @@ fabric-mining-level-api-v1-version=2.1.34
|
|||
fabric-models-v0-version=0.3.29
|
||||
fabric-networking-api-v1-version=1.2.19
|
||||
fabric-networking-v0-version=0.3.36
|
||||
fabric-object-builder-api-v1-version=5.4.3
|
||||
fabric-object-builder-api-v1-version=5.5.0
|
||||
fabric-particles-v1-version=1.0.22
|
||||
fabric-recipe-api-v1-version=1.0.3
|
||||
fabric-registry-sync-v0-version=2.0.7
|
||||
fabric-renderer-api-v1-version=2.2.3
|
||||
fabric-renderer-indigo-version=0.7.3
|
||||
fabric-renderer-registries-v1-version=3.2.33
|
||||
fabric-renderer-indigo-version=1.0.0
|
||||
fabric-renderer-registries-v1-version=3.2.34
|
||||
fabric-rendering-data-attachment-v1-version=0.3.27
|
||||
fabric-rendering-fluids-v1-version=3.0.20
|
||||
fabric-rendering-v0-version=1.1.36
|
||||
fabric-rendering-v1-version=1.12.4
|
||||
fabric-rendering-v0-version=1.1.37
|
||||
fabric-rendering-v1-version=2.0.0
|
||||
fabric-resource-conditions-api-v1-version=2.2.3
|
||||
fabric-resource-loader-v0-version=0.10.8
|
||||
fabric-screen-api-v1-version=1.0.43
|
||||
fabric-screen-handler-api-v1-version=1.3.15
|
||||
fabric-sound-api-v1-version=1.0.8
|
||||
fabric-transfer-api-v1-version=2.1.17
|
||||
fabric-transitive-access-wideners-v1-version=2.3.3
|
||||
fabric-transfer-api-v1-version=2.1.18
|
||||
fabric-transitive-access-wideners-v1-version=3.0.0
|
||||
fabric-convention-tags-v1-version=1.2.4
|
||||
fabric-client-tags-api-v1-version=1.0.14
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue