Skip to content

Commit 1c89dd0

Browse files
authored
Merge pull request #195 from Traben-0/1.20-dev
1.20 dev
2 parents c02cea0 + 5594e23 commit 1c89dd0

60 files changed

Lines changed: 1211 additions & 243 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/README-assets/EMISSIVE_GUIDE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,33 @@
2424
- Enhanced Block Entities (A mod which changes the block entity render to block render for performance optimizations)<br />breaks ETF's support for block entities
2525
- Player skins support emissive textures, see the [`player skin features guide`](SKINS.md)
2626

27+
28+
---
29+
## Armor trims
30+
31+
Emmisive armor trim textures are defined just like in OptiFine, by adding one of the following material suffixes
32+
33+
to the trim base name: amethyst, copper, diamond, diamond_darker, emerald, gold, gold_darker,
34+
iron, iron_darker, lapis, netherite, netherite_darker, quartz, redstone.
35+
36+
For example:
37+
38+
`textures/trims/models/armor/coast_amethyst_e.png`,
39+
`textures/trims/models/armor/host_iron_darker_e.png`,
40+
`textures/trims/models/armor/dune_leggings_netherite_e.png`
41+
42+
You can also add a copy of the non emissive texture present in the same path to override that trim.
43+
44+
For example:
45+
46+
`textures/trims/models/armor/coast_amethyst.png`,
47+
`textures/trims/models/armor/host_iron_darker.png`,
48+
`textures/trims/models/armor/dune_leggings_netherite.png`
2749
---
2850

2951
Emissive textures can render in two different ways, set by the config. The two images below show the two rendering modes:
3052

53+
3154
### Dull Emmisives [default]
3255

3356
<table>

.github/README-assets/emissive.properties

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,17 @@
1818
# creeper.png - base texture
1919
# creeper_e.png - emissive overlay
2020
# The overlays can also be used for block entities.
21-
suffix.emissive=_e
21+
suffix.emissive=_e
22+
#
23+
#
24+
###############################################################################
25+
# Armor trims
26+
# Emmisive armor trim textures are defined just like in OptiFine, by adding one of the following material suffixes
27+
# to the trim base name: amethyst, copper, diamond, diamond_darker, emerald, gold, gold_darker,
28+
# iron, iron_darker, lapis, netherite, netherite_darker, quartz, redstone.
29+
# For example:
30+
# textures/trims/models/armor/coast_amethyst_e.png, textures/trims/models/armor/host_iron_darker_e.png, textures/trims/models/armor/dune_leggings_netherite_e.png
31+
#
32+
# You can also add a copy of the non emissive texture present in the same path
33+
# For example:
34+
# textures/trims/models/armor/coast_amethyst.png, textures/trims/models/armor/host_iron_darker.png, textures/trims/models/armor/dune_leggings_netherite.png

.github/README-assets/icon.png

4.95 KB
Loading

.github/README-assets/random_entities.properties

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,15 @@
4545
# or "assets/minecraft/etf/random/entity/chicken.properties"
4646
# or "assets/minecraft/textures/entity/chicken.properties"
4747
#
48-
# painting support is planned but not yet implemented
48+
#
49+
###############################################################################
50+
# For textures that already end with a number such as "warden_pulsating_spots_2.png"
51+
# you must use the separator "." to denote variants:
52+
# Alts:
53+
# warden_pulsating_spots_2.2.png
54+
# warden_pulsating_spots_2.3.png
55+
# warden_pulsating_spots_2.4.png
56+
#
4957
###############################################################################
5058
# This file consists of a sequence of rules, numbered from 1.
5159
#

common/CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
[**ETF Changelog:**]
22

