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

This commit is contained in:
TheBrokenRail 2020-03-21 15:27:29 -04:00
parent 923a5936ee
commit 73d90bb2ff
2 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,8 @@ package com.thebrokenrail.slightlyvanilla.mixin;
import com.thebrokenrail.slightlyvanilla.SlightlyVanilla;
import com.thebrokenrail.slightlyvanilla.entity.SlimeballEntity;
import com.thebrokenrail.slightlyvanilla.entity.SpawnEggEntity;
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;
@ -20,6 +22,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

@ -12,6 +12,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@SuppressWarnings("unused")
@Mixin(NetherPortalBlock.AreaHelper.class)
public class MixinNetherPortalBlockAreaHelper {
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;getBlock()Lnet/minecraft/block/Block;"), method = "*")
public Block redirectBlock(BlockState state) {
Block block = state.getBlock();