1.15.2 -> 20w10a

This commit is contained in:
Sollace 2020-03-19 15:25:59 +02:00
parent 0a948db942
commit 4229193817
12 changed files with 34 additions and 50 deletions

View file

@ -67,7 +67,9 @@ dependencies {
include "com.minelittlepony:Mson:${project.mson_version}" include "com.minelittlepony:Mson:${project.mson_version}"
modImplementation "com.minelittlepony:HDSkins:${project.hd_skins_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"
}
} }
// //

View file

@ -3,9 +3,9 @@ org.gradle.daemon=false
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
minecraft_version=1.15.2 minecraft_version=20w10a
yarn_mappings=1.15.2+build.7:v2 yarn_mappings=20w10a+build.16:v2
loader_version=0.7.6+build.180 loader_version=0.7.8+build.187
# Mod Properties # Mod Properties
group=com.minelittlepony group=com.minelittlepony
@ -16,7 +16,7 @@ org.gradle.daemon=false
release=RELEASE release=RELEASE
# Dependencies # Dependencies
modmenu_version=1.8.+ modmenu_version=1.10.+
kirin_version=1.5.2-1.15.2 kirin_version=1.5.2-1.15.2
hd_skins_version=6.1.3-1.15.2 hd_skins_version=6.1.3-1.15.2
mson_version=1.1.11-1.15.2 mson_version=1.1.11-1.15.2

View file

