1.19.4-pre1
This commit is contained in:
1 parent
4d842ae382
commit
4c8e477f4b
15 files changed
+37
-30
No files matched your search
@@ -4,6 +4,7 @@ import carpet.fakes.EntityInterface;
|
||||
import carpet.patches.EntityPlayerMPFake;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -21,7 +22,7 @@ public abstract class EntityMixin implements EntityInterface
|
||||
@Shadow
|
||||
public float yRotO;
|
||||
|
||||
@Shadow public @Nullable abstract Entity getControllingPassenger();
|
||||
@Shadow public @Nullable abstract LivingEntity getControllingPassenger();
|
||||
|
||||
@Shadow public Level level;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
@Mixin(LivingEntity.class)
|
||||
public abstract class LivingEntity_creativeFlyMixin extends Entity
|
||||
{
|
||||
@Shadow public float flyingSpeed;
|
||||
@Shadow protected abstract float getFlyingSpeed();
|
||||
|
||||
public LivingEntity_creativeFlyMixin(EntityType<?> type, Level world)
|
||||
{
|
||||
@@ -44,7 +44,7 @@ public abstract class LivingEntity_creativeFlyMixin extends Entity
|
||||
{
|
||||
Player self = (Player)(Object)(this);
|
||||
if (self.getAbilities().flying && !onGround)
|
||||
cir.setReturnValue( flyingSpeed* (float)CarpetSettings.creativeFlySpeed);
|
||||
cir.setReturnValue( getFlyingSpeed() * (float)CarpetSettings.creativeFlySpeed);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user