Skip to content

Commit

Permalink
Fix legacy block tag location name
Browse files Browse the repository at this point in the history
  • Loading branch information
SamB440 committed Aug 17, 2024
1 parent 2cac7a4 commit b391705
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/ac/grim/grimac/utils/data/tags/SyncedTags.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package ac.grim.grimac.utils.data.tags;

import ac.grim.grimac.player.GrimPlayer;
import com.github.retrooper.packetevents.PacketEvents;
import com.github.retrooper.packetevents.manager.server.ServerVersion;
import com.github.retrooper.packetevents.protocol.player.ClientVersion;
import com.github.retrooper.packetevents.protocol.world.states.WrappedBlockState;
import com.github.retrooper.packetevents.protocol.world.states.defaulttags.BlockTags;
import com.github.retrooper.packetevents.protocol.world.states.type.StateType;
import com.github.retrooper.packetevents.protocol.world.states.type.StateTypes;
Expand All @@ -18,7 +19,9 @@
*/
public final class SyncedTags {

private static final ResourceLocation BLOCK = ResourceLocation.minecraft("block");
private static final ServerVersion VERSION = PacketEvents.getAPI().getServerManager().getVersion();

private static final ResourceLocation BLOCK = VERSION.isNewerThanOrEquals(ServerVersion.V_1_21) ? ResourceLocation.minecraft("block") : ResourceLocation.minecraft("blocks");

public static final ResourceLocation CLIMBABLE = ResourceLocation.minecraft("climbable");

Expand Down

0 comments on commit b391705

Please sign in to comment.