4
4
import com .insane96mcp .shieldsplus .item .SPShieldItem ;
5
5
import net .minecraft .client .renderer .item .ItemProperties ;
6
6
import net .minecraft .client .renderer .item .ItemPropertyFunction ;
7
- import net .minecraft .world .inventory .InventoryMenu ;
8
7
import net .minecraftforge .api .distmarker .Dist ;
9
8
import net .minecraftforge .client .event .TextureStitchEvent ;
10
9
import net .minecraftforge .eventbus .api .SubscribeEvent ;
@@ -21,8 +20,12 @@ public static void setup(final FMLClientSetupEvent event) {
21
20
22
21
@ SubscribeEvent
23
22
public static void onStitch (TextureStitchEvent .Pre event ) {
24
- //TODO Check if I can loop the SPItems.SHIELDS to read all the textures from there
25
- if (event .getAtlas ().location ().equals (InventoryMenu .BLOCK_ATLAS )) {
23
+ //TODO Check if I can loop the SPItems.SHIELDS to read all the textures from there=
24
+ for (RegistryObject <SPShieldItem > shieldItem : SPItems .SHIELDS ) {
25
+ event .addSprite (shieldItem .get ().material .material .texture ());
26
+ event .addSprite (shieldItem .get ().material .noPatternMaterial .texture ());
27
+ }
28
+ /*if (event.getAtlas().location().equals(InventoryMenu.BLOCK_ATLAS)) {
26
29
event.addSprite(SPShieldMaterials.WOODEN.material.texture());
27
30
event.addSprite(SPShieldMaterials.WOODEN.noPatternMaterial.texture());
28
31
event.addSprite(SPShieldMaterials.STONE.material.texture());
@@ -33,7 +36,7 @@ public static void onStitch(TextureStitchEvent.Pre event) {
33
36
event.addSprite(SPShieldMaterials.DIAMOND.noPatternMaterial.texture());
34
37
event.addSprite(SPShieldMaterials.NETHERITE.material.texture());
35
38
event.addSprite(SPShieldMaterials.NETHERITE.noPatternMaterial.texture());
36
- }
39
+ }*/
37
40
}
38
41
39
42
private static void initShields () {
0 commit comments