Skip to content

Commit

Permalink
Switch mainProject to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrix-Shen committed Dec 17, 2023
1 parent a65231b commit 46263e3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Send XaeroMap world information packets to client.

### Support

Current main development for Minecraft version: 1.20.1
Current main development for Minecraft version: 1.20.4

And use `preprocess` to be compatible with all versions.

Expand Down
2 changes: 1 addition & 1 deletion README_ZH_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ vanilla - 原版行为。

### 支持

当前主开发版本:1.20.1
当前主开发版本:1.20.4

并且使用 `预处理` 来兼容各版本。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.Optional;

//#if MC > 12001
//$$ import net.minecraft.server.network.CommonListenerCookie;
import net.minecraft.server.network.CommonListenerCookie;
//#endif

@Mixin(PlayerList.class)
Expand All @@ -35,9 +35,9 @@ public abstract class MixinPlayerList {
at = @At(
value = "INVOKE",
//#if MC > 12001
//$$ target = "Lnet/minecraft/server/network/ServerGamePacketListenerImpl;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/Connection;Lnet/minecraft/server/level/ServerPlayer;Lnet/minecraft/server/network/CommonListenerCookie;)V",
target = "Lnet/minecraft/server/network/ServerGamePacketListenerImpl;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/Connection;Lnet/minecraft/server/level/ServerPlayer;Lnet/minecraft/server/network/CommonListenerCookie;)V",
//#else
target = "Lnet/minecraft/server/network/ServerGamePacketListenerImpl;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/Connection;Lnet/minecraft/server/level/ServerPlayer;)V",
//$$ target = "Lnet/minecraft/server/network/ServerGamePacketListenerImpl;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/Connection;Lnet/minecraft/server/level/ServerPlayer;)V",
//#endif
shift = At.Shift.AFTER
)
Expand All @@ -46,7 +46,7 @@ private void onPlaceNewPlayer(
Connection connection,
ServerPlayer serverPlayer,
//#if MC > 12001
//$$ CommonListenerCookie commonListenerCookie,
CommonListenerCookie commonListenerCookie,
//#endif
CallbackInfo ci
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
package top.catowncraft.carpettctcaddition.mixin.rule.dispenserCollectExperienceOrb;

import net.minecraft.core.BlockPos;
import net.minecraft.core.BlockSource;
import net.minecraft.core.dispenser.BlockSource;
import net.minecraft.core.dispenser.DefaultDispenseItemBehavior;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.EntitySelector;
Expand Down Expand Up @@ -49,11 +49,11 @@ public class MixinDispenseItemBehavior {
private void onExecute(BlockSource blockSource, ItemStack itemStack, CallbackInfoReturnable<ItemStack> cir) {
if (CarpetTCTCAdditionSettings.dispenserCollectExperience) {
//#if MC > 12001
//$$ BlockPos blockPos = blockSource.pos().relative(blockSource.state().getValue(DispenserBlock.FACING));
//$$ List<ServerPlayer> list = blockSource.level().getEntitiesOfClass(ServerPlayer.class, new AABB(blockPos), EntitySelector.NO_SPECTATORS);
BlockPos blockPos = blockSource.pos().relative(blockSource.state().getValue(DispenserBlock.FACING));
List<ServerPlayer> list = blockSource.level().getEntitiesOfClass(ServerPlayer.class, new AABB(blockPos), EntitySelector.NO_SPECTATORS);
//#else
BlockPos blockPos = blockSource.getPos().relative(blockSource.getBlockState().getValue(DispenserBlock.FACING));
List<ServerPlayer> list = blockSource.getLevel().getEntitiesOfClass(ServerPlayer.class, new AABB(blockPos), EntitySelector.NO_SPECTATORS);
//$$ BlockPos blockPos = blockSource.getPos().relative(blockSource.getBlockState().getValue(DispenserBlock.FACING));
//$$ List<ServerPlayer> list = blockSource.getLevel().getEntitiesOfClass(ServerPlayer.class, new AABB(blockPos), EntitySelector.NO_SPECTATORS);
//#endif

if (list.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void neighborChanged(@NotNull BlockState blockState, @NotNull Level level
//#if MC > 11605
!((BucketPickup) blockState.getBlock()).pickupBlock(
//#if MC > 12001
//$$ null,
null,
//#endif
level,
relative,
Expand Down
2 changes: 1 addition & 1 deletion versions/mainProject
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.1
1.20.4

0 comments on commit 46263e3

Please sign in to comment.