26.1-snap-5
This commit is contained in:
1 parent
9820fbf1d1
commit
85e75c4cab
5 files changed
+8
-7
No files matched your search
+1
-1
@@ -7,7 +7,7 @@ org.gradle.configuration-cache=false
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check https://fabricmc.net/develop/
|
# check https://fabricmc.net/develop/
|
||||||
minecraft_version=26.1-snapshot-4
|
minecraft_version=26.1-snapshot-5
|
||||||
loader_version=0.18.4
|
loader_version=0.18.4
|
||||||
loom_version=1.14-SNAPSHOT
|
loom_version=1.14-SNAPSHOT
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import net.minecraft.ChatFormatting;
|
|||||||
import net.minecraft.core.Holder;
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.core.RegistryAccess;
|
import net.minecraft.core.RegistryAccess;
|
||||||
|
import net.minecraft.core.component.DataComponents;
|
||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.MutableComponent;
|
import net.minecraft.network.chat.MutableComponent;
|
||||||
@@ -365,7 +366,7 @@ public class HopperCounter
|
|||||||
}
|
}
|
||||||
if (item instanceof DyeItem dye)
|
if (item instanceof DyeItem dye)
|
||||||
{
|
{
|
||||||
return TextColor.fromRgb(appropriateColor(dye.getDyeColor().getMapColor().col));
|
return TextColor.fromRgb(appropriateColor(Optional.ofNullable(dye.getDefaultInstance().get(DataComponents.DYE)).orElse(DyeColor.WHITE).getMapColor().col));
|
||||||
}
|
}
|
||||||
Block block = null;
|
Block block = null;
|
||||||
final Registry<Item> itemRegistry = registryAccess.lookupOrThrow(Registries.ITEM);
|
final Registry<Item> itemRegistry = registryAccess.lookupOrThrow(Registries.ITEM);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class ServerPlayerGameMode_scarpetEventsMixin implements ServerPlayerInte
|
|||||||
|
|
||||||
@Inject(method = "useItemOn", at = @At(
|
@Inject(method = "useItemOn", at = @At(
|
||||||
value = "INVOKE",
|
value = "INVOKE",
|
||||||
target = "Lnet/minecraft/advancements/criterion/ItemUsedOnLocationTrigger;trigger(Lnet/minecraft/server/level/ServerPlayer;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/item/ItemStack;)V",
|
target = "Lnet/minecraft/advancements/criterion/ItemUsedOnLocationTrigger;trigger(Lnet/minecraft/server/level/ServerPlayer;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/item/ItemInstance;)V",
|
||||||
shift = At.Shift.BEFORE
|
shift = At.Shift.BEFORE
|
||||||
))
|
))
|
||||||
private void onBlockActivated(ServerPlayer serverPlayerEntity, Level world, ItemStack stack, InteractionHand hand, BlockHitResult hitResult, CallbackInfoReturnable<InteractionResult> cir)
|
private void onBlockActivated(ServerPlayer serverPlayerEntity, Level world, ItemStack stack, InteractionHand hand, BlockHitResult hitResult, CallbackInfoReturnable<InteractionResult> cir)
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public abstract class CommandArgument
|
|||||||
// item_predicate ?? //same as item but accepts tags, not sure right now
|
// item_predicate ?? //same as item but accepts tags, not sure right now
|
||||||
new SlotArgument(),
|
new SlotArgument(),
|
||||||
new VanillaUnconfigurableArgument("item", ItemArgument::item,
|
new VanillaUnconfigurableArgument("item", ItemArgument::item,
|
||||||
(c, p) -> ValueConversions.of(ItemArgument.getItem(c, p).createItemStack(1, false), c.getSource().registryAccess()),
|
(c, p) -> ValueConversions.of(ItemArgument.getItem(c, p).createItemStack(1), c.getSource().registryAccess()),
|
||||||
param -> (ctx, builder) -> ctx.getArgument(param, ItemArgument.class).listSuggestions(ctx, builder)
|
param -> (ctx, builder) -> ctx.getArgument(param, ItemArgument.class).listSuggestions(ctx, builder)
|
||||||
),
|
),
|
||||||
new VanillaUnconfigurableArgument("message", MessageArgument::message,
|
new VanillaUnconfigurableArgument("message", MessageArgument::message,
|
||||||
|
|||||||
@@ -354,9 +354,9 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
|
|||||||
ItemInput res = itemCache.get(itemString); // [SCARY SHIT] persistent caches over server reloads
|
ItemInput res = itemCache.get(itemString); // [SCARY SHIT] persistent caches over server reloads
|
||||||
if (res != null)
|
if (res != null)
|
||||||
{
|
{
|
||||||
return res.createItemStack(1, false);
|
return res.createItemStack(1);
|
||||||
}
|
}
|
||||||
ItemParser.ItemResult parser = (new ItemParser(regs)).parse(new StringReader(itemString));
|
ItemInput parser = (new ItemParser(regs)).parse(new StringReader(itemString));
|
||||||
res = new ItemInput(parser.item(), parser.components());
|
res = new ItemInput(parser.item(), parser.components());
|
||||||
|
|
||||||
itemCache.put(itemString, res);
|
itemCache.put(itemString, res);
|
||||||
@@ -364,7 +364,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
|
|||||||
{
|
{
|
||||||
itemCache.clear();
|
itemCache.clear();
|
||||||
}
|
}
|
||||||
return res.createItemStack(1, false);
|
return res.createItemStack(1);
|
||||||
}
|
}
|
||||||
catch (CommandSyntaxException e)
|
catch (CommandSyntaxException e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user