Java Code Examples for net.minecraftforge.client.event.TextureStitchEvent#Pre
The following examples show how to use
net.minecraftforge.client.event.TextureStitchEvent#Pre .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClientProxy.java From BigReactors with MIT License | 6 votes |
@Override @SideOnly(Side.CLIENT) @SubscribeEvent public void registerIcons(TextureStitchEvent.Pre event) { if(event.map.getTextureType() == BeefIconManager.TERRAIN_TEXTURE) { BigReactors.registerNonBlockFluidIcons(event.map); GuiIcons.registerIcons(event.map); CommonBlockIcons.registerIcons(event.map); } // else if(event.map.textureType == BeefIconManager.ITEM_TEXTURE) { } // Reset any controllers which have TESRs which cache displaylists with UV data in 'em // This is necessary in case a texture pack changes UV coordinates on us Set<MultiblockControllerBase> controllers = MultiblockRegistry.getControllersFromWorld(FMLClientHandler.instance().getClient().theWorld); if(controllers != null) { for(MultiblockControllerBase controller: controllers) { if(controller instanceof MultiblockTurbine) { ((MultiblockTurbine)controller).resetCachedRotors(); } } } }
Example 2
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
/** * Handles NOVA texture registration. * @param event Event */ @SubscribeEvent public void preTextureHook(TextureStitchEvent.Pre event) { if (event.map.getTextureType() == 0) { Game.render().blockTextures.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)); } else if (event.map.getTextureType() == 1) { Game.render().itemTextures.forEach(t -> registerIcon(t, event)); } }
Example 3
Source File: ArtifactServerEventHandler.java From Artifacts with MIT License | 5 votes |
@SubscribeEvent @SideOnly(Side.CLIENT) public void registerTextures(TextureStitchEvent.Pre event) { //System.out.println("before: " + event.map.getTextureExtry("artifacts:calendar")); //TextureMap tm = (TextureMap)Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationItemsTexture); //boolean re = tm.setTextureEntry("artifacts:calendar", new TextureCalendar("artifacts:calendar")); //System.out.println("Able to register calendar texture: " + re); //ItemCalendar.instance.setTextureName("artifacts:calendar"); //System.out.println(event.map.getTextureExtry("artifacts:calendar")); if(event.map.getTextureType() == 1 ) { event.map.setTextureEntry("artifacts:calendar", ClientProxy.calendar = new TextureCalendar("artifacts:calendar")); } }
Example 4
Source File: ModuleComputerCraft.java From OpenPeripheral-Addons with MIT License | 5 votes |
@SubscribeEvent @SideOnly(Side.CLIENT) public void textureHook(TextureStitchEvent.Pre event) { if (event.map.getTextureType() == 0) { Icons.narcissiticTurtle = event.map.registerIcon("computercraft:turtle"); Icons.sensorTurtle = event.map.registerIcon("openperipheraladdons:sensorturtle"); } }
Example 5
Source File: WRAddonEventHandler.java From WirelessRedstone with MIT License | 5 votes |
@SubscribeEvent @SideOnly(Side.CLIENT) public void onTextureLoad(TextureStitchEvent.Pre event) { if (event.map.getTextureType() == 1) { RemoteTexManager.load(event.map); TriangTexManager.loadTextures(); } }
Example 6
Source File: ClientEventHandler.java From Et-Futurum with The Unlicense | 5 votes |
@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")); } }
Example 7
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
/** * 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)); } }
Example 8
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
/** * Handles NOVA texture registration. * @param event Event */ @SubscribeEvent public void preTextureHook(TextureStitchEvent.Pre event) { if (event.getMap() == Minecraft.getMinecraft().getTextureMapBlocks()) { Game.render().blockTextures.forEach(t -> registerIcon(t, event)); Game.render().itemTextures.forEach(t -> registerIcon(t, event)); Game.render().entityTextures.forEach(t -> registerIcon(t, event)); } }
Example 9
Source File: SpriteRegistryHelper.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 5 votes |
@SubscribeEvent public void onTextureStitchPre(TextureStitchEvent.Pre event) { AtlasTexture atlas = event.getMap(); AtlasRegistrarImpl registrar = getRegistrar(atlas); iconRegisters.get(atlas.getTextureLocation()).forEach(e -> e.registerIcons(registrar)); registrar.processPre(event::addSprite); }
Example 10
Source File: EventsClient.java From Valkyrien-Skies with Apache License 2.0 | 5 votes |
@SubscribeEvent public void onTextureStitchPre(TextureStitchEvent.Pre event) { ResourceLocation mainCoreInventoryTexture = new ResourceLocation(ValkyrienSkiesMod.MOD_ID, "items/main_core"); ResourceLocation smallCoreInventoryTexture = new ResourceLocation(ValkyrienSkiesMod.MOD_ID, "items/small_core"); event.getMap() .registerSprite(mainCoreInventoryTexture); event.getMap() .registerSprite(smallCoreInventoryTexture); }
Example 11
Source File: GTProxyClient.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public static void onRegisterTexture(TextureStitchEvent.Pre event) { event.getMap().registerSprite(new ResourceLocation(GTMod.MODID, "fluids/fluid")); event.getMap().registerSprite(new ResourceLocation(GTMod.MODID, "fluids/fluidflowing")); event.getMap().registerSprite(new ResourceLocation(GTMod.MODID, "fluids/gas")); event.getMap().registerSprite(new ResourceLocation(GTMod.MODID, "fluids/gasflowing")); event.getMap().registerSprite(new ResourceLocation(GTMod.MODID, "fluids/magicdye")); event.getMap().registerSprite(new ResourceLocation(GTMod.MODID, "fluids/magicdyeflowing")); }
Example 12
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
public void registerIcon(Texture texture, TextureStitchEvent.Pre event) { textureMap.put(texture, event.getMap().registerSprite(AssetConverter.instance().toNativeTexture(texture))); }
Example 13
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
public void registerIcon(Texture texture, TextureStitchEvent.Pre event) { textureMap.put(texture, event.map.registerSprite(AssetConverter.instance().toNativeTexture(texture))); }
Example 14
Source File: DabSquirrels.java From CommunityMod with GNU Lesser General Public License v2.1 | 4 votes |
@SubscribeEvent @SideOnly(Side.CLIENT) public static void textureStitchEventPre(TextureStitchEvent.Pre event) { event.getMap().registerSprite(DabSquirrels.dab); }
Example 15
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
public void registerIcon(Texture texture, TextureStitchEvent.Pre event) { iconMap.put(texture, event.map.registerIcon(AssetConverter.instance().toNativeTexture(texture).toString())); }
Example 16
Source File: TextureUtils.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
@SubscribeEvent public void textureLoad(TextureStitchEvent.Pre event) { for (IIconRegister reg : iconRegisters) reg.registerIcons(event.map); }
Example 17
Source File: EventsClient.java From Valkyrien-Skies with Apache License 2.0 | 4 votes |
/** * Register textures for all the models registered in the GibsModelRegistry. */ @SubscribeEvent public void onTextureStitchEvent(TextureStitchEvent.Pre event) { GibsModelRegistry.registerTextures(event); }
Example 18
Source File: CommonProxy.java From BigReactors with MIT License | 4 votes |
@SideOnly(Side.CLIENT) @SubscribeEvent public void registerIcons(TextureStitchEvent.Pre event) { }