This commit is contained in:
parent
923a5936ee
commit
73d90bb2ff
@ -3,6 +3,8 @@ package com.thebrokenrail.slightlyvanilla.mixin;
|
|||||||
import com.thebrokenrail.slightlyvanilla.SlightlyVanilla;
|
import com.thebrokenrail.slightlyvanilla.SlightlyVanilla;
|
||||||
import com.thebrokenrail.slightlyvanilla.entity.SlimeballEntity;
|
import com.thebrokenrail.slightlyvanilla.entity.SlimeballEntity;
|
||||||
import com.thebrokenrail.slightlyvanilla.entity.SpawnEggEntity;
|
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.network.ClientPlayNetworkHandler;
|
||||||
import net.minecraft.client.world.ClientWorld;
|
import net.minecraft.client.world.ClientWorld;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@ -20,6 +22,7 @@ public class MixinClientPlayNetworkHandler {
|
|||||||
@Shadow
|
@Shadow
|
||||||
private ClientWorld world;
|
private ClientWorld world;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
@Inject(method = "onEntitySpawn", at = @At(value = "TAIL"))
|
@Inject(method = "onEntitySpawn", at = @At(value = "TAIL"))
|
||||||
public void onEntitySpawn(EntitySpawnS2CPacket packet, CallbackInfo info) {
|
public void onEntitySpawn(EntitySpawnS2CPacket packet, CallbackInfo info) {
|
||||||
EntityType<?> entityType = packet.getEntityTypeId();
|
EntityType<?> entityType = packet.getEntityTypeId();
|
||||||
|
@ -12,6 +12,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
|||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@Mixin(NetherPortalBlock.AreaHelper.class)
|
@Mixin(NetherPortalBlock.AreaHelper.class)
|
||||||
public class MixinNetherPortalBlockAreaHelper {
|
public class MixinNetherPortalBlockAreaHelper {
|
||||||
|
@SuppressWarnings("UnresolvedMixinReference")
|
||||||
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;getBlock()Lnet/minecraft/block/Block;"), method = "*")
|
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;getBlock()Lnet/minecraft/block/Block;"), method = "*")
|
||||||
public Block redirectBlock(BlockState state) {
|
public Block redirectBlock(BlockState state) {
|
||||||
Block block = state.getBlock();
|
Block block = state.getBlock();
|
||||||
|
Reference in New Issue
Block a user