Add Annotations
All checks were successful
SorceryCraft/pipeline/head This commit looks good

This commit is contained in:
TheBrokenRail 2020-03-21 15:30:05 -04:00
parent d2d33c6159
commit df3c1dcffd
3 changed files with 6 additions and 1 deletions

View File

@ -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")

View File

@ -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();

View File

@ -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);