Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Solved] Getting block's textures - Sided and Metadata textures


joaopms
 Share

Recommended Posts

I have a block that set's it's textures when someone right clicks it with a block on theur wand. I'm saving it's ID and metadata to the block's tile entity's NBT data. Now I need a way to get a block's metadata and sided textures. I'm already doing it using "getBlockTexture" and "Block.blocksList[tile.blockCamouflageID].getBlockTexture(block, x, y, z, side);", but now, how can I do it with metadata?

Thank you!

Link to comment
Share on other sites

Hi

 

Is this what you're looking for?

 

Block.

    /**

    * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata

    */

    public Icon getIcon(int par1, int par2)

 

-TGG

Yes, yes it is! Thank you very much!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • deleted the folder, and still, not working.
    • Im literally so confused. Ive followed so many directions, and done so much and it's not working..
    • the i have no idea, Forge tries to load this file as a Mod then it must exists you could delete the mods folder and see whats happen then
    • [03Jul2022 15:58:31.768] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, BradyDyson, --version, 1.19-forge-41.0.62, --gameDir, /Users/bradydyson/Library/Application Support/minecraft, --assetsDir, /Users/bradydyson/Library/Application Support/minecraft/assets, --assetIndex, 1.19, --uuid, 518f76ab883b4d1a826ecb2231ce9a9e, --accessToken, ❄❄❄❄❄❄❄❄, --clientId, MjgwREQ1MEY5NzNCNEZGM0JGNEIwRTI2MThBRkNEOEI=, --xuid, 2535470977180090, --userType, msa, --versionType, release, --launchTarget, forgeclient, --fml.forgeVersion, 41.0.62, --fml.mcVersion, 1.19, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220607.102129] [03Jul2022 15:58:31.771] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.1+10.0.1+main.e9521dc3 starting: java version 17.0.3 by Microsoft; OS Mac OS X arch aarch64 version 12.0.1 [03Jul2022 15:58:31.803] [main/ERROR] [net.minecraftforge.fml.loading.ModDirTransformerDiscoverer/]: Zip Error when loading jar file /Users/bradydyson/Library/Application Support/minecraft/mods/BiomesOPlenty-1.19-17.0.0.136.jar java.util.zip.ZipException: zip END header not found     at java.util.zip.ZipFile$Source.findEND(ZipFile.java:1469) ~[?:?]     at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1477) ~[?:?]     at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1315) ~[?:?]     at java.util.zip.ZipFile$Source.get(ZipFile.java:1277) ~[?:?]     at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709) ~[?:?]     at java.util.zip.ZipFile.<init>(ZipFile.java:243) ~[?:?]     at java.util.zip.ZipFile.<init>(ZipFile.java:172) ~[?:?]     at java.util.zip.ZipFile.<init>(ZipFile.java:186) ~[?:?]     at net.minecraftforge.fml.loading.ModDirTransformerDiscoverer.visitFile(ModDirTransformerDiscoverer.java:54) ~[fmlloader-1.19-41.0.62.jar%2393!/:1.0]     at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]     at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]     at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]     at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]     at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]     at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]     at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]     at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]     at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]     at net.minecraftforge.fml.loading.ModDirTransformerDiscoverer.scan(ModDirTransformerDiscoverer.java:44) ~[fmlloader-1.19-41.0.62.jar%2393!/:1.0]     at net.minecraftforge.fml.loading.ModDirTransformerDiscoverer.candidates(ModDirTransformerDiscoverer.java:27) ~[fmlloader-1.19-41.0.62.jar%2393!/:1.0]     at cpw.mods.modlauncher.serviceapi.ITransformerDiscoveryService.candidates(ITransformerDiscoveryService.java:48) ~[modlauncher-10.0.1.jar%2381!/:10.0.1+10.0.1+main.e9521dc3]     at cpw.mods.modlauncher.TransformationServicesHandler.lambda$discoverServices$14(TransformationServicesHandler.java:123) ~[modlauncher-10.0.1.jar%2381!/:?]     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) [?:?]     at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) [?:?]     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) [?:?]     at java.util.ServiceLoader$ProviderSpliterator.tryAdvance(ServiceLoader.java:1499) [?:?]     at java.util.Spliterator.forEachRemaining(Spliterator.java:332) [?:?]     at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) [?:?]     at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) [?:?]     at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) [?:?]     at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) [?:?]     at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) [?:?]     at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) [?:?]     at java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) [?:?]     at cpw.mods.modlauncher.TransformationServicesHandler.discoverServices(TransformationServicesHandler.java:125) [modlauncher-10.0.1.jar%2381!/:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:86) [modlauncher-10.0.1.jar%2381!/:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.1.jar%2381!/:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.1.jar%2381!/:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.1.jar%2381!/:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.1.jar:?] [03Jul2022 15:58:31.857] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFineTransformationService.onLoad [03Jul2022 15:58:31.857] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFine ZIP file URL: union:/Users/bradydyson/Library/Application%20Support/minecraft/mods/preview_OptiFine_1.19_HD_U_H8_pre1.jar%23144!/ [03Jul2022 15:58:31.861] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFine ZIP file: /Users/bradydyson/Library/Application Support/minecraft/mods/preview_OptiFine_1.19_HD_U_H8_pre1.jar [03Jul2022 15:58:31.862] [main/INFO] [optifine.OptiFineTransformer/]: Target.PRE_CLASS is available [03Jul2022 15:58:31.890] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/Users/bradydyson/Library/Application%20Support/minecraft/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2390!/ Service=ModLauncher Env=CLIENT [03Jul2022 15:58:31.894] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFineTransformationService.initialize   I have and it's labeled as latest log. 
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.