@ -13,8 +13,8 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity {
public MixinClientPlayerEntity() { super(null, null); } public MixinClientPlayerEntity() { super(null, null); }
@Override @Override
public float getActiveEyeHeight(EntityPose entityPose_1, EntityDimensions entitySize_1) { public float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions) {
float value = super.getActiveEyeHeight(entityPose_1, entitySize_1); float value = super.getActiveEyeHeight(pose, dimensions);
IPony pony = MineLittlePony.getInstance().getManager().getPony(this); IPony pony = MineLittlePony.getInstance().getManager().getPony(this);

View file

@ -1,6 +1,6 @@
package com.minelittlepony.client.mixin; 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.Mixin;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
@ -9,6 +9,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.minelittlepony.client.HorseCam; 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) @Mixin(PlayerMoveC2SPacket.LookOnly.class)
abstract class MixinPlayerMoveC2SPacket_LookOnly extends PlayerMoveC2SPacket { abstract class MixinPlayerMoveC2SPacket_LookOnly extends PlayerMoveC2SPacket {
@Inject(method = "<init>(FFZ)V", @Inject(method = "<init>(FFZ)V",

View file

@ -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);
}
}

View file

@ -84,7 +84,7 @@ public class SeaponyModel<T extends LivingEntity> extends UnicornModel<T> {
rightArm.pitch -= 0.5F; rightArm.pitch -= 0.5F;
} }
if (!entity.isSubmergedInWater() || entity.onGround) { if (!entity.isSubmergedInWater() || entity.method_24828()) {
leftArm.yaw -= 0.5F; leftArm.yaw -= 0.5F;
rightArm.yaw += 0.5F; rightArm.yaw += 0.5F;
} }

View file

@ -81,12 +81,12 @@ public class Pony implements IPony {
* this is to keep Pegasus wings from flapping in odd situations (Hypixel). * this is to keep Pegasus wings from flapping in odd situations (Hypixel).
*/ */
private boolean isOnGround(LivingEntity entity) { private boolean isOnGround(LivingEntity entity) {
if (entity.onGround) { if (entity.method_24828()) {
return true; return true;
} }
BlockState below = entity.getEntityWorld() 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 // Check for stairs so we can keep Pegasi from flailing their wings as they descend
double offsetAmount = below.getBlock() instanceof StairsBlock ? 1 : 0.05; double offsetAmount = below.getBlock() instanceof StairsBlock ? 1 : 0.05;
@ -108,7 +108,7 @@ public class Pony implements IPony {
@Override @Override
public boolean isPartiallySubmerged(LivingEntity entity) { public boolean isPartiallySubmerged(LivingEntity entity) {
return entity.isSubmergedInWater() return entity.isSubmergedInWater()
|| entity.getEntityWorld().getBlockState(entity.getBlockPos()).getMaterial() == Material.WATER; || entity.getEntityWorld().getBlockState(entity.getSenseCenterPos()).getMaterial() == Material.WATER;
} }
@Override @Override

View file

@ -37,7 +37,7 @@ public final class MobRenderers {
pony.switchRenderer(state, EntityType.DROWNED, ZomponyRenderer.Drowned::new); pony.switchRenderer(state, EntityType.DROWNED, ZomponyRenderer.Drowned::new);
}); });
public static final MobRenderers ZOMBIE_PIGMAN = register("pigzombies", (state, pony) -> { 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) -> { public static final MobRenderers SKELETON = register("skeletons", (state, pony) -> {
pony.switchRenderer(state, EntityType.SKELETON, SkeleponyRenderer::new); pony.switchRenderer(state, EntityType.SKELETON, SkeleponyRenderer::new);

View file

@ -6,7 +6,7 @@ import net.minecraft.entity.mob.DrownedEntity;
import net.minecraft.entity.mob.GiantEntity; import net.minecraft.entity.mob.GiantEntity;
import net.minecraft.entity.mob.HuskEntity; import net.minecraft.entity.mob.HuskEntity;
import net.minecraft.entity.mob.ZombieEntity; import net.minecraft.entity.mob.ZombieEntity;
import net.minecraft.entity.mob.ZombiePigmanEntity; import net.minecraft.entity.mob.ZombifiedPiglinEntity;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import com.minelittlepony.client.model.ModelType; 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); super(manager);
} }
@Override @Override
public Identifier findTexture(ZombiePigmanEntity entity) { public Identifier findTexture(ZombifiedPiglinEntity entity) {
return PIGMAN; return PIGMAN;
} }
} }

View file

@ -38,18 +38,12 @@ public class CapeFeature<M extends ClientPonyModel<AbstractClientPlayerEntity>>
stack.translate(0, 0.24F, 0); stack.translate(0, 0.24F, 0);
model.getBodyPart(BodyPart.BODY).rotate(stack); 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 capeX = MathHelper.lerp(tickDelta, player.capeX, player.prevCapeX) - 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 capeY = MathHelper.lerp(tickDelta, player.capeY, player.prevCapeY) - 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 capeZ = MathHelper.lerp(tickDelta, player.capeZ, player.prevCapeZ) - MathHelper.lerp(tickDelta, player.prevZ, player.getZ());
float motionYaw = player.prevBodyYaw + (player.bodyYaw - player.prevBodyYaw); 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 sin = MathHelper.sin(motionYaw * PI / 180);
double cos = (-MathHelper.cos(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; if (capeMotionX < 0) capeMotionX = 0;
float camera = MathHelper.lerp(tickDelta, player.field_7505, player.field_7483); float camera = MathHelper.lerp(tickDelta, player.prevStrideDistance, player.strideDistance);
//float camera = player.prevCameraYaw + (player.cameraYaw - player.prevCameraYaw) * scale;
capeMotionY += MathHelper.sin(MathHelper.lerp(tickDelta, player.prevHorizontalSpeed, player.horizontalSpeed) * 6) * 32 * camera; capeMotionY += MathHelper.sin(MathHelper.lerp(tickDelta, player.prevHorizontalSpeed, player.horizontalSpeed) * 6) * 32 * camera;
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(2 + capeMotionX / 12 + capeMotionY)); stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(2 + capeMotionX / 12 + capeMotionY));

View file

@ -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) { public void render(IllusionerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
if (entity.isInvisible()) { if (entity.isInvisible()) {
Vec3d[] clones = entity.method_7065(tickDelta); Vec3d[] clones = entity.method_7065(tickDelta);
float rotation = getCustomAngle(entity, tickDelta); float rotation = getAnimationProgress(entity, tickDelta);
for (int i = 0; i < clones.length; ++i) { for (int i = 0; i < clones.length; ++i) {
stack.push(); stack.push();
@ -96,7 +96,7 @@ public abstract class IllagerPonyRenderer<T extends IllagerEntity> extends PonyR
} }
@Override @Override
protected boolean method_4056(IllusionerEntity entity) { protected boolean isFullyVisible(IllusionerEntity entity) {
return true; return true;
} }
} }

View file

@ -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) { default void apply(T player, IModel model, MatrixStack stack, float yaw, float ticks, int invert) {
if (applies(player)) { if (applies(player)) {
double motionX = player.getX() - player.prevX; 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; double motionZ = player.getZ() - player.prevZ;
transform(model, player, stack, motionX, invert * motionY, motionZ, yaw, ticks); transform(model, player, stack, motionX, invert * motionY, motionZ, yaw, ticks);