Skip to content

Commit

Permalink
Opps
Browse files Browse the repository at this point in the history
Signed-off-by: Hendrix-Shen <[email protected]>
  • Loading branch information
Hendrix-Shen committed Jul 20, 2024
1 parent b4b4218 commit 7c1cdb0
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 25 deletions.
20 changes: 10 additions & 10 deletions src/main/java/com/plusls/carpet/PluslsCarpetAdditionSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,14 @@ public enum PCA_SPAWN_BIOME {
)
public static boolean villagersAttractedByEmeraldBlock = false;

// @Rule(
// categories = {
// PROTOCOL
// },
// strict = false,
// options = {
// xaeroWorldNameNone
// }
// )
// public static String xaeroWorldName = xaeroWorldNameNone;
@Rule(
categories = {
PROTOCOL
},
strict = false,
options = {
xaeroWorldNameNone
}
)
public static String xaeroWorldName = xaeroWorldNameNone;
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package com.plusls.carpet.mixin.rule.avoidAnvilTooExpensive;

import com.plusls.carpet.PluslsCarpetAdditionSettings;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.inventory.AnvilMenu;
import net.minecraft.world.inventory.ContainerLevelAccess;
import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.item.ItemStack;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -19,7 +15,11 @@
//#endif

//#if MC > 11502
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.inventory.ItemCombinerMenu;
import net.minecraft.world.inventory.ContainerLevelAccess;
import net.minecraft.world.inventory.MenuType;
import org.jetbrains.annotations.Nullable;
//#else
//$$ import net.minecraft.world.Container;
//$$ import org.spongepowered.asm.mixin.Final;
Expand All @@ -31,8 +31,22 @@ public abstract class MixinAnvilMenu
extends ItemCombinerMenu
//#endif
{
private MixinAnvilMenu(@Nullable MenuType<?> type, int containerId, Inventory playerInventory, ContainerLevelAccess access) {
super(type, containerId, playerInventory, access);
private MixinAnvilMenu(
//#if MC > 11502
@Nullable MenuType<?> type,
int containerId,
Inventory playerInventory,
ContainerLevelAccess access
//#endif
) {
super(
//#if MC > 11502
type,
containerId,
playerInventory,
access
//#endif
);
}

@Shadow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void preUseOn(UseOnContext context, CallbackInfoReturnable<InteractionRe
//#if MC > 11502
InteractionResult.sidedSuccess(level.isClientSide)
//#else
//$$ cir.setReturnValue(level.isClientSide ? InteractionResult.SUCCESS : InteractionResult.PASS);
//$$ level.isClientSide ? InteractionResult.SUCCESS : InteractionResult.PASS
//#endif
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public void preOnSendWorldInfo(ServerPlayer player, ServerLevel world, CallbackI
buf.writeByte(0);
buf.writeInt((int) crc.getValue());

// ServerPlayNetworking.send(player, xaeroworldmap, new FriendlyByteBuf(buf.duplicate()));
// ServerPlayNetworking.send(player, xaerominimap, new FriendlyByteBuf(buf.duplicate()));
//#if MC < 12005
ServerPlayNetworking.send(player, xaeroworldmap, new FriendlyByteBuf(buf.duplicate()));
ServerPlayNetworking.send(player, xaerominimap, new FriendlyByteBuf(buf.duplicate()));
//#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public DeathInfo(
//#if MC > 11502
SimpleContainer inv
//#else
//$$ Lists<ItemStack> inv
//$$ List<ItemStack> inv
//#endif
) {
this.deathTime = deathTime;
Expand Down Expand Up @@ -106,7 +106,7 @@ public CompoundTag toTag(
//$$
//$$ for (ItemStack itemStack : inventory) {
//$$ if (!itemStack.isEmpty()) {
//$$ listTag.add(itemStack.save(new CompoundTag()));
//$$ ret.add(itemStack.save(new CompoundTag()));
//$$ }
//$$ }
//$$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import top.hendrixshen.magiclib.api.compat.minecraft.world.entity.player.PlayerCompat;
import top.hendrixshen.magiclib.api.compat.minecraft.world.item.ItemStackCompat;
import top.hendrixshen.magiclib.api.compat.minecraft.world.level.LevelCompat;
import top.hendrixshen.magiclib.impl.compat.minecraft.world.level.dimension.DimensionWrapper;

import java.util.Objects;

Expand All @@ -28,10 +32,6 @@

//#if MC > 11502
import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents;
import top.hendrixshen.magiclib.api.compat.minecraft.world.entity.player.PlayerCompat;
import top.hendrixshen.magiclib.api.compat.minecraft.world.item.ItemStackCompat;
import top.hendrixshen.magiclib.api.compat.minecraft.world.level.LevelCompat;
import top.hendrixshen.magiclib.impl.compat.minecraft.world.level.dimension.DimensionWrapper;
//#else
//$$ import com.google.common.collect.Lists;
//$$ import net.minecraft.world.level.dimension.DimensionType;
Expand Down

0 comments on commit 7c1cdb0

Please sign in to comment.