Skip to content

Commit

Permalink
Merge pull request #229 from Traben-0/1.20.3-dev
Browse files Browse the repository at this point in the history
1.20.3 dev
  • Loading branch information
Traben-0 authored Dec 31, 2023
2 parents b47be64 + 0fb9095 commit b793b26
Show file tree
Hide file tree
Showing 47 changed files with 697 additions and 486 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ subprojects {
// mappings loom.officialMojangMappings()
// The following line declares the yarn mappings you may select this one as well.
//mappings "net.fabricmc:yarn:1.19+build.4:v2"

mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
// mappings loom.layered {
// //it.mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
// it.mappings "dev.architectury:yarn-mappings-patch-forge:1.20.4+build.1"
// }

implementation group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.10'
}
Expand Down
9 changes: 9 additions & 0 deletions common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
[**ETF Changelog:**]

[5.1]

- mob spawner entities can now variate their textures again.
- moved some temp rework code into more compatible mixins for mod compatibility
- more stable implementation of the 5.0 rework changes for emissives
- random properties now also allow ranges with the format <high>-<low> instead of only <low>-<high> *(OptiFine parity)*
- fixed a crash in the skin tool
- fixed a shoulder parrot crash


[5.0]

Expand Down
4 changes: 4 additions & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ dependencies {
modImplementation("maven.modrinth:sodium:${project.sodium_version}") {
exclude(group: "net.fabricmc.fabric-api")
}

modImplementation("maven.modrinth:iris:${project.iris_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
}

publishing {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,18 @@
import dev.tr7zw.skinlayers.accessor.PlayerEntityModelAccessor;
import dev.tr7zw.skinlayers.accessor.PlayerSettings;
import dev.tr7zw.skinlayers.api.Mesh;
import dev.tr7zw.skinlayers.renderlayers.BodyLayerFeatureRenderer;
import dev.tr7zw.skinlayers.renderlayers.HeadLayerFeatureRenderer;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.client.render.OverlayTexture;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.entity.PlayerEntityRenderer;
import net.minecraft.client.render.entity.PlayerModelPart;
import net.minecraft.client.render.entity.feature.FeatureRenderer;
import net.minecraft.client.render.entity.feature.FeatureRendererContext;
import net.minecraft.client.render.entity.model.PlayerEntityModel;
import net.minecraft.client.util.math.MatrixStack;
import traben.entity_texture_features.utils.ETFUtils2;

// compatibility class for the wonderful 3D skin layers mod by @tr9zw to utilise ETF skin features
public abstract class ETF3DSkinLayersUtil {
// method is called from MixinLivingEntityRenderer as a super of the playerEntityRenderer
//
// method is handled in this class separately to prevent any loading attempt of 3D skin layer mod classes without the mod being present
//
// this appears to be the easiest way to add to the 3D skin layer mod's featureRenderers while also utilising
// the mods code to do all the setup required for correct rendering
//
// this method is future-proof only with the expectation that the 2 ETF3D featureRenderer's inheritance remains valid

// checks whether the provided featureRenderer is one of the 3D skin layer feature renderers
public static boolean canReplace(FeatureRenderer<?, ?> feature) {
return feature instanceof BodyLayerFeatureRenderer || feature instanceof HeadLayerFeatureRenderer;
}

// returns a replacement ETF child featureRenderer of the 3D skin layer featureRenderer
public static FeatureRenderer<?, ?> getReplacement(FeatureRenderer<?, ?> feature, FeatureRendererContext<?, ?> context) {
try {
if (feature instanceof HeadLayerFeatureRenderer) {
//noinspection unchecked
return new ETF3DHeadLayerFeatureRenderer((FeatureRendererContext<AbstractClientPlayerEntity, PlayerEntityModel<AbstractClientPlayerEntity>>) context);
} else if (feature instanceof BodyLayerFeatureRenderer) {
//noinspection unchecked
return new ETF3DBodyLayerFeatureRenderer((FeatureRendererContext<AbstractClientPlayerEntity, PlayerEntityModel<AbstractClientPlayerEntity>>) context);
}
} catch (Exception e) {
ETFUtils2.logWarn("Exception with ETF's 3D skin layers mod compatibility: " + e);
}
ETFUtils2.logError("Failed in ETF's 3D skin layers mod compatibility.");
return feature;
}

// todo ensure rendering method is kept up to date with how 3D skin layers mod does it
// copy of 3D skin layers hand rendering code as ETF needs to be able to render it at will with a custom VertexConsumer
Expand Down Expand Up @@ -105,12 +71,4 @@ public static void renderHand(PlayerEntityRenderer instance, MatrixStack poseSta
}


// initial testing method
// public static void tryRenderWithETFFeatures(FeatureRendererContext<AbstractClientPlayerEntity, PlayerEntityModel<AbstractClientPlayerEntity>> context, FeatureRenderer featureRenderer, AbstractClientPlayerEntity entity, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, float k, float m, float l, float n, float o) {
// if (featureRenderer instanceof HeadLayerFeatureRenderer) {
// new ETF3DHeadLayerFeatureRenderer<LivingEntity, EntityModel<T>>(context).render(matrixStack, vertexConsumerProvider, i, entity, o, n, g, l, k, m);
// } else if (featureRenderer instanceof BodyLayerFeatureRenderer) {
// new ETF3DBodyLayerFeatureRenderer(context).render(matrixStack, vertexConsumerProvider, i, entity, o, n, g, l, k, m);
// }
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected void init() {
ETFPlayerTexture etfPlayerTexture = new ETFPlayerTexture();
ETFManager.getInstance().PLAYER_TEXTURE_MAP.put(MinecraftClient.getInstance().player.getUuid(), etfPlayerTexture);
thisETFPlayerTexture = etfPlayerTexture;
} else {
} else if (thisETFPlayerTexture.etfTextureOfFinalBaseSkin != null){
thisETFPlayerTexture.etfTextureOfFinalBaseSkin.setGUIBlink();
}
}
Expand Down
Loading

0 comments on commit b793b26

Please sign in to comment.