mc 26.1-snap-1

This commit is contained in:
gnembon committed 2025-12-17 17:05:15 +01:00
1 parent 4e160d235a
commit be1211dda7
24 files changed
+61 -60

No files matched your search

@@ -14,7 +14,7 @@ import java.util.List;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.ClickType;
import net.minecraft.world.inventory.ContainerInput;
import net.minecraft.world.inventory.ContainerListener;
import net.minecraft.world.inventory.DataSlot;
@@ -26,7 +26,7 @@ public abstract class AbstractContainerMenu_scarpetMixin implements AbstractCont
@Shadow @Final private List<DataSlot> dataSlots;
@Inject(method = "doClick", at = @At("HEAD"), cancellable = true)
private void callSlotClickListener(int slotIndex, int button, ClickType actionType, Player player, CallbackInfo ci) {
private void callSlotClickListener(int slotIndex, int button, ContainerInput actionType, Player player, CallbackInfo ci) {
if(!(player instanceof ServerPlayer serverPlayerEntity)) return;
for(ContainerListener screenHandlerListener : this.containerListeners) {
if(screenHandlerListener instanceof ScreenValue.ScarpetScreenHandlerListener scarpetScreenHandlerListener) {
@@ -31,10 +31,10 @@ public abstract class ArmorStand_scarpetMarkerMixin extends LivingEntity
{
if (!level().isClientSide())
{
if (getTags().contains(Auxiliary.MARKER_STRING))
if (entityTags().contains(Auxiliary.MARKER_STRING))
{
String prefix = Auxiliary.MARKER_STRING+"_";
Optional<String> owner = getTags().stream().filter(s -> s.startsWith(prefix)).findFirst();
Optional<String> owner = entityTags().stream().filter(s -> s.startsWith(prefix)).findFirst();
if (owner.isPresent())
{
String hostName = StringUtils.removeStart(owner.get(),prefix);
@@ -11,7 +11,7 @@ import net.minecraft.world.level.levelgen.structure.pieces.PieceGeneratorSupplie
@Mixin(PieceGeneratorSupplier.class)
public interface PieceGeneratorSupplier_plopMixin
{
@Redirect(method = "method_39845", at = @At(
@Redirect(method = "lambda$simple$0", at = @At(
value = "INVOKE",
target = "java/util/function/Predicate.test(Ljava/lang/Object;)Z"
), remap = false)
@@ -11,9 +11,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(ReloadCommand.class)
public class ReloadCommand_reloadAppsMixin {
//method_13530(Lcom/mojang/brigadier/context/CommandContext;)I
//lambda$register$0(Lcom/mojang/brigadier/context/CommandContext;)I
// internal of register.
@Inject(method = "method_13530", at = @At("TAIL"), remap = false)
@Inject(method = "lambda$register$0", at = @At("TAIL"), remap = false)
private static void onReload(CommandContext<CommandSourceStack> context, CallbackInfoReturnable<Integer> cir)
{
// can't fetch here the reference to the server
@@ -280,7 +280,7 @@ public class ServerGamePacketListenerImpl_scarpetEventsMixin
}
}
@Inject(method = "method_44356", // lambda of handleChatCommand(ServerboundChatCommandPacket)
@Inject(method = "lambda$handleChatCommand$0", // lambda of handleChatCommand(ServerboundChatCommandPacket)
at = @At(value = "HEAD")
)
private void onChatCommandMessage(ServerboundChatCommandPacket serverboundChatCommandPacket, CallbackInfo ci) {
@@ -30,7 +30,7 @@ public class SummonCommand_lightningMixin
ServerLevel world = (ServerLevel) entity.level();
BlockPos at = entity.blockPosition();
DifficultyInstance localDifficulty_1 = world.getCurrentDifficultyAt(at);
boolean boolean_2 = world.getGameRules().get(GameRules.SPAWN_MOBS) && world.random.nextDouble() < (double)localDifficulty_1.getEffectiveDifficulty() * 0.01D;
boolean boolean_2 = world.getGameRules().get(GameRules.SPAWN_MOBS) && world.getRandom().nextDouble() < (double)localDifficulty_1.getEffectiveDifficulty() * 0.01D;
if (boolean_2) {
SkeletonHorse skeletonHorseEntity_1 = EntityType.SKELETON_HORSE.create(world, EntitySpawnReason.EVENT);
skeletonHorseEntity_1.setTrap(true);