your current location:首页 > news>Solarflux custom solar panel tutorial material problem [SFR] Lemitulating volume: remake version

Solarflux custom solar panel tutorial material problem [SFR] Lemitulating volume: remake version

2024-12-10 17:50:04|Myriagame |source:minecraft skins

This tutorial is set by the author to use the CC By-NC-SA protocol.

This tutorial only indicates the problem of creating a customized solar panel animation material.(Only test 1.12.2, other versions are not tested)

The tutorial forum for creating custom solar panels has already been and detailed, and it will not be repeated here.

At first, when making custom solar energy, it was found that the dynamic material could not be identified. After turning the source code, it was found that it was found that it was because the writing was wrong.

The name of the custom solar energy was recruited by the author into the module."Custom_solar_panel_" is added in front of the custom name, and the name of the material file is also re -written.The problem is here.

Attach the source code:

if (SI.ISCUSTOM)

{{

ResourceLocation Textures_blocks_base = New ResourceLocation (reg.getNameSpace (), "Textures/Blocks/" + Regetpath () + "_base.png")

ResourceLocation Textures_blocks_top = New ResourceLocation (reg.getNamespace (), "Textures/Blocks/" + Regetpath () + "_top.png")

ResourceLocation Textures_blocks_base_mcmeta = New ResourceLocation (reg.GetNamespace (), "Textures/Blocks/" + reg.getpath () + "_base.png.mcm eta ").

ResourceLocation Textures_blocks_top_mcmeta = New ResourceLocation (reg.getNameSpace (), "Textures/Blocks/" + reg.getpath () + "_top.png.mcmet a ");

{{

String n = reg.getpath (). Startswith ("Custom_solar_panel_")? Reg.getpath (). Substring (19): reg.getpath (). Substring (12);

ResourceMap.put (textures_blocks_base, office (() -> new file (new file (new file (solarssf.getConfigdir ()), "textures"), n + "_base.png")

ResourceMap.put (textures_blocks_base_mcmeta, offile (() -> new file (new file (solarssf.getConfigdir ()), "textures"), n + "_base.mcmeta"));

ResourceMap.put (textures_blocks_top, office (() -> new file (new file (new file (solarssf.getconfigdir ()), "textures"), n + "_top.png"));

ResourceMap.put (textures_blocks_top_mcmeta, office (() -> new file (new file (solarssf.getConfigdir (), "textures"), n + "_top.mcmeta");}

}

Comparison of red fonts and green fonts can be found. When the McMeta file is re -written, the name is not identified by the name of the McMeta file when identifying the player's custom material Mcmeta file.

The naming of conventional materials and Mcmeta files is: example_top.png corresponds to example_top.png.mcmeta; example_base.png corresponds to example_base.png.mcmeta.

Here is a copy of the material file name. When the Mcmeta file name is extracted, it becomes example_top.mcmeta; example_base.mcmeta.

So if you want to add Mcmeta files to the material, you only need to be the same as the material picture name, and you don't need to accelerate the picture type (.png).

I think the author's original intention is to help Xiaobai directly use the same name to name the material picture as the MCMETA file, which can play a role.This is misleading those who have a certain understanding of naming rules.

Rough opinion, I hope to help you.