mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 12:37:59 +01:00
Update to 1.15-pre6
This commit is contained in:
parent
640b5b8cd5
commit
c690f706f8
23 changed files with 59 additions and 58 deletions
|
@ -62,7 +62,7 @@ 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}"
|
||||||
modImplementation "io.github.prospector:modmenu:${project.modmenu_version}"
|
// modImplementation "io.github.prospector:modmenu:${project.modmenu_version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,21 +2,21 @@ org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.daemon=false
|
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-pre3
|
minecraft_version=1.15-pre6
|
||||||
yarn_mappings=1.15-pre3+build.2:v2
|
yarn_mappings=1.15-pre6+build.1:v2
|
||||||
loader_version=0.7.2+build.174
|
loader_version=0.7.2+build.174
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
group=com.minelittlepony
|
group=com.minelittlepony
|
||||||
displayname=Mine Little Pony
|
displayname=Mine Little Pony
|
||||||
authors=Verdana, Rene_Z, Mumfrey, Killjoy1221, Sollace
|
authors=Verdana, Rene_Z, Mumfrey, Killjoy1221, Sollace
|
||||||
description=Mine Little Pony turns players and mobs into ponies. Press F9 ingame to access settings.
|
description=Mine Little Pony turns players and mobs into ponies. Press F9 ingame to access settings.
|
||||||
version=4
|
version=4
|
||||||
release=SNAPSHOT
|
release=SNAPSHOT
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
modmenu_version=1.8.0.1.15-pre3+build.14
|
modmenu_version=1.8.0.1.15-pre3+build.14
|
||||||
kirin_version=1.5-1.15-pre3-SNAPSHOT
|
kirin_version=1.5-1.15-pre6-SNAPSHOT
|
||||||
hd_skins_version=6-1.15-pre3-SNAPSHOT
|
hd_skins_version=6-1.15-pre6-SNAPSHOT
|
||||||
mson_version=1.1.3-1.15-pre3-SNAPSHOT
|
mson_version=1.1.3-1.15-pre6-SNAPSHOT
|
||||||
|
|
|
@ -80,7 +80,7 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
|
|
||||||
if (attributes.isCrouching) {
|
if (attributes.isCrouching) {
|
||||||
ponyCrouch();
|
ponyCrouch();
|
||||||
} else if (isRiding) {
|
} else if (riding) {
|
||||||
ponyRide();
|
ponyRide();
|
||||||
} else {
|
} else {
|
||||||
adjustBody(BODY_ROT_X_NOTSNEAK, BODY_RP_Y_NOTSNEAK, BODY_RP_Z_NOTSNEAK);
|
adjustBody(BODY_ROT_X_NOTSNEAK, BODY_RP_Y_NOTSNEAK, BODY_RP_Z_NOTSNEAK);
|
||||||
|
|
|
@ -34,7 +34,7 @@ public abstract class ClientPonyModel<T extends LivingEntity> extends MsonPlayer
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateLivingState(T entity, IPony pony, EquineRenderManager.Mode mode) {
|
public void updateLivingState(T entity, IPony pony, EquineRenderManager.Mode mode) {
|
||||||
isChild = entity.isBaby();
|
child = entity.isBaby();
|
||||||
isSneaking = entity.isInSneakingPose();
|
isSneaking = entity.isInSneakingPose();
|
||||||
attributes.updateLivingState(entity, pony, mode);
|
attributes.updateLivingState(entity, pony, mode);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public abstract class ClientPonyModel<T extends LivingEntity> extends MsonPlayer
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Size getSize() {
|
public Size getSize() {
|
||||||
return isChild ? Size.FOAL : getMetadata().getSize();
|
return child ? Size.FOAL : getMetadata().getSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -71,7 +71,7 @@ public abstract class ClientPonyModel<T extends LivingEntity> extends MsonPlayer
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRiding() {
|
public boolean isRiding() {
|
||||||
return isRiding;
|
return riding;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class BreezieModel<T extends LivingEntity> extends MsonBiped<T> implement
|
||||||
((MsonPart)leftLeg) .rotate(swing * MathHelper.cos(move * 0.6662F + PI) * 1.4F, 0, 0);
|
((MsonPart)leftLeg) .rotate(swing * MathHelper.cos(move * 0.6662F + PI) * 1.4F, 0, 0);
|
||||||
((MsonPart)rightLeg).rotate(swing * MathHelper.cos(move * 0.6662F) * 1.4F, 0, 0);
|
((MsonPart)rightLeg).rotate(swing * MathHelper.cos(move * 0.6662F) * 1.4F, 0, 0);
|
||||||
|
|
||||||
if (isRiding) {
|
if (riding) {
|
||||||
leftArm.pitch += -PI / 5;
|
leftArm.pitch += -PI / 5;
|
||||||
rightArm.pitch += -PI / 5;
|
rightArm.pitch += -PI / 5;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class WitchPonyModel extends ZebraModel<WitchEntity> {
|
||||||
super.updateLivingState(entity, pony, mode);
|
super.updateLivingState(entity, pony, mode);
|
||||||
|
|
||||||
if (entity.hasCustomName() && "Filly".equals(entity.getCustomName().getString())) {
|
if (entity.hasCustomName() && "Filly".equals(entity.getCustomName().getString())) {
|
||||||
isChild = true;
|
child = true;
|
||||||
}
|
}
|
||||||
leftArmPose = ArmPose.EMPTY;
|
leftArmPose = ArmPose.EMPTY;
|
||||||
rightArmPose = entity.getMainHandStack().isEmpty() ? ArmPose.EMPTY : ArmPose.ITEM;
|
rightArmPose = entity.getMainHandStack().isEmpty() ? ArmPose.EMPTY : ArmPose.ITEM;
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class EarthPonyModel<T extends LivingEntity> extends AbstractPonyModel<T>
|
||||||
public void setAngles(T entity, float move, float swing, float ticks, float headYaw, float headPitch) {
|
public void setAngles(T entity, float move, float swing, float ticks, float headYaw, float headPitch) {
|
||||||
super.setAngles(entity, move, swing, ticks, headYaw, headPitch);
|
super.setAngles(entity, move, swing, ticks, headYaw, headPitch);
|
||||||
snout.setGender(getMetadata().getGender());
|
snout.setGender(getMetadata().getGender());
|
||||||
cape.pivotY = isSneaking ? 2 : isRiding ? -4 : 0;
|
cape.pivotY = isSneaking ? 2 : riding ? -4 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.minelittlepony.client.modmenu;
|
/*package com.minelittlepony.client.modmenu;
|
||||||
|
|
||||||
import io.github.prospector.modmenu.api.ModMenuApi;
|
import io.github.prospector.modmenu.api.ModMenuApi;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
@ -19,3 +19,4 @@ public class MineLPModMenuFactory implements ModMenuApi {
|
||||||
return GuiPonySettings::new;
|
return GuiPonySettings::new;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
|
@ -192,9 +192,9 @@ public class Pony implements IPony {
|
||||||
float delta = MinecraftClient.getInstance().getTickDelta();
|
float delta = MinecraftClient.getInstance().getTickDelta();
|
||||||
|
|
||||||
return new Vec3d(
|
return new Vec3d(
|
||||||
MathHelper.lerp(delta, entity.prevRenderX, entity.getX()),
|
MathHelper.lerp(delta, entity.prevX, entity.getX()),
|
||||||
MathHelper.lerp(delta, entity.prevRenderY, entity.getY()),
|
MathHelper.lerp(delta, entity.prevY, entity.getY()),
|
||||||
MathHelper.lerp(delta, entity.prevRenderZ, entity.getZ())
|
MathHelper.lerp(delta, entity.prevZ, entity.getZ())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ import com.minelittlepony.client.transform.PonyPosture;
|
||||||
import com.minelittlepony.mson.api.ModelKey;
|
import com.minelittlepony.mson.api.ModelKey;
|
||||||
import com.minelittlepony.pony.IPony;
|
import com.minelittlepony.pony.IPony;
|
||||||
import com.minelittlepony.util.MathUtil;
|
import com.minelittlepony.util.MathUtil;
|
||||||
import com.mojang.blaze3d.platform.GlStateManager.DestFactor;
|
import com.mojang.blaze3d.platform.GlStateManager.DstFactor;
|
||||||
import com.mojang.blaze3d.platform.GlStateManager.SourceFactor;
|
import com.mojang.blaze3d.platform.GlStateManager.SrcFactor;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
@ -35,7 +35,7 @@ public class EquineRenderManager<T extends LivingEntity, M extends EntityModel<T
|
||||||
public static void enableModelRenderProfile(boolean skipBlend) {
|
public static void enableModelRenderProfile(boolean skipBlend) {
|
||||||
RenderSystem.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
if (!skipBlend) {
|
if (!skipBlend) {
|
||||||
RenderSystem.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
|
RenderSystem.blendFunc(SrcFactor.SRC_ALPHA, DstFactor.ONE_MINUS_SRC_ALPHA);
|
||||||
}
|
}
|
||||||
RenderSystem.alphaFunc(516, 0.003921569F);
|
RenderSystem.alphaFunc(516, 0.003921569F);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ public interface IPonyRenderContext<T extends LivingEntity, M extends EntityMode
|
||||||
*/
|
*/
|
||||||
default void translateRider(T entity, IPony entityPony, LivingEntity passenger, IPony passengerPony, MatrixStack stack, float ticks) {
|
default void translateRider(T entity, IPony entityPony, LivingEntity passenger, IPony passengerPony, MatrixStack stack, float ticks) {
|
||||||
if (!passengerPony.getRace(false).isHuman()) {
|
if (!passengerPony.getRace(false).isHuman()) {
|
||||||
float yaw = MathUtil.interpolateDegress((float)entity.prevRenderY, (float)entity.getY(), ticks);
|
float yaw = MathUtil.interpolateDegress((float)entity.prevY, (float)entity.getY(), ticks);
|
||||||
|
|
||||||
getModelWrapper().apply(entityPony.getMetadata());
|
getModelWrapper().apply(entityPony.getMetadata());
|
||||||
M model = getModelWrapper().getBody();
|
M model = getModelWrapper().getBody();
|
||||||
|
|
|
@ -5,8 +5,8 @@ import net.minecraft.client.render.RenderPhase;
|
||||||
import net.minecraft.client.render.VertexFormats;
|
import net.minecraft.client.render.VertexFormats;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
import com.mojang.blaze3d.platform.GlStateManager.DestFactor;
|
import com.mojang.blaze3d.platform.GlStateManager.DstFactor;
|
||||||
import com.mojang.blaze3d.platform.GlStateManager.SourceFactor;
|
import com.mojang.blaze3d.platform.GlStateManager.SrcFactor;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
public class MagicGlow extends RenderPhase {
|
public class MagicGlow extends RenderPhase {
|
||||||
|
@ -17,14 +17,14 @@ public class MagicGlow extends RenderPhase {
|
||||||
protected static final RenderPhase.Transparency GLOWING_TRANSPARENCY = new RenderPhase.Transparency("glowing_transparency", () -> {
|
protected static final RenderPhase.Transparency GLOWING_TRANSPARENCY = new RenderPhase.Transparency("glowing_transparency", () -> {
|
||||||
RenderSystem.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
RenderSystem.blendFuncSeparate(
|
RenderSystem.blendFuncSeparate(
|
||||||
SourceFactor.CONSTANT_COLOR, DestFactor.ONE,
|
SrcFactor.CONSTANT_COLOR, DstFactor.ONE,
|
||||||
SourceFactor.ONE, DestFactor.ZERO);
|
SrcFactor.ONE, DstFactor.ZERO);
|
||||||
}, () -> {
|
}, () -> {
|
||||||
RenderSystem.disableBlend();
|
RenderSystem.disableBlend();
|
||||||
RenderSystem.defaultBlendFunc();
|
RenderSystem.defaultBlendFunc();
|
||||||
});
|
});
|
||||||
|
|
||||||
private static final RenderLayer MAGIC = RenderLayer.of("mlp_magic_glow", VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL, 7, 256, RenderLayer.PhaseData.builder()
|
private static final RenderLayer MAGIC = RenderLayer.of("mlp_magic_glow", VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL, 7, 256, RenderLayer.MultiPhaseParameters.builder()
|
||||||
.texture(NO_TEXTURE)
|
.texture(NO_TEXTURE)
|
||||||
.writeMaskState(COLOR_MASK)
|
.writeMaskState(COLOR_MASK)
|
||||||
.transparency(LIGHTNING_TRANSPARENCY)
|
.transparency(LIGHTNING_TRANSPARENCY)
|
||||||
|
@ -37,7 +37,7 @@ public class MagicGlow extends RenderPhase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RenderLayer getTintedTexturedLayer(Identifier texture, float red, float green, float blue, float alpha) {
|
public static RenderLayer getTintedTexturedLayer(Identifier texture, float red, float green, float blue, float alpha) {
|
||||||
return RenderLayer.of("mlp_tint_layer", VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7, 256, true, true, RenderLayer.PhaseData.builder()
|
return RenderLayer.of("mlp_tint_layer", VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7, 256, true, true, RenderLayer.MultiPhaseParameters.builder()
|
||||||
.texture(new Color(texture, red, green, blue, alpha))
|
.texture(new Color(texture, red, green, blue, alpha))
|
||||||
.writeMaskState(COLOR_MASK)
|
.writeMaskState(COLOR_MASK)
|
||||||
.alpha(ONE_TENTH_ALPHA)
|
.alpha(ONE_TENTH_ALPHA)
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class PonySkullRenderer extends SkullBlockEntityRenderer {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Map<SkullBlock.SkullType, ISkull> skullMap = Util.create(Maps.newHashMap(), (skullMap) -> {
|
private final Map<SkullBlock.SkullType, ISkull> skullMap = Util.make(Maps.newHashMap(), (skullMap) -> {
|
||||||
skullMap.put(SkullBlock.Type.SKELETON, new MobSkull(SkeleponyRenderer.SKELETON, MobRenderers.SKELETON));
|
skullMap.put(SkullBlock.Type.SKELETON, new MobSkull(SkeleponyRenderer.SKELETON, MobRenderers.SKELETON));
|
||||||
skullMap.put(SkullBlock.Type.WITHER_SKELETON, new MobSkull(SkeleponyRenderer.WITHER, MobRenderers.SKELETON));
|
skullMap.put(SkullBlock.Type.WITHER_SKELETON, new MobSkull(SkeleponyRenderer.WITHER, MobRenderers.SKELETON));
|
||||||
skullMap.put(SkullBlock.Type.ZOMBIE, new MobSkull(ZomponyRenderer.ZOMBIE, MobRenderers.ZOMBIE));
|
skullMap.put(SkullBlock.Type.ZOMBIE, new MobSkull(ZomponyRenderer.ZOMBIE, MobRenderers.ZOMBIE));
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(AbstractClientPlayerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
|
public void render(AbstractClientPlayerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
|
||||||
field_4673 = manager.getShadowScale();
|
shadowSize = manager.getShadowScale();
|
||||||
super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv);
|
super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv);
|
||||||
|
|
||||||
DebugBoundingBoxRenderer.render(manager.getPony(entity), entity, stack, renderContext);
|
DebugBoundingBoxRenderer.render(manager.getPony(entity), entity, stack, renderContext);
|
||||||
|
@ -99,11 +99,11 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isVisible(AbstractClientPlayerEntity entity, Frustum camera, double camX, double camY, double camZ) {
|
public boolean shouldRender(AbstractClientPlayerEntity entity, Frustum camera, double camX, double camY, double camZ) {
|
||||||
if (entity.isSleeping() && entity == MinecraftClient.getInstance().player) {
|
if (entity.isSleeping() && entity == MinecraftClient.getInstance().player) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.isVisible(entity, manager.getFrustrum(entity, camera), camX, camY, camZ);
|
return super.shouldRender(entity, manager.getFrustrum(entity, camera), camX, camY, camZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -74,8 +74,8 @@ public abstract class PonyRenderer<T extends MobEntity, M extends EntityModel<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isVisible(T entity, Frustum visibleRegion, double camX, double camY, double camZ) {
|
public boolean shouldRender(T entity, Frustum visibleRegion, double camX, double camY, double camZ) {
|
||||||
return super.isVisible(entity, manager.getFrustrum(entity, visibleRegion), camX, camY, camZ);
|
return super.shouldRender(entity, manager.getFrustrum(entity, visibleRegion), camX, camY, camZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -86,10 +86,10 @@ public abstract class PonyRenderer<T extends MobEntity, M extends EntityModel<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
// shadowRadius
|
// shadowRadius
|
||||||
field_4673 = manager.getShadowScale();
|
shadowSize = manager.getShadowScale();
|
||||||
|
|
||||||
if (entity.isBaby()) {
|
if (entity.isBaby()) {
|
||||||
field_4673 *= 3; // undo vanilla shadow scaling
|
shadowSize *= 3; // undo vanilla shadow scaling
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entity.hasVehicle()) {
|
if (!entity.hasVehicle()) {
|
||||||
|
|
|
@ -26,10 +26,10 @@ public class CapeFeature<M extends ClientPonyModel<AbstractClientPlayerEntity>>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) {
|
public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) {
|
||||||
M model = getModel();
|
M model = getContextModel();
|
||||||
|
|
||||||
if (player.hasSkinTexture() && !player.isInvisible()
|
if (player.hasSkinTexture() && !player.isInvisible()
|
||||||
&& player.isSkinOverlayVisible(PlayerModelPart.CAPE) && player.getCapeTexture() != null
|
&& player.isPartVisible(PlayerModelPart.CAPE) && player.getCapeTexture() != null
|
||||||
&& player.getEquippedStack(EquipmentSlot.CHEST).getItem() != Items.ELYTRA) {
|
&& player.getEquippedStack(EquipmentSlot.CHEST).getItem() != Items.ELYTRA) {
|
||||||
|
|
||||||
stack.push();
|
stack.push();
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ElytraFeature<T extends LivingEntity, M extends EntityModel<T> & IP
|
||||||
|
|
||||||
EntityModel<T> elytra = getElytraModel();
|
EntityModel<T> elytra = getElytraModel();
|
||||||
|
|
||||||
getModel().copyStateTo(elytra);
|
getContextModel().copyStateTo(elytra);
|
||||||
if (elytra instanceof PonyElytra) {
|
if (elytra instanceof PonyElytra) {
|
||||||
((PonyElytra<T>)elytra).isSneaking = getContext().getEntityPony(entity).isCrouching(entity);
|
((PonyElytra<T>)elytra).isSneaking = getContext().getEntityPony(entity).isCrouching(entity);
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ public class ElytraFeature<T extends LivingEntity, M extends EntityModel<T> & IP
|
||||||
if (result != null) return result;
|
if (result != null) return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.hasSkinTexture() && player.isSkinOverlayVisible(PlayerModelPart.CAPE)) {
|
if (player.hasSkinTexture() && player.isPartVisible(PlayerModelPart.CAPE)) {
|
||||||
result = player.getCapeTexture();
|
result = player.getCapeTexture();
|
||||||
|
|
||||||
if (result != null) return result;
|
if (result != null) return result;
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class GlowingItemFeature<T extends LivingEntity, M extends EntityModel<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isUnicorn() {
|
protected boolean isUnicorn() {
|
||||||
return getModel() instanceof IUnicorn<?> && ((IUnicorn<?>)getModel()).canCast();
|
return getContextModel() instanceof IUnicorn<?> && ((IUnicorn<?>)getContextModel()).canCast();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,7 +36,7 @@ public class GlowingItemFeature<T extends LivingEntity, M extends EntityModel<T>
|
||||||
@Override
|
@Override
|
||||||
protected void postItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, Arm hand, MatrixStack stack, VertexConsumerProvider renderContext) {
|
protected void postItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, Arm hand, MatrixStack stack, VertexConsumerProvider renderContext) {
|
||||||
if (isUnicorn()) {
|
if (isUnicorn()) {
|
||||||
PonyRenderDispatcher.getInstance().getMagicRenderer().renderItemGlow(entity, drop, transform, hand, ((IUnicorn<?>)getModel()).getMagicColor(), stack, renderContext);
|
PonyRenderDispatcher.getInstance().getMagicRenderer().renderItemGlow(entity, drop, transform, hand, ((IUnicorn<?>)getContextModel()).getMagicColor(), stack, renderContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public class GlowingItemFeature<T extends LivingEntity, M extends EntityModel<T>
|
||||||
@Override
|
@Override
|
||||||
protected void renderArm(Arm arm, MatrixStack stack) {
|
protected void renderArm(Arm arm, MatrixStack stack) {
|
||||||
if (isUnicorn()) {
|
if (isUnicorn()) {
|
||||||
((IUnicorn<ModelPart>)getModel()).getUnicornArmForSide(arm).rotate(stack);
|
((IUnicorn<ModelPart>)getContextModel()).getUnicornArmForSide(arm).rotate(stack);
|
||||||
} else {
|
} else {
|
||||||
super.renderArm(arm, stack);
|
super.renderArm(arm, stack);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
||||||
ItemStack right = getRightItem(entity);
|
ItemStack right = getRightItem(entity);
|
||||||
|
|
||||||
if (!left.isEmpty() || !right.isEmpty()) {
|
if (!left.isEmpty() || !right.isEmpty()) {
|
||||||
M model = getModel();
|
M model = getContextModel();
|
||||||
|
|
||||||
stack.push();
|
stack.push();
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
||||||
stack.push();
|
stack.push();
|
||||||
renderArm(arm, stack);
|
renderArm(arm, stack);
|
||||||
|
|
||||||
if (getModel().getAttributes().isCrouching) {
|
if (getContextModel().getAttributes().isCrouching) {
|
||||||
stack.translate(0, 0.2F, 0);
|
stack.translate(0, 0.2F, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,6 +91,6 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
||||||
* Renders the main arm
|
* Renders the main arm
|
||||||
*/
|
*/
|
||||||
protected void renderArm(Arm arm, MatrixStack stack) {
|
protected void renderArm(Arm arm, MatrixStack stack) {
|
||||||
getModel().setArmAngle(arm, stack);
|
getContextModel().setArmAngle(arm, stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class IllagerHeldItemFeature<T extends IllagerEntity, M extends AlicornMo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderArm(Arm arm, MatrixStack stack) {
|
protected void renderArm(Arm arm, MatrixStack stack) {
|
||||||
getModel().getArm(arm).rotate(stack);
|
getContextModel().getArm(arm).rotate(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldRender(T entity) {
|
public boolean shouldRender(T entity) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class PassengerFeature<T extends PlayerEntity, M extends ClientPonyModel<
|
||||||
EntityType.get(riderTag.getString("id")).filter(p -> p == EntityType.PARROT).ifPresent((entityType) -> {
|
EntityType.get(riderTag.getString("id")).filter(p -> p == EntityType.PARROT).ifPresent((entityType) -> {
|
||||||
stack.push();
|
stack.push();
|
||||||
|
|
||||||
getModel().transform(BodyPart.BODY, stack);
|
getContextModel().transform(BodyPart.BODY, stack);
|
||||||
|
|
||||||
stack.translate(left ? 0.25 : -0.25, entity.isInSneakingPose() ? -0.5 : -0.25, 0.35);
|
stack.translate(left ? 0.25 : -0.25, entity.isInSneakingPose() ? -0.5 : -0.25, 0.35);
|
||||||
stack.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(left ? -5 : 5));
|
stack.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(left ? -5 : 5));
|
||||||
|
|
|
@ -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 = getAge(entity, tickDelta);
|
float rotation = getCustomAngle(entity, tickDelta);
|
||||||
|
|
||||||
for (int i = 0; i < clones.length; ++i) {
|
for (int i = 0; i < clones.length; ++i) {
|
||||||
stack.push();
|
stack.push();
|
||||||
|
|
|
@ -37,7 +37,7 @@ class NpcClothingFeature<
|
||||||
M extends EntityModel<T> & IPonyModel<T> & ModelWithHat,
|
M extends EntityModel<T> & IPonyModel<T> & ModelWithHat,
|
||||||
C extends FeatureRendererContext<T, M> & IPonyRenderContext<T, M>> extends AbstractPonyFeature<T, M> {
|
C extends FeatureRendererContext<T, M> & IPonyRenderContext<T, M>> extends AbstractPonyFeature<T, M> {
|
||||||
|
|
||||||
private static final Int2ObjectMap<Identifier> LEVEL_TO_ID = Util.create(new Int2ObjectOpenHashMap<>(), a -> {
|
private static final Int2ObjectMap<Identifier> LEVEL_TO_ID = Util.make(new Int2ObjectOpenHashMap<>(), a -> {
|
||||||
a.put(1, new Identifier("stone"));
|
a.put(1, new Identifier("stone"));
|
||||||
a.put(2, new Identifier("iron"));
|
a.put(2, new Identifier("iron"));
|
||||||
a.put(3, new Identifier("gold"));
|
a.put(3, new Identifier("gold"));
|
||||||
|
@ -77,7 +77,7 @@ class NpcClothingFeature<
|
||||||
|
|
||||||
HatType typeHatLayer = getHatType(typeHatCache, "type", Registry.VILLAGER_TYPE, type);
|
HatType typeHatLayer = getHatType(typeHatCache, "type", Registry.VILLAGER_TYPE, type);
|
||||||
HatType profHatLayer = getHatType(profHatCache, "profession", Registry.VILLAGER_PROFESSION, profession);
|
HatType profHatLayer = getHatType(profHatCache, "profession", Registry.VILLAGER_PROFESSION, profession);
|
||||||
M entityModel = getModel();
|
M entityModel = getContextModel();
|
||||||
|
|
||||||
entityModel.setHatVisible(
|
entityModel.setHatVisible(
|
||||||
profHatLayer == VillagerResourceMetadata.HatType.NONE
|
profHatLayer == VillagerResourceMetadata.HatType.NONE
|
||||||
|
|
Loading…
Reference in a new issue