Files
CatServer/patches/net/minecraft/entity/monster/EntitySpellcasterIllager.java.patch
2019-02-24 22:29:41 +08:00

79 lines
3.3 KiB
Diff

--- ../src-base/minecraft/net/minecraft/entity/monster/EntitySpellcasterIllager.java
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntitySpellcasterIllager.java
@@ -17,7 +17,7 @@
{
private static final DataParameter<Byte> SPELL = EntityDataManager.<Byte>createKey(EntitySpellcasterIllager.class, DataSerializers.BYTE);
protected int spellTicks;
- private EntitySpellcasterIllager.SpellType activeSpell = EntitySpellcasterIllager.SpellType.NONE;
+ private SpellType activeSpell = SpellType.NONE;
public EntitySpellcasterIllager(World p_i47506_1_)
{
@@ -45,7 +45,7 @@
@SideOnly(Side.CLIENT)
public AbstractIllager.IllagerArmPose getArmPose()
{
- return this.isSpellcasting() ? AbstractIllager.IllagerArmPose.SPELLCASTING : AbstractIllager.IllagerArmPose.CROSSED;
+ return this.isSpellcasting() ? IllagerArmPose.SPELLCASTING : IllagerArmPose.CROSSED;
}
public boolean isSpellcasting()
@@ -60,15 +60,15 @@
}
}
- public void setSpellType(EntitySpellcasterIllager.SpellType spellType)
+ public void setSpellType(SpellType spellType)
{
this.activeSpell = spellType;
this.dataManager.set(SPELL, Byte.valueOf((byte)spellType.id));
}
- protected EntitySpellcasterIllager.SpellType getSpellType()
+ public SpellType getSpellType()
{
- return !this.world.isRemote ? this.activeSpell : EntitySpellcasterIllager.SpellType.getFromId(((Byte)this.dataManager.get(SPELL)).byteValue());
+ return !this.world.isRemote ? this.activeSpell : SpellType.getFromId(((Byte)this.dataManager.get(SPELL)).byteValue());
}
protected void updateAITasks()
@@ -87,7 +87,7 @@
if (this.world.isRemote && this.isSpellcasting())
{
- EntitySpellcasterIllager.SpellType entityspellcasterillager$spelltype = this.getSpellType();
+ SpellType entityspellcasterillager$spelltype = this.getSpellType();
double d0 = entityspellcasterillager$spelltype.particleSpeed[0];
double d1 = entityspellcasterillager$spelltype.particleSpeed[1];
double d2 = entityspellcasterillager$spelltype.particleSpeed[2];
@@ -127,7 +127,7 @@
public void resetTask()
{
super.resetTask();
- EntitySpellcasterIllager.this.setSpellType(EntitySpellcasterIllager.SpellType.NONE);
+ EntitySpellcasterIllager.this.setSpellType(SpellType.NONE);
}
public void updateTask()
@@ -205,7 +205,7 @@
@Nullable
protected abstract SoundEvent getSpellPrepareSound();
- protected abstract EntitySpellcasterIllager.SpellType getSpellType();
+ protected abstract SpellType getSpellType();
}
public static enum SpellType
@@ -226,9 +226,9 @@
this.particleSpeed = new double[] {xParticleSpeed, yParticleSpeed, zParticleSpeed};
}
- public static EntitySpellcasterIllager.SpellType getFromId(int idIn)
+ public static SpellType getFromId(int idIn)
{
- for (EntitySpellcasterIllager.SpellType entityspellcasterillager$spelltype : values())
+ for (SpellType entityspellcasterillager$spelltype : values())
{
if (idIn == entityspellcasterillager$spelltype.id)
{