Java Code Examples for net.minecraftforge.client.event.TextureStitchEvent#Post
The following examples show how to use
net.minecraftforge.client.event.TextureStitchEvent#Post .
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: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
/** * Handles NOVA texture update. * @param event Event */ @SubscribeEvent public void textureHook(TextureStitchEvent.Post event) { Game.render().blockTextures.forEach(this::updateTexureDimensions); Game.render().itemTextures.forEach(this::updateTexureDimensions); Game.render().entityTextures.forEach(this::updateTexureDimensions); }
Example 2
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
/** * Handles NOVA texture update. * @param event Event */ @SubscribeEvent public void textureHook(TextureStitchEvent.Post event) { Game.render().blockTextures.forEach(this::updateTexureDimensions); Game.render().itemTextures.forEach(this::updateTexureDimensions); Game.render().entityTextures.forEach(this::updateTexureDimensions); }
Example 3
Source File: LiquidTextures.java From CodeChickenCore with MIT License | 5 votes |
@SubscribeEvent public void postStitch(TextureStitchEvent.Post event) { Map<String, TextureAtlasSprite> uploadedSprites = event.map.mapUploadedSprites; if (replaceWater) { uploadedSprites.put("minecraft:blocks/water_still", newTextures[0]); uploadedSprites.put("minecraft:blocks/water_flow", newTextures[1]); } if (replaceLava) { uploadedSprites.put("minecraft:blocks/lava_still", newTextures[2]); uploadedSprites.put("minecraft:blocks/lava_flow", newTextures[3]); } }
Example 4
Source File: TextureSubmap.java From Chisel with GNU General Public License v2.0 | 5 votes |
@SubscribeEvent public void TexturesStitched(TextureStitchEvent.Post event) { for(int x = 0; x < width; x++) { for(int y = 0; y < height; y++) { icons[y * width + x] = new TextureVirtual(icon, width, height, x, y); } } }
Example 5
Source File: SpriteRegistryHelper.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
@SubscribeEvent public void onTextureStitchPost(TextureStitchEvent.Post event) { AtlasTexture atlas = event.getMap(); AtlasRegistrarImpl registrar = getRegistrar(atlas); registrar.processPost(atlas); }
Example 6
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
@SubscribeEvent public void textureHook(TextureStitchEvent.Post event) { Game.render().blockTextures.forEach(this::updateTexureDimensions); Game.render().itemTextures.forEach(this::updateTexureDimensions); Game.render().entityTextures.forEach(this::updateTexureDimensions); }
Example 7
Source File: TextureRegisterEvent.java From Moo-Fluids with GNU General Public License v3.0 | 4 votes |
@SubscribeEvent public void onTextureStitch(TextureStitchEvent.Post event) { for (final Fluid fluid : EntityHelper.getContainableFluids().values()) { try { final String fluidName = fluid.getName(); final EntityTypeData entityTypeData = EntityHelper.getEntityData(fluidName); final TextureAtlasSprite fluidIcon = event.getMap().getAtlasSprite(fluid.getStill().toString()); final int fluidColor = fluid.getColor(); if (fluidColor != 0xFFFFFFFF) { if (entityTypeData != null) { entityTypeData.setOverlay(new Color( (fluidColor >> 16) & 0xFF, (fluidColor >> 8) & 0xFF, (fluidColor) & 0xFF, 128).getRGB()); } } else if (fluidIcon != event.getMap().getMissingSprite() && fluidIcon.getFrameTextureData(0) != null) { final Color meanColour = ColorHelper.getMeanColour(fluidIcon.getFrameTextureData(0)); if (entityTypeData != null) { entityTypeData.setOverlay(new Color( meanColour.getRed(), meanColour.getGreen(), meanColour.getBlue(), 128).getRGB()); } } else { if (entityTypeData != null) { entityTypeData.setOverlay(0xFFFFFFFF); } } EntityHelper.setEntityData(fluidName, entityTypeData); if (ModInformation.DEBUG_MODE) { LogHelper.info(String.format("Successfully added colour overlay for %s", fluidName)); if (fluidIcon != null) { LogHelper.info("Successfully added colour overlay for " + fluidIcon.getIconName()); } } } catch (final Exception ex) { LogHelper.error("Encountered an issue when attempting to manipulate texture"); ex.printStackTrace(); } } }
Example 8
Source File: ClientProxy.java From BigReactors with MIT License | 4 votes |
@Override @SideOnly(Side.CLIENT) @SubscribeEvent public void setIcons(TextureStitchEvent.Post event) { BigReactors.setNonBlockFluidIcons(); }
Example 9
Source File: CommonProxy.java From BigReactors with MIT License | 4 votes |
@SideOnly(Side.CLIENT) @SubscribeEvent public void setIcons(TextureStitchEvent.Post event) { }