Use vanilla packet to spawn pink wither and pixie, it can handle them without changes now

This commit is contained in:
Vincent Lee committed 2020-07-18 12:06:55 -05:00
1 parent 7f9a7b1ec7
commit b28d64050d
2 files changed
-17

No files matched your search

@@ -15,13 +15,10 @@ import net.minecraft.entity.ai.goal.RangedAttackGoal;
import net.minecraft.entity.boss.WitherEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.network.IPacket;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
import vazkii.botania.mixin.MixinGoalSelector;
import vazkii.botania.mixin.MixinWitherEntity;
@@ -77,10 +74,4 @@ public class EntityPinkWither extends WitherEntity {
@Override
public void addTrackingPlayer(@Nonnull ServerPlayerEntity player) {}
@Nonnull
@Override
public IPacket<?> createSpawnPacket() {
return NetworkHooks.getEntitySpawningPacket(this);
}
}
@@ -12,14 +12,12 @@ import net.minecraft.entity.EntityType;
import net.minecraft.entity.FlyingEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.IPacket;
import net.minecraft.network.datasync.DataParameter;
import net.minecraft.network.datasync.DataSerializers;
import net.minecraft.network.datasync.EntityDataManager;
import net.minecraft.potion.EffectInstance;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
import vazkii.botania.client.fx.SparkleParticleData;
@@ -46,12 +44,6 @@ public class EntityPixie extends FlyingEntity {
dataManager.register(PIXIE_TYPE, 0);
}
@Nonnull
@Override
public IPacket<?> createSpawnPacket() {
return NetworkHooks.getEntitySpawningPacket(this);
}
public void setPixieType(int type) {
dataManager.set(PIXIE_TYPE, type);
}