Even more compile

This commit is contained in:
covers1624
2020-06-02 19:09:53 +09:30
parent 3f5c299d09
commit fb4995da62
11 changed files with 265 additions and 304 deletions
@@ -22,6 +22,8 @@ package appeng.client.render.cablebus;
import java.util.Arrays;
import java.util.function.Function;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation;
@@ -34,21 +36,28 @@ import appeng.core.AppEng;
public class SmartCableTextures
{
public static final ResourceLocation[] SMART_CHANNELS_TEXTURES = { new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_00" ),
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_01" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_02" ),
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_03" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_04" ),
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_10" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_11" ),
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_12" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_13" ),
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_14" )
};
public static final Material[] SMART_CHANNELS_TEXTURES = Arrays.stream( new ResourceLocation[] {
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_00" ),//
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_01" ),//
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_02" ),//
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_03" ),//
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_04" ),//
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_10" ),//
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_11" ),//
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_12" ),//
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_13" ),//
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_14" )//
} ).map( e -> new Material( AtlasTexture.LOCATION_BLOCKS_TEXTURE, e ) ).toArray( Material[]::new );
// Textures used to display channels on smart cables. There's two sets of 5 textures each, and
// one of each set are composed together to get even/odd colored channels
private final TextureAtlasSprite[] textures;
public SmartCableTextures( Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
public SmartCableTextures( Function<Material, TextureAtlasSprite> bakedTextureGetter )
{
this.textures = Arrays.stream( SMART_CHANNELS_TEXTURES ).map( bakedTextureGetter::apply ).toArray( TextureAtlasSprite[]::new );
this.textures = Arrays.stream( SMART_CHANNELS_TEXTURES )//
.map( bakedTextureGetter )//
.toArray( TextureAtlasSprite[]::new );
}
/**