當前位置: 首頁>>代碼示例>>Java>>正文


Java TextureStitchEvent.Post方法代碼示例

本文整理匯總了Java中net.minecraftforge.client.event.TextureStitchEvent.Post方法的典型用法代碼示例。如果您正苦於以下問題:Java TextureStitchEvent.Post方法的具體用法?Java TextureStitchEvent.Post怎麽用?Java TextureStitchEvent.Post使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraftforge.client.event.TextureStitchEvent的用法示例。


在下文中一共展示了TextureStitchEvent.Post方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: postStitch

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@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];
    }
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:24,代碼來源:LiquidTextures.java

示例2: bakeModels

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@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();
}
 
開發者ID:purpleposeidon,項目名稱:Factorization,代碼行數:22,代碼來源:FzModel.java

示例3: onLoadResourcepack

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@SubscribeEvent
void onLoadResourcepack(TextureStitchEvent.Post evt)
{
    try
    {
        RenderChameleonCreeper.convertTextureToGrayScale();
    }
    catch (IOException ie)
    {
        System.out.println("Couldn't convert creeper texture to grayscale");
        ie.printStackTrace();
    }
}
 
開發者ID:VelocityRa,項目名稱:ChameleonCreepersMod,代碼行數:14,代碼來源:EventHandlerClient.java

示例4: onTextureStitchEventPost

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@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();
	}
}
 
開發者ID:tom5454,項目名稱:Toms-Mod,代碼行數:9,代碼來源:EventHandler.java

示例5: onPostTextureStitch

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@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));
	}
}
 
開發者ID:Xavier0014,項目名稱:LyokoEnergistics,代碼行數:10,代碼來源:TextureEvent.java

示例6: textureHook

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:NOVA-Team,項目名稱:NOVA-Core,代碼行數:11,代碼來源:RenderUtility.java

示例7: postIconLoad

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void postIconLoad(TextureStitchEvent.Post evt)
{
	SpriteIcon.images.clear();
	for(StoragePart part : StoragePart.values())
	{
		if(part.textureType == evt.map.getTextureType())
		{
			part.getPart().onIconPostLoad(evt.map);
		}
	}
}
 
開發者ID:TinyModularThings,項目名稱:Logistic-Storage,代碼行數:14,代碼來源:TextureStorage.java

示例8: TexturesStitched

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@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);
		}
	}
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:12,代碼來源:TextureSubmap.java

示例9: stitcherEventPost

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@SubscribeEvent
    public static void stitcherEventPost(TextureStitchEvent.Post event)
    {
        if(Configurator.RENDER.enableAnimationStatistics && CompressedAnimatedSprite.perfLoadRead.runCount() > 0)
        {
            CompressedAnimatedSprite.perfCollectorLoad.outputStats();
            CompressedAnimatedSprite.perfCollectorLoad.clearStats();
            
//            Log.info("JPEG decoding " + CompressedAnimatedSprite.perfLoadJpeg.stats());
//            Log.info("Color conversion and alpha channel reconstruction " + CompressedAnimatedSprite.perfLoadAlpha.stats());
//            Log.info("Mipmap generation " + CompressedAnimatedSprite.perfLoadMipMap.stats());
//            Log.info("Transfer to buffer " + CompressedAnimatedSprite.perfLoadTransfer.stats());
            
            CompressedAnimatedSprite.reportMemoryUsage();
        }
        
        CompressedAnimatedSprite.tearDown();
        
        TEX_MACHINE_ON_OFF = new BinaryReference<TextureAtlasSprite>(
                Textures.MACHINE_POWER_ON.getSampleSprite(),
                Textures.MACHINE_POWER_OFF.getSampleSprite());
        
//        TEX_LINEAR_GAUGE_LEVEL = loadNonBlockTexture("hard_science:textures/blocks/linear_level_128.png");
//        TEX_LINEAR_GAUGE_MARKS = loadNonBlockTexture("hard_science:textures/blocks/linear_marks_128.png");
//        TEX_LINEAR_POWER_LEVEL = loadNonBlockTexture("hard_science:textures/blocks/linear_power_128.png");
        
        TEX_BLOCKS = Minecraft.getMinecraft().getTextureMapBlocks().getGlTextureId();
        
        ITEX_BLOCKS = Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        
        SPRITE_REDSTONE_TORCH_LIT   = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/redstone_torch_on");
        SPRITE_REDSTONE_TORCH_UNLIT = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/redstone_torch_off");
         
        FONT_RENDERER_SMALL.postLoad();
        FONT_RENDERER_LARGE.postLoad();
        
        BlockFabricatorTileEntity.initRenderSpecs();

    }
 
