本文整理匯總了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));
}