tomalbrc / filament

server side blocks & items
GNU Lesser General Public License v3.0
5 stars 2 forks source link

downgrade for fabric loader 0.15.7? (1.20.1) #2

Closed squid-desert closed 1 month ago

squid-desert commented 6 months ago

i tried manually changing the version dependencies so i could use the mod with the example datapack, but in the recipe book the blocks appeared as paper and had weird names, then when i placed them they appeared as noteblocks, had a weird breaking animation, and dropped nothing. i'm assuming it's probably because it wasn't made to work with 0.15.7

tomalbrc commented 6 months ago

Thats is just polymer auto-host not hosting the resource-pack, its disabled by default in polymer. I released a 0.3.3 version that forces auto-host to be enabled, everything should work out of the box with this version (except for the items in the example data pack, those need to be updated)

squid-desert commented 6 months ago

how would i go about updating the stuff in the example data pack, what needs to be changed

tomalbrc commented 6 months ago

I decided to use an "itemResource" to specify models for items (so that you can just specify textures and filament generates the model file in a future update), so the part of item configs for the models went from

  "models": {
    "default": "minecraft:custom/food/hamburger"
  },

to

  "itemResource": {
    "models": {
      "default": "minecraft:custom/food/hamburger"
    }
  },

And for textures it would look like this (again, a future update) and filament would generate the model:

  "itemResource": {
    "textures": {
      "default": "minecraft:custom/food/hamburger"
    }
  },

For Blocks you can specify a custom itemResource as well, for decorations (and blocks by default) it uses the GUI views you set-up in Blockbench

tomalbrc commented 6 months ago

updated the data pack 👍

squid-desert commented 6 months ago

this is kind of unrelated, but is there any way to make the blocks make a specific sound in the base game, or is that a limitation of polymer?

tomalbrc commented 6 months ago

Yeah that's a bit of a limitation of minecraft itself, polymer can't do much about it without excessive hacks - I might be wrong but I think you would have to replace every wood place & break sound effects since most blocks use note blocks which in turn use those wood sounds, then you would have to send other sounds to play to the client.

Best you can do (and what polymer does I think) is to replace the block being broken just before it breaks, so we can send the client "hey, this is a stone block that's breaking right now" and the client would play a stone sound instead of a note block sound.

Sounds (and particles) can be controlled using the "blockBase" property like here:

{
  "id": "mynamespace:amethyst_bricks",
  "blockModelType": "full_block",
  "blockResource": {
    "models": {
      "default": "minecraft:custom/block/arcanery/amethyst_bricks"
    }
  },
  "properties": {
    "blockBase": "minecraft:amethyst_block",
    "itemBase": "minecraft:paper"
  }
}

This plays amethyst_block sounds although its basically a noteblock ("full_block" model type)

Edit: that only works for break sounds right now I think, not sure if its possible for placing For sounds walking on top of it would also need more "hacks"