This commit is contained in:
parent
d2d33c6159
commit
df3c1dcffd
@ -5,7 +5,6 @@ import net.minecraft.advancement.criterion.Criterions;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||
|
||||
@SuppressWarnings("PublicStaticMixinMember")
|
||||
@Mixin(Criterions.class)
|
||||
public interface CriterionRegistryHook {
|
||||
@Invoker("register")
|
||||
|
@ -2,6 +2,8 @@ package com.thebrokenrail.sorcerycraft.mixin;
|
||||
|
||||
import com.thebrokenrail.sorcerycraft.SorceryCraft;
|
||||
import com.thebrokenrail.sorcerycraft.entity.SpellEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -19,6 +21,7 @@ public class MixinClientPlayNetworkHandler {
|
||||
@Shadow
|
||||
private ClientWorld world;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Inject(method = "onEntitySpawn", at = @At(value = "TAIL"))
|
||||
public void onEntitySpawn(EntitySpawnS2CPacket packet, CallbackInfo info) {
|
||||
EntityType<?> entityType = packet.getEntityTypeId();
|
||||
|
@ -3,6 +3,8 @@ package com.thebrokenrail.sorcerycraft.packet;
|
||||
import com.thebrokenrail.sorcerycraft.SorceryCraft;
|
||||
import com.thebrokenrail.sorcerycraft.gui.CastingTableScreenHandler;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.network.PacketContext;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
@ -20,6 +22,7 @@ public class SelectSpellC2SPacket {
|
||||
}
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static void send(MinecraftClient minecraft, int index) {
|
||||
PacketByteBuf bytes = new PacketByteBuf(Unpooled.buffer());
|
||||
bytes.writeInt(index);
|
||||
|
Reference in New Issue
Block a user