開發者ID:grondag,項目名稱:Hard-Science,代碼行數:40,代碼來源:ModModels.java

示例10: TexturesStitched

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@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);
		}
	}
}
 
開發者ID:asiekierka,項目名稱:Chisel-1.7.2,代碼行數:10,代碼來源:TextureSubmap.java

示例11: TexturesStitched

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@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);
        }
    }
}
 
開發者ID:delta534,項目名稱:Chisel,代碼行數:10,代碼來源:TextureSubmap.java

示例12: onPostTextureStitch

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@ForgeSubscribe(priority = EventPriority.NORMAL)
public void onPostTextureStitch(TextureStitchEvent.Post event)
{
	if (ModHarvestCraftWaila.hasHarvestCraft)
	{
		if (PamHarvestCraft.pamCrop != null && ((BlockPamCrop) PamHarvestCraft.pamCrop).iconArray != null)
		{
			setBlockIcon(PamHarvestCraft.pamCrop, ((BlockPamCrop) PamHarvestCraft.pamCrop).iconArray[0][0]);
		}
	}

	if (ModHarvestCraftWaila.hasWeeeFlowers)
	{
		if (PamWeeeFlowers.pamFlower != null && ((BlockPamFlower) PamWeeeFlowers.pamFlower).icons != null)
		{
			setBlockIcon(PamWeeeFlowers.pamFlower, ((BlockPamFlower) PamWeeeFlowers.pamFlower).icons[0]);
		}

		if (PamWeeeFlowers.pamflowerCrop != null && ((BlockPamFlowerCrop) PamWeeeFlowers.pamflowerCrop).iconArray != null)
		{
			setBlockIcon(PamWeeeFlowers.pamflowerCrop, ((BlockPamFlowerCrop) PamWeeeFlowers.pamflowerCrop).iconArray[0][0]);
		}

		if (PamWeeeFlowers.pammoonFlower != null && ((BlockPamMoonFlower) PamWeeeFlowers.pammoonFlower).icons != null)
		{
			setBlockIcon(PamWeeeFlowers.pammoonFlower, ((BlockPamMoonFlower) PamWeeeFlowers.pammoonFlower).icons[0]);
		}
	}
}
 
開發者ID:squeek502,項目名稱:HarvestCraftWaila,代碼行數:30,代碼來源:IconFixer.java

示例13: applyTextureToAtlas

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void applyTextureToAtlas(TextureStitchEvent.Post event) {
    if(event.map.getTextureType()==0) {
        for(CustomFluid fluid: CustomItems.fluids) {
            fluid.setIcons(fluid.getBlock().getIcon(0,0),fluid.getBlock().getIcon(2,0));
        }
    }
}
 
開發者ID:InfinityRaider,項目名稱:CustomItems,代碼行數:10,代碼來源:FluidTextureEventHandler.java

示例14: textureHook

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void textureHook(TextureStitchEvent.Post event)
    {
        if (event.map.getTextureType() == 0)
        {   
            AdvancedUtilitiesBlocks.fluidSteam.setIcons(AdvancedUtilitiesBlocks.blockFluidSteam.getIcon(0, 0), AdvancedUtilitiesBlocks.blockFluidSteam.getIcon(1, 0));
        }
    }
 
開發者ID:Sudwood,項目名稱:AdvancedUtilities,代碼行數:10,代碼來源:AUEventHandler.java

示例15: textureHook

import net.minecraftforge.client.event.TextureStitchEvent; //導入方法依賴的package包/類
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void textureHook(TextureStitchEvent.Post event)
{
    if (event.map.getTextureType() == 0)
        digitalSea.setIcons(ModBlocks.digitalSeaLiquid.getBlockTextureFromSide(1));
}
 
開發者ID:Cortex-Modders,項目名稱:CodeLyokoMod,代碼行數:8,代碼來源:ModFluids.java


注:本文中的net.minecraftforge.client.event.TextureStitchEvent.Post方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。