Merge branch '1.21.3' into 1.21.4

This commit is contained in:
Sollace 2024-12-15 19:36:03 +01:00
commit 01a0c82936
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
5 changed files with 9 additions and 8 deletions

View file

@ -17,7 +17,7 @@ public record Flags<T extends Enum<T> & TValue<T>> (
public static <T extends Enum<T> & TValue<T>> Codec<Flags<T>> codec(T def, Codec<T> elementCodec) {
Codec<Set<T>> setCodec = Codec.list(elementCodec).xmap(elements -> elements.stream().distinct().collect(Collectors.toUnmodifiableSet()), set -> List.copyOf(set));
return Codec.xor(setCodec.xmap(elements -> new Flags<>(def, elements, 0), flags -> flags.values()), RecordCodecBuilder.create(i -> i.group(
return Codec.xor(setCodec.xmap(elements -> new Flags<>(def, elements, 0), flags -> flags.values()), RecordCodecBuilder.<Flags<T>>create(i -> i.group(
elementCodec.fieldOf("def").forGetter(Flags::def),
setCodec.fieldOf("values").forGetter(Flags::values),
Codec.INT.fieldOf("colorCode").forGetter(Flags::colorCode)

View file

@ -22,8 +22,7 @@ abstract class MixinPlayerMoveC2SPacket implements Packet<ServerPlayPacketListen
@Shadow @Final
protected boolean changeLook;
@Inject(method = "<init>(DDDFFZZZ)V",
at = @At("RETURN"))
@Inject(method = "<init>(DDDFFZZZZ)V", at = @At("RETURN"))
private void onInit(CallbackInfo info) {
if (changeLook) {
pitch = HorseCam.transformCameraAngle(pitch);

View file

@ -16,6 +16,7 @@ import net.minecraft.util.math.*;
import org.jetbrains.annotations.Nullable;
import com.minelittlepony.api.model.ModelAttributes.Mode;
import com.minelittlepony.api.model.Models;
import com.minelittlepony.api.pony.Pony;
import com.minelittlepony.api.pony.PonyData;
import com.minelittlepony.api.pony.meta.SizePreset;
@ -125,7 +126,7 @@ public class PonyStandRenderer extends LivingEntityRenderer<ArmorStandEntity, Po
FeatureRendererContext<PonyRenderState, EarthPonyModel<PonyRenderState>>,
PonyRenderContext<ArmorStandEntity, PonyRenderState, EarthPonyModel<PonyRenderState>> {
private final EquineRenderManager<ArmorStandEntity, PonyRenderState, EarthPonyModel<PonyRenderState>> manager
= new EquineRenderManager<>(this, (state, stack, progress, yaw) -> {}, ModelType.EARTH_PONY.create(false));
= new EquineRenderManager<>(this, (state, stack, progress, yaw) -> {}, ModelType.EARTH_PONY.<EarthPonyModel<PonyRenderState>>create(false));
@Override
public Pony getEntityPony(ArmorStandEntity entity) {

View file

@ -61,7 +61,7 @@ public class SkeleponyRenderer<T extends AbstractSkeletonEntity, S extends Skele
public static SkeleponyRenderer<StrayEntity, State> stray(EntityRendererFactory.Context context) {
return PonyRenderer.appendFeature(new SkeleponyRenderer<StrayEntity, State>(context, STRAY, 1), ctx -> {
return new ClothingFeature<>(ctx, ModelType.SKELETON_CLOTHES, STRAY_SKELETON_OVERLAY);
return new ClothingFeature<State, AlicornModel<State>>(ctx, ModelType.SKELETON_CLOTHES, STRAY_SKELETON_OVERLAY);
});
}
@ -72,7 +72,7 @@ public class SkeleponyRenderer<T extends AbstractSkeletonEntity, S extends Skele
return new BoggedState();
}
}, ctx -> {
return new ClothingFeature<>(ctx, ModelType.SKELETON_CLOTHES, BOGGED_SKELETON_OVERLAY);
return new ClothingFeature<BoggedState, AlicornModel<BoggedState>>(ctx, ModelType.SKELETON_CLOTHES, BOGGED_SKELETON_OVERLAY);
}), BoggedMushroomsFeature::new);
}

View file

@ -5,6 +5,7 @@ import com.minelittlepony.api.model.PonyModel;
import com.minelittlepony.api.pony.Pony;
import com.minelittlepony.client.MineLittlePony;
import com.minelittlepony.client.model.ModelType;
import com.minelittlepony.client.model.entity.IllagerPonyModel;
import com.minelittlepony.client.model.entity.race.AlicornModel;
import com.minelittlepony.client.model.entity.race.ChangelingModel;
import com.minelittlepony.client.render.entity.npc.textures.TextureSupplier;
@ -75,11 +76,11 @@ public class IllagerPonyRenderer<
}
public static IllagerPonyRenderer<VindicatorEntity, ?, ?> vindicator(EntityRendererFactory.Context context) {
return new IllagerPonyRenderer<>(context, (ModelKey<?>)ModelType.ILLAGER, VINDICATOR);
return new IllagerPonyRenderer<VindicatorEntity, State, IllagerPonyModel<State>>(context, ModelType.ILLAGER, VINDICATOR);
}
public static IllagerPonyRenderer<EvokerEntity, ?, ?> evoker(EntityRendererFactory.Context context) {
return new IllagerPonyRenderer<>(context, (ModelKey<?>)ModelType.ILLAGER, EVOKER);
return new IllagerPonyRenderer<EvokerEntity, State, IllagerPonyModel<State>>(context,ModelType.ILLAGER, EVOKER);
}
public static class State extends PonyRenderState {