当前位置: 首页>>代码示例>>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;未经允许,请勿转载。