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

Custom Block Break "Overlay"


FireTamer81
 Share

Recommended Posts

What is the block breaking animation, and how could I do something similar? 

Rather than cracks forming from center to edge, I was wanting to make it just change opacity so the "intensity" of the cracks just gets worse. I am doing this for my "Strong Blocks", but since I am going to have somewhere around 48+ total, I don't want to make 240 textures (5 crack levels each).

So, is the vanilla animation just a texture rendered over another, is it the original block texture being combined with the various stages of the break texture (a + b1, a +b2, etc), or something else?

I also want to avoid just replacing the vanilla break animation itself since I want this "overlay" to stick around rather than just when the player is breaking the block. (if so much damage is taken up until it gets to say "crack_texture_3", it won't go away unless repaired or damaged further)

Link to comment
Share on other sites

Sorry for not replying until now, had some stuff to deal with.

From what I understand, wouldn't this only draw the "overlay" when the block is hovered over by the cursor? If so then perhaps a grass block would be a better example. I think it has two layers, one for the dirt, and another for the monochrome grass that has it's color changed dynamically. 

I'll look through what you said first, and then the grass block if your thing doesn't work. Thanks though

Link to comment
Share on other sites

Hmm, I might just do some sort of jimmy rig to get around this.

Do something like make a block model in blockbench that is slightly large than a normal block (something like 0.01 on each side to prevent z-fighting), draw the textures and just have the blocks act as a multipart. (I really hope this can end up transparent and not just blackout the texture underneath)

Might be messy, but I really just want to get this done to move onto something else (been working on this one feature for maybe a month because IRL stuff).

Thanks for the suggestions anyways mate (I can probably use them for some other crazy idea later).

Link to comment
Share on other sites

If you want a tiny fraction of offset, use float.epsilon.

0.01 will actually be noticeable. It's about 1/6th of a texture pixel.

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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

    • Hello I've wanted to see if new forge is working for me and it doesn't.  I am getting error: This is happen when i tried to run it on Java Dev Kit 16/17: "[E] WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-exports [E] Exception in thread "main" java.lang.module.FindException: Module org.objectweb.asm.commons not found, required by org.openjdk.nashorn [E]     at java.base/java.lang.module.Resolver.findFail(Resolver.java:893) [E]     at java.base/java.lang.module.Resolver.resolve(Resolver.java:192) [E]     at java.base/java.lang.module.Resolver.resolve(Resolver.java:141) [E]     at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:492) [E]     at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:298) [E]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:83) [E] " When i try to lunch it on Java runtime 7/8: "[E] Error: Could not create the Java Virtual Machine. [E] Error: A fatal exception has occurred. Program will exit. [E] Unrecognized option: -p [E]" I've tried to reinstall multiple java versions, re-downloading minecraft, changing lunching arguments, multiple forge versions for that minecraft version. Nothing works. Can someone point me what i could do make it work?   Thanks for help in advance. 
    • show the complete RegistryObject, you tried to create
    • Luis_ST Can you please show me an example I am trying to create a ForgeSpawnEggItem in my ModSpawnEgg class, but it keeps on saying the same error as shown above 
    • Time: 12/3/21 11:33 PM Description: Ticking entity java.lang.BootstrapMethodError: java.lang.LinkageError: loader constraint violation: loader (instance of sun/misc/Launcher$AppClassLoader) previously initiated loading for a different type with name "org/apache/logging/log4j/util/MessageSupplier"     at net.minecraftforge.eventbus.EventBus.handleException(EventBus.java:316) ~[eventbus-4.0.0.jar:?] {}     at net.minecraftforge.eventbus.EventBus.post(EventBus.java:307) ~[eventbus-4.0.0.jar:?] {}     at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}     at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:597) ~[?:?] {re:mixin,re:classloading}     at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:591) ~[?:?] {re:mixin,re:classloading}     at net.minecraftforge.common.capabilities.CapabilityProvider.doGatherCapabilities(CapabilityProvider.java:83) ~[?:?] {re:computing_frames,re:mixin,re:classloading}     at net.minecraftforge.common.capabilities.CapabilityProvider.getCapabilities(CapabilityProvider.java:91) ~[?:?] {re:computing_frames,re:mixin,re:classloading}     at net.minecraftforge.common.capabilities.CapabilityProvider.areCapsCompatible(CapabilityProvider.java:103) ~[?:?] {re:computing_frames,re:mixin,re:classloading}     at net.minecraft.item.ItemStack.func_77959_d(ItemStack.java:387) ~[?:?] {re:mixin,xf:fml:forge:filled_map.4,xf:fml:forge:itemstack,re:classloading,xf:fml:forge:filled_map.4,xf:fml:forge:itemstack,pl:mixin:APP:performant.mixins.json:item.ItemStackMixin,pl:mixin:APP:itemfilters-common.mixins.json:ItemStackMixin,pl:mixin:APP:epicfight.mixins.json:MixinItemStack,pl:mixin:A}     at net.minecraft.item.ItemStack.func_77989_b(ItemStack.java:375) ~[?:?] {re:mixin,xf:fml:forge:filled_map.4,xf:fml:forge:itemstack,re:classloading,xf:fml:forge:filled_map.4,xf:fml:forge:itemstack,pl:mixin:APP:performant.mixins.json:item.ItemStackMixin,pl:mixin:APP:itemfilters-common.mixins.json:ItemStackMixin,pl:mixin:APP:epicfight.mixins.json:MixinItemStack,pl:mixin:A}     at net.minecraft.entity.LivingEntity.func_241354_r_(LivingEntity.java:2267) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:performant.mixins.json:entity.LivingEntityMixin,pl:mixin:APP:citadel.mixins.json:LivingEntityMixin,pl:mixin:APP:environmental.mixins.json:LivingEntityMixin,pl:mixin:APP:allurement.mixins.json:LivingEntityAccessor,pl:mixin:APP:allurement.mixins.json:LivingEntityMixin,pl:mixin:APP:ars_nouveau.mixins.json:ExpInvokerMixin,pl:mixin:APP:ars_nouveau.mixins.json:MixinLivingEntity,pl:mixin:APP:personality.mixins.json:LivingEntityMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorLivingEntity,pl:mixin:A}     at net.minecraft.entity.LivingEntity.func_241353_q_(LivingEntity.java:2239) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:performant.mixins.json:entity.LivingEntityMixin,pl:mixin:APP:citadel.mixins.json:LivingEntityMixin,pl:mixin:APP:environmental.mixins.json:LivingEntityMixin,pl:mixin:APP:allurement.mixins.json:LivingEntityAccessor,pl:mixin:APP:allurement.mixins.json:LivingEntityMixin,pl:mixin:APP:ars_nouveau.mixins.json:ExpInvokerMixin,pl:mixin:APP:ars_nouveau.mixins.json:MixinLivingEntity,pl:mixin:APP:personality.mixins.json:LivingEntityMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorLivingEntity,pl:mixin:A}     at net.minecraft.entity.LivingEntity.func_70071_h_(LivingEntity.java:2141) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:performant.mixins.json:entity.LivingEntityMixin,pl:mixin:APP:citadel.mixins.json:LivingEntityMixin,pl:mixin:APP:environmental.mixins.json:LivingEntityMixin,pl:mixin:APP:allurement.mixins.json:LivingEntityAccessor,pl:mixin:APP:allurement.mixins.json:LivingEntityMixin,pl:mixin:APP:ars_nouveau.mixins.json:ExpInvokerMixin,pl:mixin:APP:ars_nouveau.mixins.json:MixinLivingEntity,pl:mixin:APP:personality.mixins.json:LivingEntityMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorLivingEntity,pl:mixin:A}     at net.minecraft.entity.MobEntity.func_70071_h_(MobEntity.java:431) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default,pl:mixin:APP:environmental.mixins.json:MobEntityMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMobEntity,pl:mixin:APP:performant.mixins.json:entity.MobEntityDespawnMixin,pl:mixin:APP:performant.mixins.json:entity.MobEntityMixin,pl:mixin:A}     at net.minecraft.world.server.ServerWorld.func_217479_a(ServerWorld.java:611) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:performant.mixins.json:world.ServerWorldBlockUpdateMixin,pl:mixin:APP:abnormals_core.mixins.json:ServerWorldMixin,pl:mixin:APP:performant.mixins.json:world.ServerWorldMixin,pl:mixin:APP:performant.mixins.json:entity.MobServerWorldMixin,pl:mixin:A}     at net.minecraft.world.server.ServerWorld$$Lambda$16565/514282080.accept(Unknown Source) ~[?:?] {}     at net.minecraft.world.World.func_217390_a(World.java:554) ~[?:?] {re:computing_frames,pl:accesstransformer:B,xf:fml:observerlib:coremodmethod,re:mixin,pl:accesstransformer:B,xf:fml:observerlib:coremodmethod,re:classloading,pl:accesstransformer:B,xf:fml:observerlib:coremodmethod,pl:mixin:APP:sereneseasons.mixins.json:MixinWorld,pl:mixin:APP:flywheel.mixins.json:TileWorldHookMixin,pl:mixin:A}     at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:404) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:performant.mixins.json:world.ServerWorldBlockUpdateMixin,pl:mixin:APP:abnormals_core.mixins.json:ServerWorldMixin,pl:mixin:APP:performant.mixins.json:world.ServerWorldMixin,pl:mixin:APP:performant.mixins.json:entity.MobServerWorldMixin,pl:mixin:A}     at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:851) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:APP:marg.mixins.json:MinecraftServerMixin,pl:mixin:A}     at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:787) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:APP:marg.mixins.json:MinecraftServerMixin,pl:mixin:A}     at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:118) ~[?:?] {re:mixin,xf:OptiFine:default,re:classloading,xf:OptiFine:default,pl:mixin:APP:smoothboot.mixins.json:client.IntegratedServerMixin,pl:mixin:A}     at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642) [?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:APP:marg.mixins.json:MinecraftServerMixin,pl:mixin:A}     at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) [?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:APP:marg.mixins.json:MinecraftServerMixin,pl:mixin:A}     at net.minecraft.server.MinecraftServer$$Lambda$15673/85323444.run(Unknown Source) [?:?] {}     at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51] {} Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of sun/misc/Launcher$AppClassLoader) previously initiated loading for a different type with name "org/apache/logging/log4j/util/MessageSupplier"     at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_51] {}     at java.lang.ClassLoader.defineClass(ClassLoader.java:760) ~[?:1.8.0_51] {}     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_51] {}     at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[?:1.8.0_51] {}     at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[?:1.8.0_51] {}     at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[?:1.8.0_51] {}     at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[?:1.8.0_51] {}     at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_51] {}     at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[?:1.8.0_51] {}     at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_51] {}     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[?:1.8.0_51] {}     at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_51] {}     ... 25 more for full report https://pastebin.com/Did3vHvR    
    • you need to create a new ForgeSpawnEggItem and not a SpawnEggItem!
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.