24w21a - broken shapes

This commit is contained in:
gnembon committed 2024-05-22 22:34:21 +02:00
1 parent 7a1e152229
commit 9e578e6cc9
18 files changed
+274 -235

No files matched your search

@@ -1,6 +1,7 @@
package carpet.mixins;
import carpet.CarpetSettings;
import carpet.patches.EntityPlayerMPFake;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
@@ -47,4 +48,12 @@ public abstract class LivingEntity_creativeFlyMixin extends Entity
cir.setReturnValue( getFlyingSpeed() * (float)CarpetSettings.creativeFlySpeed);
}
}
@Inject(method = "canChangeDimensions", at = @At("HEAD"), cancellable = true)
private void canChangeDimensions(CallbackInfoReturnable<Boolean> cir)
{
if (CarpetSettings.isCreativeFlying(this)) {
cir.setReturnValue(false);
}
}
}