refactored IEntity.java
This commit is contained in:
1 parent
a018f2a2ae
commit
4dad60a664
4 files changed
+10
-10
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
package carpet.fakes;
|
||||||
|
|
||||||
|
public interface EntityInterface
|
||||||
|
{
|
||||||
|
float getMainYaw(float partialTicks);
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package carpet.mixins;
|
package carpet.mixins;
|
||||||
|
|
||||||
import carpet.CarpetSettings;
|
import carpet.CarpetSettings;
|
||||||
import carpet.utils.IEntity;
|
import carpet.fakes.EntityInterface;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
@@ -20,7 +20,7 @@ public abstract class DirectionMixin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return -((IEntity) entity).getMainYaw(1.0F) * 0.017453292F;
|
return -((EntityInterface) entity).getMainYaw(1.0F) * 0.017453292F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package carpet.mixins;
|
package carpet.mixins;
|
||||||
|
|
||||||
import carpet.utils.IEntity;
|
import carpet.fakes.EntityInterface;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
|
||||||
@Mixin(Entity.class)
|
@Mixin(Entity.class)
|
||||||
public abstract class EntityMixin implements IEntity
|
public abstract class EntityMixin implements EntityInterface
|
||||||
{
|
{
|
||||||
@Shadow
|
@Shadow
|
||||||
public float yaw;
|
public float yaw;
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
package carpet.utils;
|
|
||||||
|
|
||||||
public interface IEntity
|
|
||||||
{
|
|
||||||
float getMainYaw(float partialTicks);
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user