mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 13:57:59 +01:00
1.15.2 -> 20w10a
This commit is contained in:
parent
0a948db942
commit
4229193817
12 changed files with 34 additions and 50 deletions
|
@ -67,7 +67,9 @@ dependencies {
|
|||
include "com.minelittlepony:Mson:${project.mson_version}"
|
||||
|
||||
modImplementation "com.minelittlepony:HDSkins:${project.hd_skins_version}"
|
||||
modCompileOnly "io.github.prospector:modmenu:${project.modmenu_version}"
|
||||
modImplementation("io.github.prospector:modmenu:${project.modmenu_version}") {
|
||||
exclude group: "net.fabricmc.fabric-api"
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -3,9 +3,9 @@ org.gradle.daemon=false
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.15.2
|
||||
yarn_mappings=1.15.2+build.7:v2
|
||||
loader_version=0.7.6+build.180
|
||||
minecraft_version=20w10a
|
||||
yarn_mappings=20w10a+build.16:v2
|
||||
loader_version=0.7.8+build.187
|
||||
|
||||
# Mod Properties
|
||||
group=com.minelittlepony
|
||||
|
@ -16,7 +16,7 @@ org.gradle.daemon=false
|
|||
release=RELEASE
|
||||
|
||||
# Dependencies
|
||||
modmenu_version=1.8.+
|
||||
modmenu_version=1.10.+
|
||||
kirin_version=1.5.2-1.15.2
|
||||
hd_skins_version=6.1.3-1.15.2
|
||||
mson_version=1.1.11-1.15.2
|
||||
|
|
|
@ -13,8 +13,8 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity {
|
|||
public MixinClientPlayerEntity() { super(null, null); }
|
||||
|
||||
@Override
|
||||
public float getActiveEyeHeight(EntityPose entityPose_1, EntityDimensions entitySize_1) {
|
||||
float value = super.getActiveEyeHeight(entityPose_1, entitySize_1);
|
||||
public float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions) {
|
||||
float value = super.getActiveEyeHeight(pose, dimensions);
|
||||
|
||||
IPony pony = MineLittlePony.getInstance().getManager().getPony(this);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.minelittlepony.client.mixin;
|
||||
|
||||
import net.minecraft.server.network.packet.PlayerMoveC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -9,6 +9,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
|
||||
import com.minelittlepony.client.HorseCam;
|
||||
|
||||
@Mixin(PlayerMoveC2SPacket.Both.class)
|
||||
abstract class MixinPlayerMoveC2SPacket extends PlayerMoveC2SPacket {
|
||||
@Inject(method = "<init>(DDDFFZ)V",
|
||||
at = @At("RETURN"))
|
||||
private void onInit(CallbackInfo info) {
|
||||
this.pitch = HorseCam.transformCameraAngle(this.pitch);
|
||||
}
|
||||
}
|
||||
@Mixin(PlayerMoveC2SPacket.LookOnly.class)
|
||||
abstract class MixinPlayerMoveC2SPacket_LookOnly extends PlayerMoveC2SPacket {
|
||||
@Inject(method = "<init>(FFZ)V",
|
|
@ -1,19 +0,0 @@
|
|||
package com.minelittlepony.client.mixin;
|
||||
|
||||
import net.minecraft.server.network.packet.PlayerMoveC2SPacket;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import com.minelittlepony.client.HorseCam;
|
||||
|
||||
@Mixin(PlayerMoveC2SPacket.Both.class)
|
||||
abstract class MixinPlayerMoveC2SPacket_Both extends PlayerMoveC2SPacket {
|
||||
@Inject(method = "<init>(DDDFFZ)V",
|
||||
at = @At("RETURN"))
|
||||
private void onInit(CallbackInfo info) {
|
||||
this.pitch = HorseCam.transformCameraAngle(this.pitch);
|
||||
}
|
||||
}
|
|
@ -84,7 +84,7 @@ public class SeaponyModel<T extends LivingEntity> extends UnicornModel<T> {
|
|||
rightArm.pitch -= 0.5F;
|
||||
}
|
||||
|
||||
if (!entity.isSubmergedInWater() || entity.onGround) {
|
||||
if (!entity.isSubmergedInWater() || entity.method_24828()) {
|
||||
leftArm.yaw -= 0.5F;
|
||||
rightArm.yaw += 0.5F;
|
||||
}
|
||||
|
|
|
@ -81,12 +81,12 @@ public class Pony implements IPony {
|
|||
* this is to keep Pegasus wings from flapping in odd situations (Hypixel).
|
||||
*/
|
||||
private boolean isOnGround(LivingEntity entity) {
|
||||
if (entity.onGround) {
|
||||
if (entity.method_24828()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
BlockState below = entity.getEntityWorld()
|
||||
.getBlockState(entity.getBlockPos().down(1));
|
||||
.getBlockState(entity.getSenseCenterPos().down(1));
|
||||
|
||||
// Check for stairs so we can keep Pegasi from flailing their wings as they descend
|
||||
double offsetAmount = below.getBlock() instanceof StairsBlock ? 1 : 0.05;
|
||||
|
@ -108,7 +108,7 @@ public class Pony implements IPony {
|
|||
@Override
|
||||
public boolean isPartiallySubmerged(LivingEntity entity) {
|
||||
return entity.isSubmergedInWater()
|
||||
|| entity.getEntityWorld().getBlockState(entity.getBlockPos()).getMaterial() == Material.WATER;
|
||||
|| entity.getEntityWorld().getBlockState(entity.getSenseCenterPos()).getMaterial() == Material.WATER;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class MobRenderers {
|
|||
pony.switchRenderer(state, EntityType.DROWNED, ZomponyRenderer.Drowned::new);
|
||||
});
|
||||
public static final MobRenderers ZOMBIE_PIGMAN = register("pigzombies", (state, pony) -> {
|
||||
pony.switchRenderer(state, EntityType.ZOMBIE_PIGMAN, ZomponyRenderer.Pigman::new);
|
||||
pony.switchRenderer(state, EntityType.ZOMBIFIED_PIGLIN, ZomponyRenderer.Piglin::new);
|
||||
});
|
||||
public static final MobRenderers SKELETON = register("skeletons", (state, pony) -> {
|
||||
pony.switchRenderer(state, EntityType.SKELETON, SkeleponyRenderer::new);
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.entity.mob.DrownedEntity;
|
|||
import net.minecraft.entity.mob.GiantEntity;
|
||||
import net.minecraft.entity.mob.HuskEntity;
|
||||
import net.minecraft.entity.mob.ZombieEntity;
|
||||
import net.minecraft.entity.mob.ZombiePigmanEntity;
|
||||
import net.minecraft.entity.mob.ZombifiedPiglinEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import com.minelittlepony.client.model.ModelType;
|
||||
|
@ -40,14 +40,14 @@ public class ZomponyRenderer<Zombie extends ZombieEntity> extends PonyRenderer.C
|
|||
}
|
||||
}
|
||||
|
||||
public static class Pigman extends ZomponyRenderer<ZombiePigmanEntity> {
|
||||
public static class Piglin extends ZomponyRenderer<ZombifiedPiglinEntity> {
|
||||
|
||||
public Pigman(EntityRenderDispatcher manager) {
|
||||
public Piglin(EntityRenderDispatcher manager) {
|
||||
super(manager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier findTexture(ZombiePigmanEntity entity) {
|
||||
public Identifier findTexture(ZombifiedPiglinEntity entity) {
|
||||
return PIGMAN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,18 +38,12 @@ public class CapeFeature<M extends ClientPonyModel<AbstractClientPlayerEntity>>
|
|||
stack.translate(0, 0.24F, 0);
|
||||
model.getBodyPart(BodyPart.BODY).rotate(stack);
|
||||
|
||||
double capeX = MathHelper.lerp(tickDelta, player.field_7524, player.field_7500) - MathHelper.lerp(tickDelta, player.prevX, player.getX());
|
||||
double capeY = MathHelper.lerp(tickDelta, player.field_7502, player.field_7521) - MathHelper.lerp(tickDelta, player.prevY, player.getY());
|
||||
double capeZ = MathHelper.lerp(tickDelta, player.field_7522, player.field_7499) - MathHelper.lerp(tickDelta, player.prevZ, player.getZ());
|
||||
double capeX = MathHelper.lerp(tickDelta, player.capeX, player.prevCapeX) - MathHelper.lerp(tickDelta, player.prevX, player.getX());
|
||||
double capeY = MathHelper.lerp(tickDelta, player.capeY, player.prevCapeY) - MathHelper.lerp(tickDelta, player.prevY, player.getY());
|
||||
double capeZ = MathHelper.lerp(tickDelta, player.capeZ, player.prevCapeZ) - MathHelper.lerp(tickDelta, player.prevZ, player.getZ());
|
||||
|
||||
float motionYaw = player.prevBodyYaw + (player.bodyYaw - player.prevBodyYaw);
|
||||
|
||||
//double capeX = player.prevRenderX + (player.x - player.prevRenderX) * scale - (player.prevX + (player.x - player.prevX) * scale);
|
||||
//double capeY = player.prevRenderY + (player.y - player.prevRenderY) * scale - (player.prevY + (player.y - player.prevY) * scale);
|
||||
//double capeZ = player.prevRenderZ + (player.z - player.prevRenderZ) * scale - (player.prevZ + (player.z - player.prevZ) * scale);
|
||||
|
||||
//float motionYaw = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * scale;
|
||||
|
||||
double sin = MathHelper.sin(motionYaw * PI / 180);
|
||||
double cos = (-MathHelper.cos(motionYaw * PI / 180));
|
||||
|
||||
|
@ -64,8 +58,7 @@ public class CapeFeature<M extends ClientPonyModel<AbstractClientPlayerEntity>>
|
|||
|
||||
if (capeMotionX < 0) capeMotionX = 0;
|
||||
|
||||
float camera = MathHelper.lerp(tickDelta, player.field_7505, player.field_7483);
|
||||
//float camera = player.prevCameraYaw + (player.cameraYaw - player.prevCameraYaw) * scale;
|
||||
float camera = MathHelper.lerp(tickDelta, player.prevStrideDistance, player.strideDistance);
|
||||
capeMotionY += MathHelper.sin(MathHelper.lerp(tickDelta, player.prevHorizontalSpeed, player.horizontalSpeed) * 6) * 32 * camera;
|
||||
|
||||
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(2 + capeMotionX / 12 + capeMotionY));
|
||||
|
|
|
@ -78,7 +78,7 @@ public abstract class IllagerPonyRenderer<T extends IllagerEntity> extends PonyR
|
|||
public void render(IllusionerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
|
||||
if (entity.isInvisible()) {
|
||||
Vec3d[] clones = entity.method_7065(tickDelta);
|
||||
float rotation = getCustomAngle(entity, tickDelta);
|
||||
float rotation = getAnimationProgress(entity, tickDelta);
|
||||
|
||||
for (int i = 0; i < clones.length; ++i) {
|
||||
stack.push();
|
||||
|
@ -96,7 +96,7 @@ public abstract class IllagerPonyRenderer<T extends IllagerEntity> extends PonyR
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean method_4056(IllusionerEntity entity) {
|
||||
protected boolean isFullyVisible(IllusionerEntity entity) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public interface PonyPosture<T extends LivingEntity> {
|
|||
default void apply(T player, IModel model, MatrixStack stack, float yaw, float ticks, int invert) {
|
||||
if (applies(player)) {
|
||||
double motionX = player.getX() - player.prevX;
|
||||
double motionY = player.onGround ? 0 : player.getY() - player.prevY;
|
||||
double motionY = player.method_24828() ? 0 : player.getY() - player.prevY;
|
||||
double motionZ = player.getZ() - player.prevZ;
|
||||
|
||||
transform(model, player, stack, motionX, invert * motionY, motionZ, yaw, ticks);
|
||||
|
|
Loading…
Reference in a new issue