24w12a
This commit is contained in:
1 parent
68511ad735
commit
1f05a6ebc1
5 files changed
+12
-8
No files matched your search
+2
-2
@@ -3,10 +3,10 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check https://fabricmc.net/develop/
|
# check https://fabricmc.net/develop/
|
||||||
minecraft_version=24w10a
|
minecraft_version=24w12a
|
||||||
loader_version=0.15.7
|
loader_version=0.15.7
|
||||||
jsr305_version=3.0.2
|
jsr305_version=3.0.2
|
||||||
fabric_version=0.91.1+1.20.3
|
fabric_version=0.96.9+1.20.5
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.134
|
mod_version = 1.4.134
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public abstract class MinecraftServer_scarpetMixin extends ReentrantBlockableEve
|
|||||||
@Override
|
@Override
|
||||||
public void reloadAfterReload(RegistryAccess newRegs)
|
public void reloadAfterReload(RegistryAccess newRegs)
|
||||||
{
|
{
|
||||||
resources.managers().updateRegistryTags(newRegs);
|
resources.managers().updateRegistryTags();
|
||||||
getPlayerList().saveAll();
|
getPlayerList().saveAll();
|
||||||
getPlayerList().reloadResources();
|
getPlayerList().reloadResources();
|
||||||
functionManager.replaceLibrary(this.resources.managers().getFunctionLibrary());
|
functionManager.replaceLibrary(this.resources.managers().getFunctionLibrary());
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
package carpet.mixins;
|
package carpet.mixins;
|
||||||
|
|
||||||
import carpet.CarpetSettings;
|
import carpet.CarpetSettings;
|
||||||
|
import net.minecraft.core.component.DataComponents;
|
||||||
import net.minecraft.tags.TagKey;
|
import net.minecraft.tags.TagKey;
|
||||||
import net.minecraft.world.item.DiggerItem;
|
import net.minecraft.world.item.DiggerItem;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.PickaxeItem;
|
import net.minecraft.world.item.PickaxeItem;
|
||||||
import net.minecraft.world.item.Tier;
|
import net.minecraft.world.item.Tier;
|
||||||
|
import net.minecraft.world.item.component.Tool;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.SoundType;
|
import net.minecraft.world.level.block.SoundType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
@@ -23,7 +26,8 @@ public class PickaxeItem_missingToolsMixin extends DiggerItem
|
|||||||
public float getDestroySpeed(ItemStack stack, BlockState state) {
|
public float getDestroySpeed(ItemStack stack, BlockState state) {
|
||||||
if (CarpetSettings.missingTools && state.getSoundType() == SoundType.GLASS)
|
if (CarpetSettings.missingTools && state.getSoundType() == SoundType.GLASS)
|
||||||
{
|
{
|
||||||
return speed;
|
final Tool tool = stack.get(DataComponents.TOOL);
|
||||||
|
return tool != null ? tool.getMiningSpeed(Blocks.STONE.defaultBlockState()) : super.getDestroySpeed(stack, state);
|
||||||
}
|
}
|
||||||
return super.getDestroySpeed(stack, state);
|
return super.getDestroySpeed(stack, state);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class Inventories
|
|||||||
public static void apply(Expression expression)
|
public static void apply(Expression expression)
|
||||||
{
|
{
|
||||||
expression.addContextFunction("stack_limit", 1, (c, t, lv) ->
|
expression.addContextFunction("stack_limit", 1, (c, t, lv) ->
|
||||||
new NumericValue(NBTSerializableValue.parseItem(lv.get(0).getString(), ((CarpetContext) c).registryAccess()).getItem().getMaxStackSize()));
|
new NumericValue(NBTSerializableValue.parseItem(lv.get(0).getString(), ((CarpetContext) c).registryAccess()).getMaxStackSize()));
|
||||||
|
|
||||||
expression.addContextFunction("item_category", -1, (c, t, lv) -> {
|
expression.addContextFunction("item_category", -1, (c, t, lv) -> {
|
||||||
c.host.issueDeprecation("item_category in 1.19.3+");
|
c.host.issueDeprecation("item_category in 1.19.3+");
|
||||||
|
|||||||
@@ -102,9 +102,9 @@ import net.minecraft.resources.ResourceKey;
|
|||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.commands.BossBarCommands;
|
import net.minecraft.server.commands.BossBarCommands;
|
||||||
|
import net.minecraft.server.commands.LootCommand;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
import net.minecraft.world.level.storage.loot.LootDataType;
|
|
||||||
import net.minecraft.world.phys.Vec2;
|
import net.minecraft.world.phys.Vec2;
|
||||||
import net.minecraft.world.scores.ScoreHolder;
|
import net.minecraft.world.scores.ScoreHolder;
|
||||||
|
|
||||||
@@ -211,10 +211,10 @@ public abstract class CommandArgument
|
|||||||
(c, p) -> ValueConversions.of(ResourceLocationArgument.getAdvancement(c, p).id()), (ctx, builder) -> SharedSuggestionProvider.suggestResource(ctx.getSource().getServer().getAdvancements().getAllAdvancements().stream().map(AdvancementHolder::id), builder)
|
(c, p) -> ValueConversions.of(ResourceLocationArgument.getAdvancement(c, p).id()), (ctx, builder) -> SharedSuggestionProvider.suggestResource(ctx.getSource().getServer().getAdvancements().getAllAdvancements().stream().map(AdvancementHolder::id), builder)
|
||||||
),
|
),
|
||||||
new VanillaUnconfigurableArgument("lootcondition", ResourceLocationArgument::id,
|
new VanillaUnconfigurableArgument("lootcondition", ResourceLocationArgument::id,
|
||||||
(c, p) -> ValueConversions.of(c.getSource().registryAccess().registryOrThrow(Registries.LOOT_CONDITION_TYPE).getKey(ResourceLocationArgument.getPredicate(c, p).getType())), (ctx, builder) -> SharedSuggestionProvider.suggestResource(ctx.getSource().getServer().getLootData().getKeys(LootDataType.PREDICATE), builder)
|
(c, p) -> ValueConversions.of(ResourceLocationArgument.getId(c, p)), (ctx, builder) -> SharedSuggestionProvider.suggestResource(ctx.getSource().getServer().reloadableRegistries().getKeys(Registries.LOOT_CONDITION_TYPE), builder)
|
||||||
),
|
),
|
||||||
new VanillaUnconfigurableArgument("loottable", ResourceLocationArgument::id,
|
new VanillaUnconfigurableArgument("loottable", ResourceLocationArgument::id,
|
||||||
(c, p) -> ValueConversions.of(ResourceLocationArgument.getId(c, p)), (ctx, builder) -> SharedSuggestionProvider.suggestResource(ctx.getSource().getServer().getLootData().getKeys(LootDataType.TABLE), builder)
|
(c, p) -> ValueConversions.of(ResourceLocationArgument.getId(c, p)), LootCommand.SUGGEST_LOOT_TABLE
|
||||||
),
|
),
|
||||||
new VanillaUnconfigurableArgument("attribute", Registries.ATTRIBUTE),
|
new VanillaUnconfigurableArgument("attribute", Registries.ATTRIBUTE),
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user