3+
4+
[4.4.99 - dev build]
5+
- added more code to support EMF
6+
- added a new logo
7+
- added support for random & emissive painting textures
8+
- added support for emissive armor trims the same format as OptiFine *(note this seems to break if iris and 3d skin layers are both installed, no idea why, it also fixes itself if a mob in the background is wearing the same trim, I'm tired of pulling my hair out about this so this is just how it will be for now)*
9+
- added support for armor trim overrides *(e.g. the texture "textures\trims\models\armor\coast_redstone.png" will override the autogenerated trim if present)*
10+
- added support for end crystal random and emissive textures
11+
- added an option to enable extra warden textures like the heart to apply to the entire model
12+
- textures ending with numbers now use the separator "." like OptiFine for variants *(e.g "mob4.png" now variates with "mob4.2.png")*
13+
- Animatica textures are now detected and prevent certain ETF actions that could break these textures *(MoreMcmeta was already supported)*
14+
- added new ETF skin feature to allow/prevent transparency for your skin specifically, plus general improvements to skin transparency handling.
15+
- added new ETF skin feature variant of the villager nose setting that can use a custom texture set in the skin, instead of the default villager.
16+
17+
- updated the `minecraftcapes.net` api url when used in skin features
18+
- improved the handling of "_eyes" textures
19+
- tweaked the skin tool failure dialogue to be more informative and helpful
20+
- tweaked warning messages and added some
21+
- tweaked the resource-pack screen etf button
22+
23+
- fixed `biome` property breaking when using "CamelCase" instead of "snake_case"
24+
- fixed `size` property being off by 1 when compared to OptiFine
25+
- fixed `name` property not working for players usernames
26+
- fixed custom ETF cape textures not working with `physics mod` capes
27+
- fixed `3D skin layers mod` emissive body pixels with skin features
28+
- tweaked some `en_us` translations
29+
- fixed 2 forge crashes
30+
- fixed `pattern` & `ipattern` to correctly match the OptiFine behaviour
31+
32+
33+
334
[4.4.4]
435
- forge crash fix
536

common/src/main/java/traben/entity_texture_features/ETFClientCommon.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.google.gson.Gson;
44
import com.google.gson.GsonBuilder;
5+
import net.minecraft.client.render.LightmapTextureManager;
56
import org.slf4j.Logger;
67
import traben.entity_texture_features.config.ETFConfig;
78
import traben.entity_texture_features.utils.ETFUtils2;
@@ -18,14 +19,22 @@ public class ETFClientCommon {
1819
public static final String MOD_ID = "entity_texture_features";
1920
//logging object
2021
public final static Logger LOGGER = ETFVersionDifferenceHandler.getLogger();
22+
public static boolean IRIS_DETECTED = false;
2123
//config object
2224
public static ETFConfig ETFConfigData = new ETFConfig();
2325

2426
//sets whether to display config load warning in gui
2527
public static boolean configHadLoadError = false;
2628

29+
public static final int EYES_FEATURE_LIGHT_VALUE = LightmapTextureManager.MAX_LIGHT_COORDINATE+1;
30+
public static final int EMISSIVE_FEATURE_LIGHT_VALUE = LightmapTextureManager.MAX_LIGHT_COORDINATE+2;
31+
public static boolean SKIN_LAYERS_DETECTED = false;
2732

2833
public static void start() {
34+
//check only once
35+
SKIN_LAYERS_DETECTED = (ETFVersionDifferenceHandler.isThisModLoaded("skinlayers") || ETFVersionDifferenceHandler.isThisModLoaded("skinlayers3d"));
36+
IRIS_DETECTED = ETFVersionDifferenceHandler.isThisModLoaded("iris") || ETFVersionDifferenceHandler.isThisModLoaded("oculus");
37+
2938
LOGGER.info("Loading Entity Texture Features, "+ randomQuip());
3039
etf$loadConfig();
3140
ETFUtils2.checkModCompatibility();

common/src/main/java/traben/entity_texture_features/config/ETFConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public class ETFConfig {
7171

7272
public boolean use3DSkinLayerPatch = true;
7373

74+
public boolean enableFullBodyWardenTextures = true;
75+
7476
//string name stuff more in-depth than other enum for backwards compatibility
7577

7678
public static ETFConfig copyFrom(ETFConfig source) {

common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreen.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import net.minecraft.client.gui.tooltip.Tooltip;
99
import net.minecraft.client.gui.widget.ButtonWidget;
1010
import net.minecraft.client.render.*;
11+
import net.minecraft.screen.ScreenTexts;
1112
import net.minecraft.text.OrderedText;
1213
import net.minecraft.text.Text;
1314
import net.minecraft.util.Identifier;
@@ -21,7 +22,7 @@
2122

2223
//inspired by puzzles custom gui code
2324
public abstract class ETFConfigScreen extends Screen {
24-
static final RotatingCubeMapRenderer backgroundCube = new RotatingCubeMapRenderer(new CubeMapRenderer(new Identifier(MOD_ID + ":textures/gui/background/panorama")));
25+
static final RotatingCubeMapRenderer backgroundCube = new RotatingCubeMapRenderer(new CubeMapRenderer(new Identifier(MOD_ID , "textures/gui/background/panorama")));
2526
public final Screen parent;
2627

2728

@@ -30,6 +31,10 @@ public ETFConfigScreen(Text text, Screen parent) {
3031
this.parent = parent;
3132
}
3233

34+
public static String booleanAsOnOff(boolean bool){
35+
return ScreenTexts.onOrOff(bool).getString();
36+
}
37+
3338
public static void renderGUITexture(Identifier texture, double x1, double y1, double x2, double y2) {
3439

3540
Tessellator tessellator = Tessellator.getInstance();
@@ -80,13 +85,13 @@ public void close() {
8085
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
8186

8287

83-
// ETFUtils2.renderBackgroundTexture(0,new Identifier("textures/block/deepslate_tiles.png"),this.height,this.width);
8488
backgroundCube.render((float) 0.5, 1);
8589

8690
renderBackgroundTexture(0, new Identifier("textures/gui/options_background.png"), (int) (height * 0.15), width);
8791
renderBackgroundTexture(0, new Identifier("textures/gui/options_background.png"), height, width, (int) (height * 0.85));
8892
context.fillGradient( 0, (int) (height * 0.15), width, (int) (height * 0.85), -1072689136, -804253680);
8993

94+
//context.fill(RenderLayer.getEndGateway(),0, (int) (height * 0.15), width, (int) (height * 0.85), ColorHelper.Argb.getArgb(255,255,255,255));
9095
context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 15, 0xFFFFFF);
9196

9297
super.render(context, mouseX, mouseY, delta);

common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenGeneralSettings.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ protected void init() {
8585
},
8686
ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".hide_button.tooltip")
8787
));
88-
// this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.6), (int) (this.width * 0.6), 20,
89-
// Text.of(ETFVersionDifferenceHandler.getTextFromTranslation(
90-
// "config." + ETFClientCommon.MOD_ID + ".piglin_ear.button"
91-
// ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.hideConfigButton ? ScreenTexts.ON : ScreenTexts.OFF).getString()),
92-
// (button) -> {
93-
// ETFConfigScreenMain.temporaryETFConfig.zombiePiglinRightEarEnabled = !ETFConfigScreenMain.temporaryETFConfig.zombiePiglinRightEarEnabled;
94-
// button.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation(
95-
// "config." + ETFClientCommon.MOD_ID + ".piglin_ear.button"
96-
// ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.zombiePiglinRightEarEnabled ? ScreenTexts.ON : ScreenTexts.OFF).getString()));
97-
// },
98-
// ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".piglin_ear.tooltip")
99-
// ));
88+
this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.6), (int) (this.width * 0.6), 20,
89+
Text.of(ETFVersionDifferenceHandler.getTextFromTranslation(
90+
"config." + ETFClientCommon.MOD_ID + ".warden.title"
91+
).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.enableFullBodyWardenTextures ? ScreenTexts.ON : ScreenTexts.OFF).getString()),
92+
(button) -> {
93+
ETFConfigScreenMain.temporaryETFConfig.enableFullBodyWardenTextures = !ETFConfigScreenMain.temporaryETFConfig.enableFullBodyWardenTextures;
94+
button.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation(
95+
"config." + ETFClientCommon.MOD_ID + ".warden.title"
96+
).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.enableFullBodyWardenTextures ? ScreenTexts.ON : ScreenTexts.OFF).getString()));
97+
},
98+
ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".warden.tooltip")
99+
));
100100
}
101101

102102

common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public ETFConfigScreenMain(Screen parent) {
4444

4545
for (ETFConfigScreenWarnings.ConfigWarning warning :
4646
ETFConfigScreenWarnings.ConfigWarning.values()) {
47-
if (ETFVersionDifferenceHandler.isThisModLoaded(warning.getMod_id())) {
47+
if (warning.isConditionMet()) {
4848
shownWarning = true;
4949
warningCount++;
5050
warningsFound.add(warning);

0 commit comments

Comments
 (0)