Help for changing the texture of a block with geckolib

Started by Spleet2.0 on

Topic category: Help with modding (Java Edition)

Last seen on 21:38, 22. Apr 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help for changing the texture of a block with geckolib

Hello,

 

 I would simply like to be able to change the texture of a geckolib block in-game. However, I looked in the added procedure blocks and there is one only for entities.

Last seen on 18:01, 13. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unless you're trying to add…
Sun, 11/19/2023 - 16:27

Unless you're trying to add an animated texture, you might just have to manually replace the block with a differently textured version of itself that's otherwise identical. It's not an elegant solution, but it's generally pretty effective. (You can use the 'keep NBT/Inventory' variant of the replace block function if this is important.) Not recommended if you need a lot of different variants for something, but if it's just a couple, it'll probably be fine.

Last seen on 21:38, 22. Apr 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have many variations of…
Sun, 11/19/2023 - 17:57

I have many variations of the block

Last seen on 18:01, 13. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
...It still might be worth…
Sun, 11/19/2023 - 18:00

...It still might be worth making different variants, if only because it makes it easier to have different code depending on the current state of the block. There may be some way to change block textures based on NBT data, but it will likely require custom code.

Last seen on 21:38, 22. Apr 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To be more precise, I wanted…
Mon, 11/20/2023 - 06:51

To be more precise, I wanted to create a board to make pizza, and when you add an ingredient on it it is put on the pizza

Last seen on 18:01, 13. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could maybe try using…
Mon, 11/20/2023 - 16:17

You could maybe try using some sort of entity for the pizza- entities can be assigned different textures based on NBT data, either using optifine, or using geckolib; (beacons and enchanting tables are both blocks that use entities for animated components). You'd need to make an entity with no AI that despawns if the block is broken, and changes its visibility/texture based on the contents of the current block it's on. (You could even then add some behavior where right clicking the entity empties out the block it's on, and adds the pizza to the player's inventory.)

There are, of course, other ways you could do this, this is just the first thing that comes to mind.

Last seen on 17:53, 14. Jun 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
or just use blockstates, but…
Mon, 11/20/2023 - 17:30

or just use blockstates, but there are kinda complicated.

Last seen on 21:38, 22. Apr 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can we create a non…
Wed, 11/22/2023 - 11:07

How can we create a non-living entity (like the enchantment table)

Last seen on 21:38, 22. Apr 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And how do we use…
Wed, 11/22/2023 - 11:08

And how do we use blockstates?

Last seen on 18:01, 13. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not entirely sure about…
Wed, 11/22/2023 - 14:19

Not entirely sure about blockstates. To create a non-living entity, you can just make an entity like normal, but disable AI, collisions, vulnerability to attack, etc. It will still technically be considered a living entity, but you can configure the settings in such a way that it will not be movable, have a hitbox, or take damage.

Last seen on 21:38, 22. Apr 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank !
Thu, 11/23/2023 - 18:57

Thank !

Last seen on 21:38, 22. Apr 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it possible to immunize…
Tue, 11/28/2023 - 17:52

Is it possible to immunize the entity with the /kill command ?

Last seen on 18:01, 13. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not that I know of, the kill…
Tue, 11/28/2023 - 19:28

Not that I know of, the kill command would probably still work; the only reason you can't 'kill' beacon beams and enchantment table books is because the kill command literally doesn't accept them as dependencies. But you should be able to make an entity that's immune to movement/regular damage, and could then layer additional entities directly on top of it for different topping textures?

Last seen on 21:38, 22. Apr 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes
Wed, 11/29/2023 - 17:12

Yes

Last seen on 21:38, 22. Apr 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But is there a way to easily…
Wed, 11/29/2023 - 17:14

But is there a way to easily exchange data between the block and the entity ? For example, the "corresponding" pizza would have to disappear when the block is destroyed, to change depending on the state of the block...etc.