本文整理汇总了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];
}
}
示例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();
}
示例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();
}
}
示例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();
}
}
示例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));
}
}
示例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);
}
示例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);
}
}
}
示例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);
}
}
}
示例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();
}
示例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);
}
}
}
示例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);
}
}
}
示例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]);
}
}
}
示例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));
}
}
}
示例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));
}
}
示例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));
}