MCprep icon indicating copy to clipboard operation
MCprep copied to clipboard

Improve json model imports

Open TheDuckCow opened this issue 1 month ago • 2 comments

This is carrying on the leftovers now that we've closed out #267, as there are some areas to improve. Each of these could probably be tackled separately in individual PRs, any would be an incremental improvement. At this stage, I'm going to give this the title of "enhancement" since it's not really a bug but a limitation.

Some models are broken into pieces

For these, the more optimal solution would be to have MCprep essentially recognize and "group" together individual parts of a model to be placed together, similar to how the game must be able to do it.

  • Doors (top vs bottom)
  • Brewing stands
  • Glass panels

Some blocks that are currently not listed at all:

I don't recall if we explicitly removed them or if it's some other consequence for how the data is now stored in resource packs, but these don't even appear in the list.

  • Beds
  • Banners
  • (maybe others)

Some blocks fail to load due to no/not enough geometry

Maybe they are just shader variant references to a base model? In some cases, it might be these are intended to be part of other models and this is just an extra "piece". Would need to investigate in each case further:

  • black_shulker_box: Error: JSON model does not contain any actual geometry
  • blast_furnace: Not enough geo generated
  • carved_pumpkin: Not enough geo generated
  • copper_chest: Error: JSON model does not contain any actual geometry
  • ...Larger list can be found here

Primitive blocks are present

These really should be excluded as they are just meant to be base references for blocks containing variations of common base models.

  • fence_inventory
  • cross_emissive
  • cross
  • crop
  • coral_fan
  • coral_wall_fan
  • pressure_plate_down
  • pressure_plate_up
  • tinted_cross
  • ...and some more

TheDuckCow avatar Nov 11 '25 19:11 TheDuckCow

Hi! Just adding an update from my side as I’ve been working through the remaining blocks.

"Not enough geo generated"

  • [x] blast_furnace
  • [x] blast_furnace_on
  • [x] carved_pumpkin
  • [x] dispenser
  • [x] dropper
  • [x] furnace
  • [x] furnace_on
  • [x] jack_o_lantern
  • [x] dried_ghast
  • [x] cube

"JSON model does not contain any actual geometry"

  • [ ] black_shulker_box
  • [ ] block
  • [ ] blue_shulker_box
  • [ ] brown_shulker_box
  • [ ] copper_chest
  • [ ] copper_golem_statue
  • [ ] cyan_shulker_box
  • [ ] decorated_pot
  • [ ] end_gateway
  • [ ] exposed_copper_chest
  • [ ] exposed_copper_golem_statue
  • [ ] gray_shulker_box
  • [ ] green_shulker_box
  • [ ] lava
  • [ ] light_00
  • [ ] light_01
  • [ ] light_02
  • [ ] light_03
  • [ ] light_04
  • [ ] light_05
  • [ ] light_06
  • [ ] light_07
  • [ ] light_08
  • [ ] light_09
  • [ ] light_blue_shulker_box
  • [ ] light_gray_shulker_box
  • [ ] lime_shulker_box
  • [ ] magenta_shulker_box
  • [ ] orange_shulker_box
  • [ ] oxidized_copper_chest
  • [ ] oxidized_copper_golem_statue
  • [ ] pink_shulker_box
  • [ ] pitcher_crop_top_stage_0
  • [ ] pitcher_crop_top_stage_1
  • [ ] pitcher_crop_top_stage_2
  • [ ] purple_shulker_box
  • [ ] red_shulker_box
  • [x] shulker_box
  • [ ] trapped_chest
  • [ ] weathered_copper_chest
  • [ ] weathered_copper_golem_statue
  • [ ] white_shulker_box
  • [ ] yellow_shulker_box

🔧 Notes

  • I’ll continue updating this Issue as more blocks get fixed.
  • If anyone else is working on specific blocks or on related areas, feel free to reply so we don’t duplicate efforts.
  • I may open a draft PR shortly so the code changes are visible.

Thanks!

BolWaffy avatar Nov 20 '25 14:11 BolWaffy

Some models are broken into pieces

In game models are assembled in the blockstate folder jsons like Brewing stand uses multipart Due to MCprep model import system design just only do the model part and doesn't do block states so, beside brewing stand there is bell which hang, stand many states differently

Some blocks fail to load due to no/not enough geometry

"JSON model does not contain any actual geometry"

These blocks are expected to be empty. Not really an error but a warning because the json just there, a placeholder in the game resourcepack.

Most of them are builtin (declared in its Model class or Renderer class in the Java source code) tile entity, which also included the cases of Some blocks that are currently not listed at all bed for example there is no elements geometry.

Minecraft banner renderer in the source, createBodyLayer() define the model Image

Honestly these should be model even rigged and stored in blend file.

A odd case like the Pitcher block pitcher_crop_top_stage_0.json because its a double tall block and its growing 0-3 stages. Related to blockstate

Image

zNightlord avatar Nov 20 '25 17:11 zNightlord