@SubscribeEvent public void textureStuff(TextureStitchEvent.Pre event) { if (event.getMap() == Minecraft.getMinecraft().getTextureMapBlocks()) { for (LinkedList<IDustSymbol> category : ModDust.dustRegistry) { for(IDustSymbol dust : category) { String textureStr = dust.getTexture(); int index = textureStr.lastIndexOf(".png"); String texture = "runicarcana:"+textureStr.substring(9,index); event.getMap().registerSprite(new ResourceLocation(texture)); } } } event.getMap().registerSprite(new ResourceLocation(Reference.PARTICLE_RESOURCE_LOCATION + "WaterStrikeFX")); event.getMap().registerSprite(new ResourceLocation(Reference.PARTICLE_RESOURCE_LOCATION + "EarthStrikeFX")); event.getMap().registerSprite(new ResourceLocation(Reference.PARTICLE_RESOURCE_LOCATION + "AirStrikeFX")); }
@SideOnly(Side.CLIENT) @SubscribeEvent public void handleStich(final TextureStitchEvent.Pre event) { if (event.map.getTextureType() != 0) { return; } TConIntegration.bedrock.setIcons(event.map.registerIcon("TConIntegration.bedrock")); TextureAtlasSprite sprite = new TextureBedrockLava("extrautils:bedrockFluid", "lava_still"); event.map.setTextureEntry("extrautils:bedrockFluid", sprite); if (TConIntegration.bedrock != null) { TConIntegration.bedrock.setIcons((IIcon)sprite); } sprite = new TextureBedrockLava("extrautils:bedrockFluid_flowing", "lava_flow"); if (event.map.setTextureEntry("extrautils:bedrockFluid_flowing", sprite) && TConIntegration.bedrock != null) { TConIntegration.bedrock.setFlowingIcon((IIcon)sprite); } sprite = new TextureUnstableLava("extrautils:unstableFluid", "water_still"); event.map.setTextureEntry("extrautils:unstableFluid", sprite); if (TConIntegration.unstable != null) { TConIntegration.unstable.setIcons((IIcon)sprite); } sprite = new TextureUnstableLava("extrautils:unstableFluid_flowing", "water_flow"); if (event.map.setTextureEntry("extrautils:unstableFluid_flowing", sprite) && TConIntegration.unstable != null) { TConIntegration.unstable.setFlowingIcon((IIcon)sprite); } }
@SubscribeEvent public void onStitch(TextureStitchEvent.Pre event) { if (event.map.getTextureType() == 0) { AsteroidsModule.fluidMethaneGas.setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/MethaneGas")); AsteroidsModule.fluidAtmosphericGases.setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/AtmosphericGases")); AsteroidsModule.fluidLiquidMethane.setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/LiquidMethane")); AsteroidsModule.fluidLiquidOxygen.setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/LiquidOxygen")); AsteroidsModule.fluidOxygenGas.setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/OxygenGas")); AsteroidsModule.fluidLiquidNitrogen.setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/LiquidNitrogen")); AsteroidsModule.fluidLiquidArgon.setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/LiquidArgon")); AsteroidsModule.fluidNitrogenGas.setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/NitrogenGas")); FluidRegistry.getFluid("hydrogen").setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/HydrogenGas")); FluidRegistry.getFluid("helium").setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/HeliumGas")); FluidRegistry.getFluid("argon").setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/ArgonGas")); FluidRegistry.getFluid("carbondioxide").setIcons(event.map.registerIcon(AsteroidsModule.ASSET_PREFIX + ":fluids/CarbonDioxideGas")); } }
@SubscribeEvent public void postStitch(TextureStitchEvent.Post event) { IIcon[] icons; if(replaceLava) { icons = ReflectionManager.get(field_tex, IIcon[].class, Blocks.flowing_lava); icons[0] = newTextures[2]; icons[1] = newTextures[3]; icons = ReflectionManager.get(field_tex, IIcon[].class, Blocks.lava); icons[0] = newTextures[2]; icons[1] = newTextures[3]; } if(replaceWater) { icons = ReflectionManager.get(field_tex, IIcon[].class, Blocks.flowing_water); icons[0] = newTextures[0]; icons[1] = newTextures[1]; icons = ReflectionManager.get(field_tex, IIcon[].class, Blocks.water); icons[0] = newTextures[0]; icons[1] = newTextures[1]; } }
@SubscribeEvent public void onRegisterTexture(TextureStitchEvent.Pre event) { TMLogger.info("Adding fluid textures"); loadedLocations.clear(); lcdFont = new LCDFontRenderer(mc.gameSettings, Configs.lcdFont, mc.renderEngine, false); TextureMap map = event.getMap(); for (Entry<String, Fluid> entry : CoreInit.fluidList.entrySet()) { if (!loadedLocations.contains(entry.getValue().getFlowing())) { map.registerSprite(entry.getValue().getFlowing()); loadedLocations.add(entry.getValue().getFlowing()); } if (!loadedLocations.contains(entry.getValue().getStill())) { map.registerSprite(entry.getValue().getStill()); loadedLocations.add(entry.getValue().getStill()); } } textureIns++; }
@SubscribeEvent public void bakeModels(TextureStitchEvent.Post event) { final TextureMap map = event.map; Function<ResourceLocation,TextureAtlasSprite> lookup = new Function<ResourceLocation, TextureAtlasSprite>() { @Nullable @Override public TextureAtlasSprite apply(@Nullable ResourceLocation input) { if (input == null) return map.getAtlasSprite(null); return map.getAtlasSprite(input.toString()); } }; for (FzModel fzm : instances) { IModel rawModel = raws.get(fzm); if (rawModel == null) { fzm.model = null; continue; } fzm.model = rawModel.bake(fzm.trsrt, fzm.getFormat(), lookup); } raws.clear(); }
/** * Use reflection to set all TextureAtlasSprites in a class. * All fields that are TextureAtlasSprites will be assigned, and any field whose type * is annotated with {@link LoadSprite} will be instantiated, assigned, and recursively loaded. * If a field name contains a '$', it will be replaced with a '/' for the icon's path name, * and also when recursion occurs. * @param domain The domain of the textures. * @param toVisit The object to visit. If it is a class, then its static fields will be loaded. * @param prefix The path prefix. You likely want "". * @param event Call this method during the TextureStitchEvent.Pre event. * @see LoadSprite * @throws RuntimeException on any error */ public static void loadSprites(String domain, Object toVisit, String prefix, TextureStitchEvent.Pre event) { Class base; Object instance; if (toVisit instanceof Class) { base = (Class) toVisit; instance = null; } else { base = toVisit.getClass(); instance = toVisit; } try { load0(domain, base, instance, prefix, event); } catch (Throwable e) { throw new RuntimeException(e); } }
private static void load0(String domain, Class base, Object instance, String prefix, TextureStitchEvent.Pre event) throws IllegalAccessException, InstantiationException { for (Field field : base.getFields()) { String name = field.getName().replace("$", "/"); Class<?> type = field.getType(); boolean staticField = (field.getModifiers() & Modifier.STATIC) != 0; boolean staticAccess = instance == null; if (staticField != staticAccess) continue; Object set; if (type == TextureAtlasSprite.class) { ResourceLocation location = new ResourceLocation(domain, prefix + name); set = event.map.registerSprite(location); } else if (canVisit(type)) { set = type.newInstance(); load0(domain, type, set, prefix + name + "/", event); } else { continue; } field.set(instance, set); } }
@SubscribeEvent public void onPreTextureStiching(TextureStitchEvent.Pre event){ if (event.map == FMLClientHandler.instance().getClient().getTextureMapBlocks()){ event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/machine_Top")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/machine_Bottom")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/oreTumbler_Front")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/oreTumbler_Front_Active")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/flowstoneBottler_Front")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/flowstoneBottler_Front_Activate")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/furnace_Front")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/furnace_Front_Active")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/lumberMill_Front")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/lumberMill_Front_Active")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/metalMixer_Front")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/metalMixer_Front_Active")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/cooler_Front")); event.map.registerSprite(new ResourceLocation("flowstoneenergy:blocks/machines/cooler_Front_Active")); } }
@SubscribeEvent public void onStitch(TextureStitchEvent.Pre event) { Map<String, TextureAtlasSprite> iconlist = null; if (event.map.getTextureType() == 0) { iconlist = TextureHelper.addedBlockIcons; } else if (event.map.getTextureType() == 1) { iconlist = TextureHelper.addedItemIcons; } if (iconlist != null) { for (Entry<String, TextureAtlasSprite> entry : iconlist.entrySet()) { //Physis.logger.info("Adding "+entry.getKey()+" to the map"); event.map.setTextureEntry(entry.getKey(), entry.getValue()); } } }
@SubscribeEvent public void onTextureStitchEvent(TextureStitchEvent.Pre evt) { freeTextures.clear(); usedTextures.clear(); peakRejectedAllocations = 0; textureLimitReached = false; CanvasSideState.onTextureReload(); if (DEBUG) Log.info("Allocating %s textures", Config.canvasPoolSize); final TextureMap map = evt.getMap(); final EmptyTextureData emptyTexture = new EmptyTextureData(); for (int i = 0; i < Config.canvasPoolSize; i++) { final CanvasTexture entry = new CanvasTexture(OpenBlocks.location("canvas-" + i), emptyTexture); map.setTextureEntry(entry); freeTextures.push(entry); } }
@ForgeSubscribe public void onItemIconRegister(final TextureStitchEvent.Pre evt) { System.out.println("textureType = " + evt.map.textureType); if (evt.map.textureType == 1) { ExtraIcons.ovenSlotOpen = evt.map.registerIcon("agriculture:gui/OvenSlotOpen"); ExtraIcons.ovenSlotClosed = evt.map.registerIcon("agriculture:gui/OvenSlotClosed"); } else { ExtraIcons.liquidMilk = evt.map.registerIcon("agriculture:milk"); ExtraIcons.liquidBeer = evt.map.registerIcon("agriculture:beer"); ExtraIcons.liquidHotcocoa = evt.map.registerIcon("agriculture:hotcocoa"); ExtraIcons.vineger = evt.map.registerIcon("agriculture:vinegar"); ExtraIcons.liquidVodka = evt.map.registerIcon("agriculture:vodka"); ExtraIcons.liquidCider = evt.map.registerIcon("agriculture:cider"); } }
@SideOnly(Side.CLIENT) @SubscribeEvent public void stitch(TextureStitchEvent.Pre event){ event.getMap().registerSprite(new ResourceLocation(Constants.MODID,"entity/faerie/wood/body")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID,"entity/faerie/wood/wing_bottom")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID,"entity/faerie/wood/wing_top")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID,"entity/faerie/cave/body")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID,"entity/faerie/cave/wing_bottom")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID,"entity/faerie/cave/wing_top")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID,"entity/faerie/mountain/body")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID,"entity/faerie/mountain/wing_bottom")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID,"entity/faerie/mountain/wing_top")); }
@SubscribeEvent public static void stitchEventPre(TextureStitchEvent.Pre event) { event.getMap().registerSprite(ResourceLocations.STEAM); event.getMap().registerSprite(ResourceLocations.BEE); event.getMap().registerSprite(ResourceLocations.FLAME); event.getMap().registerSprite(ResourceLocations.GRAY_WATER); }
@SubscribeEvent public static void registerParticles(TextureStitchEvent.Pre event) { stitchParticle("particle/glow_par", event.getMap()); stitchParticle("items/sword_glow_top", event.getMap()); stitchParticle("items/sword_glow_bottom", event.getMap()); }
@SubscribeEvent @SideOnly(Side.CLIENT) public void loadTextures(TextureStitchEvent.Pre event) { if (EtFuturum.enablePrismarine) if (event.map.getTextureType() == 0) { TextureAtlasSprite icon = new PrismarineIcon("prismarine_rough"); if (event.map.setTextureEntry("prismarine_rough", icon)) ((PrismarineBlocks) ModBlocks.prismarine).setIcon(0, icon); else ((PrismarineBlocks) ModBlocks.prismarine).setIcon(0, event.map.registerIcon("prismarine_rough")); } }
@SubscribeEvent public void onTextureStitch(TextureStitchEvent.Pre event) { event.getMap().registerSprite(new ResourceLocation("thermionics", "fluids/clear_hootch")); event.getMap().registerSprite(new ResourceLocation("thermionics", "fluids/medium_hootch")); event.getMap().registerSprite(new ResourceLocation("thermionics", "fluids/dark_hootch")); event.getMap().registerSprite(new ResourceLocation("thermionics", "fluids/clear_spirit")); event.getMap().registerSprite(new ResourceLocation("thermionics", "fluids/medium_spirit")); event.getMap().registerSprite(new ResourceLocation("thermionics", "fluids/dark_spirit")); }
@SubscribeEvent public void onTextureStich(TextureStitchEvent.Pre event) { for (ResourceLocation loc : textureList) { event.getMap().registerSprite(loc); } }
@SubscribeEvent public void loadTextures(TextureStitchEvent.Pre event) { try { Map<String, TextureAtlasSprite> mapRegisteredSprites = ReflectionHelper.getPrivateValue(TextureMap.class, event.getMap(), FIELD); for (int i = 1; i < 6; i++) mapRegisteredSprites.put("uniquecrops:blocks/invisibilia" + i, new UCInvisibiliaStitch("uniquecrops:blocks/invisibilia" + i)); mapRegisteredSprites.put("uniquecrops:blocks/dyeplant5", new UCDyePlantStitch("uniquecrops:blocks/dyeplant5")); } catch (Exception e) { e.printStackTrace(); } }
@SubscribeEvent public void registerIcons(TextureStitchEvent.Pre event) { // if(event.getMap().getGlTextureId()==1){ // System.out.println("Registered icon: // "+event.getMap().getGlTextureId()); pelletIcon = event.getMap().registerSprite(new ResourceLocation(TF2weapons.MOD_ID, "items/pellet3")); event.getMap().registerSprite(new ResourceLocation(TF2weapons.MOD_ID, "items/ammo_belt_empty")); event.getMap().registerSprite(new ResourceLocation(TF2weapons.MOD_ID, "items/refill_empty")); event.getMap().registerSprite(new ResourceLocation(TF2weapons.MOD_ID, "items/weapon_empty_0")); event.getMap().registerSprite(new ResourceLocation(TF2weapons.MOD_ID, "items/weapon_empty_1")); event.getMap().registerSprite(new ResourceLocation(TF2weapons.MOD_ID, "items/weapon_empty_2")); // } }
@SubscribeEvent public void registerParticle(final TextureStitchEvent.Pre event) { if (event.map.getTextureType() != 0) { return; } EventHandlerClient.particle = event.map.registerIcon("extrautils:particle"); }
@SubscribeEvent public void onTexturePreStitch(TextureStitchEvent.Pre pre) { state = ContextState.LoadingTextures; currentTextureMap = pre.getMap(); for (AutoModel model : autoModels) { for (ResourceLocation location : model.getTextures()) { currentTextureMap.registerSprite(location); } } for (TheltaModule module : modules) { module.loadTextures(this); } state = ContextState.Intermediary; }
public static void onTextureStitchedPost(TextureMap map) { MinecraftForge.EVENT_BUS.post(new TextureStitchEvent.Post(map)); FluidRegistry.WATER.setIcons(BlockLiquid.func_149803_e("water_still"), BlockLiquid.func_149803_e("water_flow")); FluidRegistry.LAVA.setIcons(BlockLiquid.func_149803_e("lava_still"), BlockLiquid.func_149803_e("lava_flow")); }
@SubscribeEvent public void onTextureStitch(TextureStitchEvent event) { map = event.getMap(); for (ModParticles particle : ModParticles.values()) { particle.registerSprite(); } }
@SubscribeEvent @SideOnly(Side.CLIENT) public void loadTextures(TextureStitchEvent.Pre event) { FluidHelper.initTextures(event.getMap()); OverlayRenderHandler.overlayTexture = event.getMap().registerSprite(new ResourceLocation("ffs", "blocks/overlay/tank_overlay_anim")); }
@SubscribeEvent void onLoadResourcepack(TextureStitchEvent.Post evt) { try { RenderChameleonCreeper.convertTextureToGrayScale(); } catch (IOException ie) { System.out.println("Couldn't convert creeper texture to grayscale"); ie.printStackTrace(); } }
@SubscribeEvent public void onTextureStichedEvent(TextureStitchEvent event) { for (int i = 0; i < InventoryAccessories.EMPTY_SLOT_NAMES.length; ++i) { event.getMap().registerSprite(new ResourceLocation("aether_legacy", "items/slots/" + InventoryAccessories.EMPTY_SLOT_NAMES[i])); } }
@SubscribeEvent (priority = EventPriority.HIGHEST) public void onTextureStitchPre(TextureStitchEvent.Pre event) { if (!event.getMap().getBasePath().equals("textures")) { CCLLog.log(Level.WARN, "Someone is calling the TextureStitchEvent.Pre for a texture map that is NOT vanillas."); CCLLog.log(Level.WARN, "This is a bug. There is no sense of different atlas's in vanilla so this event is NOT generic and specific to the vanilla atlas."); CCLLog.log(Level.WARN, "Im catching this so things don't explode. Fix your shit!"); CCLLog.big(Level.WARN, 100, ""); return; } grabLoader(); loadBakery(modelLoader.blockModelShapes.getBlockStateMapper(), modelLoader.resourceManager); toBake.values().forEach(model -> model.getTextures().forEach(event.getMap()::registerSprite)); }
@SubscribeEvent public void textureLoad(TextureStitchEvent.Pre event) { if (!event.getMap().getBasePath().equals("textures")) { CCLLog.log(Level.WARN, "Someone is calling the TextureStitchEvent.Pre for a texture map that is NOT vanillas."); CCLLog.log(Level.WARN, "This is a bug. There is no sense of different atlas's in vanilla so this event is NOT generic and is specific to the vanilla atlas."); CCLLog.log(Level.WARN, "Im catching this so things don't explode. Fix your shit!"); CCLLog.big(Level.WARN, 100, ""); return; } for (IIconRegister reg : iconRegisters) { reg.registerIcons(event.getMap()); } }
@SubscribeEvent public void onTextureStitchEventPost(TextureStitchEvent.Post event) { if (Config.reloadColours) { Logging.logInfo("Skipping the first generation of blockcolours, models are not loaded yet", (Object[]) null); } else { this.mw.reloadBlockColours(); } }
/** Registers ICONS for container slot backgrounds. */ @SubscribeEvent public void textureStich(TextureStitchEvent.Pre event) { event.getMap().registerSprite(BACKPACK_TEXTURE); event.getMap().registerSprite(YOKE_SLOT); }
@SubscribeEvent public void stitch(TextureStitchEvent.Pre event) { event.getMap().registerSprite(new ResourceLocation(Constants.MOD_ID, "particles/glow")); event.getMap().registerSprite(new ResourceLocation(Constants.MOD_ID, "particles/star")); event.getMap().registerSprite(new ResourceLocation(Constants.MOD_ID, "particles/sparkle_blurred")); event.getMap().registerSprite(new ResourceLocation(Constants.MOD_ID, "particles/lens_flare_1")); }
@SubscribeEvent public void loadModels(TextureStitchEvent.Pre event) { IModelMaker modelMaker = new IModelMaker() { @Nullable @Override public IFlatModel getModel(ResourceLocation... url) { return new FlatModel(url); } }; for (FlatFace face : Flat.getAllSamples()) { face.loadModels(modelMaker); } }
@SubscribeEvent public void loadModels(TextureStitchEvent.Pre event) { raws.clear(); //event.modelBakery.reg Minecraft mc = Minecraft.getMinecraft(); IResourceManager irm = mc.getResourceManager(); HashSet<ResourceLocation> textures = new HashSet<ResourceLocation>(); for (FzModel fzm : instances) { fzm.model = null; ResourceLocation location = fzm.getLocation(irm); IModel rawModel = null; try { if (location != null) { rawModel = ModelLoaderRegistry.getModel(location); } } catch (IOException e) { e.printStackTrace(); } if (rawModel == null) { rawModel = ModelLoaderRegistry.getMissingModel(); } raws.put(fzm, rawModel); Collection<ResourceLocation> modelTextures = rawModel.getTextures(); textures.addAll(modelTextures); } for (ResourceLocation texture : textures) { event.map.registerSprite(texture); } }
@SubscribeEvent public void onTextureStitch(TextureStitchEvent.Pre event) { RenderUtil.loadSprites("factorization", FzIcons.class, "", event); RenderUtil.loadSprites("factorization", BarrelModel.class, "blocks/storage/", event); try { BarrelModel.template = (IRetexturableModel) ModelLoaderRegistry.getModel(new ResourceLocation("factorization:block/barrel_template")); IModel socketBase = ModelLoaderRegistry.getModel(new ResourceLocation("factorization:block/socket")); } catch (IOException e) { throw new RuntimeException(e); } }
@SubscribeEvent public void onTextureStitchPre(TextureStitchEvent.Pre event) { // Register all of our sprites so that we can use them for the model event.getMap().registerSprite(new ResourceLocation(Constants.MODID, "blocks/uranium_bits")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID, "blocks/thorium_bits")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID, "blocks/blazonium_bits")); event.getMap().registerSprite(new ResourceLocation(Constants.MODID, "blocks/terminium_bits")); }
@SubscribeEvent @SideOnly(Side.CLIENT) public void onPostTextureStitch(TextureStitchEvent.Post event) { if(event.map.getTextureType() == 0) { ModFluid.DigitalSea.setIcons(ModBlock.digitalSea.getBlockTextureFromSide(1), ModBlock.digitalSea.getBlockTextureFromSide(2)); } }
public static void onTextureStitchedPost(TextureMap map) { MinecraftForge.EVENT_BUS.post(new TextureStitchEvent.Post(map)); FluidRegistry.WATER.setIcons(BlockLiquid.getLiquidIcon("water_still"), BlockLiquid.getLiquidIcon("water_flow")); FluidRegistry.LAVA.setIcons(BlockLiquid.getLiquidIcon("lava_still"), BlockLiquid.getLiquidIcon("lava_flow")); }
@Mod.EventHandler @SubscribeEvent public void onIconLoad(TextureStitchEvent.Pre event) { for (IIconProvider reg : iconProviders) { if (reg.getTextureType() == event.map.getTextureType()) { reg.registerIcons(event.map); } } }
/** * Handles NOVA texture registration. * @param event Event */ @SubscribeEvent public void preTextureHook(TextureStitchEvent.Pre event) { if (event.map == Minecraft.getMinecraft().getTextureMapBlocks()) { Game.render().blockTextures.forEach(t -> registerIcon(t, event)); Game.render().itemTextures.forEach(t -> registerIcon(t, event)); //TODO: This is HACKS. We should create custom sprite sheets for entities. Game.render().entityTextures.forEach(t -> registerIcon(t, event)); } }